Reading RTP MJPEG stream from a file

Wolfgang Grandegger wg at grandegger.com
Thu Jul 9 14:20:32 UTC 2020


Hello,

I have recorded a RTP JPEG stream to a file with:

  $ gst-launch-1.0 -v -e udpsrc port=50004 \
    caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG, payload=(int)26, framerate=(fraction)30/1" \
    ! filesink location=rtp.img

Is it possible to feed these data into a GStreamer pipleline using "filesrc"?
I tried:

  $ gst-launch-1.0 -v filesrc location=rtp.img \
      ! application/x-rtp, media=video,clock-rate=90000, encoding-name=JPEG, payload=26, framerate=30/1 \
      ! rtpjitterbuffer ! rtpjpegdepay ! vaapijpegdec ! vaapisink
  ...
  0:00:00.891862447 32571 0x560f722b5c50 ERROR        rtpjitterbuffer gstrtpjitterbuffer.c:1399:gst_jitter_buffer_sink_parse_caps:<rtpjitterbuffer0> Got caps with wrong payload type (got 92, expected 26)
  Additional debug info:
  gstrtpjitterbuffer.c(3217): gst_rtp_jitter_buffer_chain (): /GstPipeline:pipeline0/GstRtpJitterBuffer:rtpjitterbuffer0:
  Received invalid RTP payload, dropping
  0:00:00.891870333 32571 0x560f722b5c50 WARN         rtpjitterbuffer gstrtpjitterbuffer.c:3224:gst_rtp_jitter_buffer_chain:<rtpjitterbuffer0> No clock-rate in caps!, dropping buffer
  0:00:00.891881175 32571 0x560f722b5c50 WARN         rtpjitterbuffer gstrtpjitterbuffer.c:3217:gst_rtp_jitter_buffer_chain:<rtpjitterbuffer0> warning: Received invalid RTP payload, dropping
  WARNING: from element /GstPipeline:pipeline0/GstRtpJitterBuffer:rtpjitterbuffer0: Could not decode stream.

"rtpjitterbuffer" seems to get invalid data. Hm, likely I have missed
something!

Thanks for input...

Wolfgang


More information about the gstreamer-devel mailing list