[gst-devel] qtdemux nal slice size

Sandeep Prakash 123sandy at gmail.com
Sun Sep 12 14:08:01 CEST 2010


Hi Vineeth,


vineeth wrote:
> 
>   For few mp4 files, the first 4 bytes correspond to NumBytesInNalUnit and
> for few other the first 2 bytes tell the Nal Unit size. Is there a way to
> determine if the first 4 or the first 2 bytes give the size on Nal unit?
> 
In case of h264 streams qtdemux will give the decoder config info in the
caps as 
"codec_data", as a GstBuffer. Note that this is not the bytestream format.
This comprises of:
<6 bytes avcC atom> + <SPS> + <1 byte indicating Number of PPS present> +
<PPS> + <PPS> + ....

In the avcC atom the 2 Least Significant Bits of the 5th Byte corresponds to
the
(NumBytesInNalUnit -1). So to get the NumBytesInNalUnit (Length of Length of
NAL):
length_of_length = (<5th Byte of "codec_data"> & 0x3) + 1


vineeth wrote:
> 
>   Also, is it possible to configure qtdemux to give Nal units with NAL
> prefix ( Annex-B of *14496-10* standard)
> 
AFAIK configuration is not possible.


Regards,
Sandeep Prakash
http://sandeepprakash.homeip.net

-- 
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/qtdemux-nal-slice-size-tp2535442p2536285.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list