1

I have a RTSP source. The data come in as stream of NAL units. I suppose that the RTP packets need to be "depay" or "parsed" into something that H.264 decoder can understand.

rtspsrc ! rtph264depay ! h264parse ! avdec_h264 ! ...

What's the actual difference between depay and parse? Intuitively it seems to me that they are doing the same thing. But Gstreamer pipeline won't work if I remove one of them.

mofury
  • 644
  • 1
  • 11
  • 23

1 Answers1

5

rtph264depay: RTP -> H.264 bitstream

h264parse: H.264 bitsream -> bytestream or AVC samples and NAL or AU packing

Florian Zwoch
  • 6,764
  • 2
  • 12
  • 21
  • Hi, could you elaborate on when I should use one or the other? Does one of the two have advantages over the other? Thank you – user1315621 Mar 16 '22 at 14:32
  • They are doing completely different things. – Florian Zwoch Mar 16 '22 at 14:33
  • I was suggested to use it here https://stackoverflow.com/questions/71399469/gstreamer-corrupted-image-from-rtsp-video-stream?noredirect=1#comment126342977_71399469 between `rtph264depay` and `nvv4l2decoder` but it does not seem to make any difference (at least it does not solve my issue) – user1315621 Mar 16 '22 at 15:48