Discussion:
[gst-devel] Question on codec_data for H.264 format
(too old to reply)
Chen, Weian
2009-10-21 16:07:55 UTC
Permalink
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
Kapil Agrawal
2009-10-21 16:56:10 UTC
Permalink
Welan,

sps & pps

-kapil
Post by 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
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
--
http://www.linkedin.com/in/kapilagrawal
Chen, Weian
2009-10-21 17:16:59 UTC
Permalink
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:***@gmail.com]
Sent: 2009Äê10ÔÂ22ÈÕ 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 <***@intel.com<mailto:***@intel.com>> 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
gstreamer-***@lists.sourceforge.net<mailto:gstreamer-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
--
http://www.linkedin.com/in/kapilagrawal
Kapil Agrawal
2009-10-21 17:53:04 UTC
Permalink
you might refer the x264enc element
Post by 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
------------------------------
*Sent:* 2009Äê10ÔÂ22ÈÕ 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
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
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
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
--
http://www.linkedin.com/in/kapilagrawal
Carsten
2009-10-22 09:24:02 UTC
Permalink
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.
Post by 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
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Chen, Weian
2009-12-16 07:38:08 UTC
Permalink
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
Felipe Contreras
2009-12-24 17:25:31 UTC
Permalink
Post by Chen, Weian
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
Miron Kunz
2010-01-02 19:17:54 UTC
Permalink
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
kodam naga
2010-01-04 07:48:08 UTC
Permalink
Are you changed the queue, tee elements into playing state.
Because pad_push returns - wrong state, if pad in wrong state.
Post by Miron Kunz
Hi,
1) start pipeline : src!tee ! queue!sink1
2) pipeline is in PLAYING
src ! tee ! queue !sink1
! queue !sink2
4) set sink2 to PLAYING
5) unblock Src's src pad
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
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Miron Kunz
2010-01-04 19:26:45 UTC
Permalink
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 <***@gmail.com>
To: Miron Kunz <***@mail.ru>,
Discussion of the development of GStreamer <gstreamer-***@lists.sourceforge.net>
Date: Mon, 4 Jan 2010 02:48:08 -0500
Subject: Re: [gst-devel] Problem with linking more sinks
Post by kodam naga
Are you changed the queue, tee elements into playing state.
Because pad_push returns - wrong state, if pad in wrong state.
Post by Miron Kunz
Hi,
1) start pipeline : src!tee ! queue!sink1
2) pipeline is in PLAYING
src ! tee ! queue !sink1
! queue !sink2
4) set sink2 to PLAYING
5) unblock Src's src pad
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
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Miron Kunz
2010-01-04 20:19:35 UTC
Permalink
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.
Post by kodam naga
Are you changed the queue, tee elements into playing state.
Because pad_push returns - wrong state, if pad in wrong state.
Post by Miron Kunz
Hi,
1) start pipeline : src!tee ! queue!sink1
2) pipeline is in PLAYING
src ! tee ! queue !sink1
! queue !sink2
4) set sink2 to PLAYING
5) unblock Src's src pad
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
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Continue reading on narkive:
Loading...