Question on codec_data for H.264 format

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Question on codec_data for H.264 format

Chen, Weian

Hi

 

Could anybody here tell me what data should be filled into codec_data structure for H.264? And specification there?

 

Thanks in advance.

 

Weian Chen

Ultra Mobility Group

Intel Corporation

Tel:  86-21-6116-6478
Fax: 86-21-3429-1915
iNet: 8-821-6478

 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Question on codec_data for H.264 format

Kapil Agrawal
Welan,

sps & pps

-kapil

On Wed, Oct 21, 2009 at 9:37 PM, Chen, Weian <[hidden email]> wrote:

Hi

 

Could anybody here tell me what data should be filled into codec_data structure for H.264? And specification there?

 

Thanks in advance.

 

Weian Chen

Ultra Mobility Group

Intel Corporation

Tel:  86-21-6116-6478
Fax: 86-21-3429-1915
iNet: 8-821-6478

 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
http://www.linkedin.com/in/kapilagrawal

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Question on codec_data for H.264 format

Chen, Weian

 

Could you please kindly give out the details? If you happen to have the spec, could you send me a copy?

 

I need to fill them by myself.

 

Thanks in advanced.

 

thanks,

Weian


From: Kapil Agrawal [mailto:[hidden email]]
Sent: 2009
1022 0:56
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] Question on codec_data for H.264 format

 

Welan,

sps & pps

-kapil

On Wed, Oct 21, 2009 at 9:37 PM, Chen, Weian <[hidden email]> wrote:

Hi

 

Could anybody here tell me what data should be filled into codec_data structure for H.264? And specification there?

 

Thanks in advance.

 

Weian Chen

Ultra Mobility Group

Intel Corporation

Tel:  86-21-6116-6478
Fax: 86-21-3429-1915
iNet: 8-821-6478

 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
http://www.linkedin.com/in/kapilagrawal


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Question on codec_data for H.264 format

Kapil Agrawal
you might refer the x264enc element

2009/10/21 Chen, Weian <[hidden email]>

 

Could you please kindly give out the details? If you happen to have the spec, could you send me a copy?

 

I need to fill them by myself.

 

Thanks in advanced.

 

thanks,

Weian


From: Kapil Agrawal [mailto:[hidden email]]
Sent: 2009
1022 0:56
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] Question on codec_data for H.264 format

 

Welan,

sps & pps

-kapil

On Wed, Oct 21, 2009 at 9:37 PM, Chen, Weian <[hidden email]> wrote:

Hi

 

Could anybody here tell me what data should be filled into codec_data structure for H.264? And specification there?

 

Thanks in advance.

 

Weian Chen

Ultra Mobility Group

Intel Corporation

Tel:  86-21-6116-6478
Fax: 86-21-3429-1915
iNet: 8-821-6478

 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
http://www.linkedin.com/in/kapilagrawal


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
http://www.linkedin.com/in/kapilagrawal

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Question on codec_data for H.264 format

Carsten-17
In reply to this post by Chen, Weian
The codec_data is identical to the avc1 atom in
iso mpeg4 files and is described in ISO/IEC 14496-14.
it essentially contains the PPS and SPS.


Chen, Weian schrieb:

> Hi
>
>  
>
> Could anybody here tell me what data should be filled into codec_data
> structure for H.264? And specification there?
>
>  
>
> Thanks in advance.
>
>  
>
> Weian Chen
>
> Ultra Mobility Group
>
> Intel Corporation
>
> Tel:  86-21-6116-6478
> Fax: 86-21-3429-1915
> iNet: 8-821-6478
>
>  
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Question on codec_data for H.264 when ES has AnnexB package

Chen, Weian
In reply to this post by Chen, Weian

Hi All

 

I can get the H.264 ES stream (AnnexB Package) from HW encoder in my encoder element, and I also can get sps/pps NAL unit from the ES, but when I fill the codec_data (decoder configuration record) according to spec, then write the stream into mp4 file format, but the dump *.mp4 is not playable.

 

And the difference between my HW encoder and x264enc is the ES output from HW is AnnexB package and x264enc isn’t.

 

Could anybody here tell me the reason? Can AnnexB stream have codec_data?

 

