qtdemux nal slice size

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

qtdemux nal slice size

Vineeth-2
Hi all,
  I was using the qtdemux to get H.264 NAL Units.
 
  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?

  Also, is it possible to configure qtdemux to give Nal units with NAL prefix ( Annex-B of 14496-10 standard)

Thanks.

--vineeth


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: qtdemux nal slice size

Sandeep Prakash
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
Reply | Threaded
Open this post in threaded view
|

Re: qtdemux nal slice size

Vineeth-2
Hi ,
  Thanks for the kind reply,
  I could more info from class AVCDecoderConfigurationRecord of 14496-part 15, thanks to your pointers.

--vineeth


On Sun, Sep 12, 2010 at 5:38 PM, Sandeep Prakash <[hidden email]> wrote:

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.

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel