Am 16.06.2012 01:10, schrieb Christian Brümmer:

Hi!

I'm using Live555 for RTSP streaming but i need to pass single nal units
to the sink. I know a ffmpeg x264 frame may consists of several nal
units. How can i split the payload into the nals?

Another question: each frame begins with the h264 start code - i have to
get rid of it before parsing to the live555 sink. How can i cut off the
start code from the payload? It is always the first 4 bytes?

Best regards,
Christian

_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

I figured out that a nal unit (annex b) starts with the startcode 0x00000001 or 0x000001 (depends on the encoder implementation). the size of a nal unit isnt known but you can search for the next startcode and the bytes between are the nal unit. anyway with my encoding configuration i never get more than one startcode at the beginning of a encoded frame. cutting the first 4 bytes off is working for me so far!
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to