Thanks in advance.

 

Weian

 


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Question on codec_data for H.264 when ES has AnnexB package

Felipe Contreras
On Wed, Dec 16, 2009 at 9:38 AM, Chen, Weian <[hidden email]> wrote:
> I can get the H.264 ES stream (AnnexB Package) from HW encoder in my encoder
> element, and I also can get sps/pps NAL unit from the ES, but when I fill
> the codec_data (decoder configuration record) according to spec, then write
> the stream into mp4 file format, but the dump *.mp4 is not playable.
>
> And the difference between my HW encoder and x264enc is the ES output from
> HW is AnnexB package and x264enc isn’t.
>
> Could anybody here tell me the reason? Can AnnexB stream have codec_data?

No. AnnexB is also named "bytestream" format, and it doesn't contain
codec_data. The codec_data part is defined in MPEG-4 part 15, and the
stream format is different from Annex B. AFAIK if you are going to
save to an MP4 container you need to specify bytestream=false (x264enc
has that option), however, this should have been introduced in the
caps so that it's negotiated automatically. Perhaps for GStreamer
0.11.

I wrote this document to clarify the different H.264 formats. I hope
you find it useful.

H.264 formats
=============

This document tries to summarize high-level formats of H.264 to define the
interfaces between encoders, decoders, muxers, demuxers, payloaders, and
depayloaders.

Byte stream
-----------

The H.264 standard by ITU-T defines only the byte stream format (Annex B)
which can used standalone, or in dummy containers (AVI) in order to avoid
codec-data[1].

File format
-----------

The MPEG-4 part 15 specification (ISO/IEC 14496-15) on section 5.2.4 defines
the codec-data format (decoder configuration information). This is mostly used
by smart containers (MPEG-4, Matroska).

The codec-data includes information, such as profile, level, sps and pps.
Also, it specifies the size of NAL unit lenght field, which is prefixed before
each NAL unit. For example, if the size corresponds to 4 bytes, then a
100-byte NAL unit would be prefixed with 0x00000064.

RTP payload
-----------

The RTP Payload Format for H.264 Video specification (RFC3984) in section 1.1
makes perfectly clear that neither byte-stream or the file-format are relevant
for RTP; a payloader would only care about NAL units.

Interfacing
-----------

Now that all the formats have been defined it's only sensible to use these for
interfacing between different components. Let's keep in mind that each
component should be logically independent: do one job, and one job only.

A demuxer should be codec-agnostic, therefore, it would output only whatever
is stored as it is.

A decoder should be able to receive whatever the demuxer outputs: both
byte-stream and AVC file-format. If in file-format, then receive the
codec-data in separate, appropriately identified buffer.

A muxer should mirror the demuxer; store whatever it receives.

An encoder should mirror the decoder; provide decodable frames either in
byte-stream, or AVC file-format.

A payloader should be able to receive whatever the encoder produces, possibly
one of the two formats would be enough, but ideally both should be supported.

A depayloader should produce decodable frames, either format should work.

Glossary
--------

codec-data::
        codec-specific configuration data, also known as 'extra-data' and
        'CODECCONFIG' in OpenMAX IL.

--
Felipe Contreras

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Problem with linking more sinks

Miron Kunz
Hi,

I am trying to link a next sink like this:

1) start pipeline : src!tee ! queue!sink1
2) pipeline is in PLAYING
3) block Src's src pad and from call back add new sink2:
  src ! tee ! queue !sink1
            ! queue !sink2
4) set sink2 to PLAYING
5) unblock Src's src pad
6) Src's task is PAUSED with this message:
 basesrc gstbasesrc.c:2326:gst_base_src_loop:<camera> pausing after gst_pad_push() = wrong-state

The problem is that source's task is paused and there is no flow through the pipeline.

What is the correct way to deal with it?


Thanks,
Miron


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem with linking more sinks

raju03e
Are you changed the queue, tee elements into playing state.
Because pad_push returns - wrong state, if pad in wrong state.

On Sat, Jan 2, 2010 at 2:17 PM, Miron Kunz <[hidden email]> wrote:
Hi,

I am trying to link a next sink like this:

