[gst-devel] nogotiating h264 packing formats

Sebastian Dröge sebastian.droege at collabora.co.uk
Tue Dec 2 09:21:30 CET 2008

Am Dienstag, den 02.12.2008, 10:06 +0200 schrieb Stefan Kost:
> hi,
> h264 streams come in two flavours:
> 1) length prefixed, each NALU is prefixed by a 32bit length field
> (length of NALU)
> 2) startcode delimmited, as described in annex b of h264 spec, NALUs are
> separated by 24 bit value 0x000001.
> It looks like MP4/3GP/MOV and MKV use the AVC1 encoding
> (length-prefix),while AVI, ES, and TS use
> the Annex B encoding (startcodes).
> When demuxing videos that contain h264 streams, demuxer will just demux
> what the file contains. decoders can check the presence of the
> codec-data on the caps. If codec-data is given, stream is length
> prefixed (1), otherwise its startedcode delimmited (where the SPS and
> PPS are in the stream an not in codec-data).
> When muxing we have no mean to negotiate that right now. The x264enc
> encoder has a byte-stream property to select the flavor, but that
> requires manual setup to have it right. Doing t wrong usualy still
> works, but then the file is not well playable.
> Should we add h264packing={length-prefixed,startcode-delimmited} to the
> caps?

Sounds like a good idea IMHO but string fields in caps are a bit
problematic IIRC.

It probably should be either a GEnum or some kind of integer or boolean
I guess...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081202/21071f22/attachment.pgp>

More information about the gstreamer-devel mailing list