Reading RTP MJPEG stream from a file

Wolfgang Grandegger wg at grandegger.com
Thu Jul 9 16:59:59 UTC 2020


Hello,

yes, I can read JPEG frames from a file using:

$ gst-launch-1.0 -v filesrc location=rtp-orlaco-camera.jpeg ! image/jpeg, framerate=30/1 ! queue ! jpegparse ! vaapijpegdec ! vaapisink

"jpegparse" does the trick of scanning the data for the beginning and
end of the frame.

Thinking more about it... what I want to do with the RTP packets cannot
work as they are not of fixed size and the length information is not
inside the RTP header/packet :(.

Thanks for help!

Wolfgang

Am 09.07.20 um 18:39 schrieb Anton Pryima:
> Hello Wolfgang,
> 
> Try to move rtpjitterbuffer ! rtpjpegdepay to the first pipeline and
> dump to the disk already depayloaded stream. 
> 
> Best regards,
> Anton.
> 
> On Thu, Jul 9, 2020 at 5:28 PM Wolfgang Grandegger <wg at grandegger.com
> <mailto:wg at grandegger.com>> wrote:
> 
>     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
>     _______________________________________________
>     gstreamer-devel mailing list
>     gstreamer-devel at lists.freedesktop.org
>     <mailto:gstreamer-devel at lists.freedesktop.org>
>     https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 


More information about the gstreamer-devel mailing list