1) start pipeline : src!tee ! queue!sink1
2) pipeline is in PLAYING
3) block Src's src pad and from call back add new sink2:
 src ! tee ! queue !sink1
           ! queue !sink2
4) set sink2 to PLAYING
5) unblock Src's src pad
6) Src's task is PAUSED with this message:
 basesrc gstbasesrc.c:2326:gst_base_src_loop:<camera> pausing after gst_pad_push() = wrong-state

The problem is that source's task is paused and there is no flow through the pipeline.

What is the correct way to deal with it?


Thanks,
Miron


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem with linking more sinks

Miron Kunz
Looks like the pad in wrong state belongs to some videoscale element in sink2. Videoscale's sink pad is in state "flushing" causing the flow stop.
Is it possible to revive it?







-----Original Message-----
From: kodam naga <[hidden email]>
To: Miron Kunz <[hidden email]>,
Discussion of the development of GStreamer <[hidden email]>
Date: Mon, 4 Jan 2010 02:48:08 -0500
Subject: Re: [gst-devel] Problem with linking more sinks

> Are you changed the queue, tee elements into playing state.
> Because pad_push returns - wrong state, if pad in wrong state.
>
> On Sat, Jan 2, 2010 at 2:17 PM, Miron Kunz <[hidden email]> wrote:
>
> > Hi,
> >
> > I am trying to link a next sink like this:
> >
> > 1) start pipeline : src!tee ! queue!sink1
> > 2) pipeline is in PLAYING
> > 3) block Src's src pad and from call back add new sink2:
> >  src ! tee ! queue !sink1
> >            ! queue !sink2
> > 4) set sink2 to PLAYING
> > 5) unblock Src's src pad
> > 6) Src's task is PAUSED with this message:
> >  basesrc gstbasesrc.c:2326:gst_base_src_loop:<camera> pausing after
> > gst_pad_push() = wrong-state
> >
> > The problem is that source's task is paused and there is no flow through
> > the pipeline.
> >
> > What is the correct way to deal with it?
> >
> >
> > Thanks,
> > Miron
> >
> >
> >
> > ------------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Verizon Developer Community
> > Take advantage of Verizon's best-in-class app development support
> > A streamlined, 14 day to market process makes app distribution fast and
> > easy
> > Join now and get one step closer to millions of Verizon customers
> > http://p.sf.net/sfu/verizon-dev2dev
> > _______________________________________________
> > gstreamer-devel mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >
>
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem with linking more sinks

Miron Kunz
In reply to this post by raju03e
Yes queue is set to PLAYING too.

Looks like the pad in wrong state belongs to some videoscale element in sink2. Videoscale's sink pad is in state "flushing" causing the flow to stop.
Is it possible to revive it?

Is there element that can keep flow on even if one brunch of the tee is flushing?

Thanks,
Miron.


> Are you changed the queue, tee elements into playing state.
> Because pad_push returns - wrong state, if pad in wrong state.
>
> On Sat, Jan 2, 2010 at 2:17 PM, Miron Kunz <[hidden email]> wrote:
>
> > Hi,
> >
> > I am trying to link a next sink like this:
> >
> > 1) start pipeline : src!tee ! queue!sink1
> > 2) pipeline is in PLAYING
> > 3) block Src's src pad and from call back add new sink2:
> >  src ! tee ! queue !sink1
> >            ! queue !sink2
> > 4) set sink2 to PLAYING
> > 5) unblock Src's src pad
> > 6) Src's task is PAUSED with this message:
> >  basesrc gstbasesrc.c:2326:gst_base_src_loop:<camera> pausing after
> > gst_pad_push() = wrong-state
> >
> > The problem is that source's task is paused and there is no flow through
> > the pipeline.
> >
> > What is the correct way to deal with it?
> >
> >
> > Thanks,
> > Miron
> >
> >
> >
> > ------------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Verizon Developer Community
> > Take advantage of Verizon's best-in-class app development support
> > A streamlined, 14 day to market process makes app distribution fast and
> > easy
> > Join now and get one step closer to millions of Verizon customers
> > http://p.sf.net/sfu/verizon-dev2dev
> > _______________________________________________
> > gstreamer-devel mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >
>
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel