In the gstreamer rtp h264 depayloader, there is a check to see if the incoming stream is a byte stream or packetized stream.
Can anybody tell me what is the difference between these two formats?
Also, for the bytestream, the codec_data does not get written to the caps. Any idea why this would be?
H.264 (NAL) Byte Stream
Is used mainly to be sent directly to the decoder on a single PC, and not to be transmitted over a network. It has simple format rules:
0x000001
.0x000001
start code, to the next frame's 0x000001
start code.H.264 Packetized Stream
It is used only to be transmitted over TCP on a limited MTU network. Each network has MTU (Maximum Transmission Unit) that can be sent at a time through TCP. Usually it is around 1500 bytes. So, if you want to send 10 MB IDR frame over TCP, you will have to break it apart so the parts fit the MTU. H.264 Stream that is adopted in this way is called Packetized Stream.
In order to decode this stream, you must reconstruct whole frames on the receiving side, and you usually then want to make H264 NAL Byte Stream out of it, so you can send it to a decoder...
Rules of packetization can be found here: http://www.rfc-editor.org/rfc/rfc3984.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With