admin管理员组文章数量:1355014
I'm trying to write a working pipeline for capturing an RTPS Stream using MJPEG instead of H264, currently I have a working pipeline using H264, thus I know that my stream is working properly. But when I try to adapt the new pipeline to MJPEG it fails, and I can't see why.
My current H264 working pipeline looks like this:
gst-launch-1.0 rtspsrc location=myStreamIP ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! video/x-raw,format=RGB ! autovideosink
And my attempt to adapt it to MJPEG looks like this:
gst-launch-1.0 rtspsrc location=myStreamIP ! rtpjpegdepay ! jpegparse ! avdec_mjpeg ! videoconvert ! video/x-raw,format=RGB ! autovideosink
And when I use the MJPEG pipeline the console gives me the following error:
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Redistribute latency...
Progress: (request) Sending PLAY request
Redistribute latency...
Progress: (request) Sent PLAY request
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0: Internal data stream error.
WARNING: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Delayed linking failed.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3177): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0:
streaming stopped, reason not-linked (-1)
Additional debug info:
gst/parse/grammar.y(922): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
failed delayed linking some pad of GstRTSPSrc named rtspsrc0 to some pad of GstRtpJPEGDepay named rtpjpegdepay0
Execution ended after 0:00:00.077653600
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not write to resource.
Additional debug info:
../gst/rtsp/gstrtspsrc.c(6937): gst_rtspsrc_try_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Could not send message. (Received end-of-file)
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not write to resource.
Additional debug info:
../gst/rtsp/gstrtspsrc.c(9431): gst_rtspsrc_pause (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Could not send message. (Received end-of-file)
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not read from resource.
Additional debug info:
../gst/rtsp/gstrtspsrc.c(6851): gst_rtsp_src_receive_response (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Could not receive message. (System error)
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not read from resource.
Additional debug info:
../gst/rtsp/gstrtspsrc.c(6951): gst_rtspsrc_try_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Could not receive message. (System error)
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not write to resource.
Additional debug info:
../gst/rtsp/gstrtspsrc.c(8743): gst_rtspsrc_close (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Could not send message. (System error)
Freeing pipeline ...
Does anyone know what I'm doing wrong or how to solve it ? I assume that my pipeline for MJPEG is not properly set, but I cannot se why or how.
Thank you.
I'm trying to write a working pipeline for capturing an RTPS Stream using MJPEG instead of H264, currently I have a working pipeline using H264, thus I know that my stream is working properly. But when I try to adapt the new pipeline to MJPEG it fails, and I can't see why.
My current H264 working pipeline looks like this:
gst-launch-1.0 rtspsrc location=myStreamIP ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! video/x-raw,format=RGB ! autovideosink
And my attempt to adapt it to MJPEG looks like this:
gst-launch-1.0 rtspsrc location=myStreamIP ! rtpjpegdepay ! jpegparse ! avdec_mjpeg ! videoconvert ! video/x-raw,format=RGB ! autovideosink
And when I use the MJPEG pipeline the console gives me the following error:
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Redistribute latency...
Progress: (request) Sending PLAY request
Redistribute latency...
Progress: (request) Sent PLAY request
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0: Internal data stream error.
WARNING: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Delayed linking failed.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3177): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0:
streaming stopped, reason not-linked (-1)
Additional debug info:
gst/parse/grammar.y(922): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
failed delayed linking some pad of GstRTSPSrc named rtspsrc0 to some pad of GstRtpJPEGDepay named rtpjpegdepay0
Execution ended after 0:00:00.077653600
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not write to resource.
Additional debug info:
../gst/rtsp/gstrtspsrc.c(6937): gst_rtspsrc_try_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Could not send message. (Received end-of-file)
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not write to resource.
Additional debug info:
../gst/rtsp/gstrtspsrc.c(9431): gst_rtspsrc_pause (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Could not send message. (Received end-of-file)
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not read from resource.
Additional debug info:
../gst/rtsp/gstrtspsrc.c(6851): gst_rtsp_src_receive_response (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Could not receive message. (System error)
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not read from resource.
Additional debug info:
../gst/rtsp/gstrtspsrc.c(6951): gst_rtspsrc_try_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Could not receive message. (System error)
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not write to resource.
Additional debug info:
../gst/rtsp/gstrtspsrc.c(8743): gst_rtspsrc_close (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Could not send message. (System error)
Freeing pipeline ...
Does anyone know what I'm doing wrong or how to solve it ? I assume that my pipeline for MJPEG is not properly set, but I cannot se why or how.
Thank you.
Share Improve this question asked Mar 31 at 9:55 JFFJFF 499 bronze badges 1 |1 Answer
Reset to default 0Something you should know about RTSP is that you need to have both the source and receiver use the same type of codec. So if you haven't switched the source pipeline to use jpeg encoding, that would be the cause of the issue. The logs show that there is an issue linking the rtspsrc
which might be a hint that rtpjpegdepay
is unable to process the incoming stream.
Assuming that the encoding is done correctly. The log shows that you are receiving the end of file. So maybe the stream has stopped by the time you run the receiving pipeline.
It might also be worth it to test your pipeline without the caps you set for the videosink. I tested an example pipeline and had issues with opening the stream due to the caps. i.e:
gst-launch-1.0 rtspsrc location=myStreamIP ! rtpjpegdepay ! jpegparse ! avdec_mjpeg ! videoconvert ! video/x-raw,format=RGB ! autovideosink
To further debug this you can also get lower level logs by changing the gstreamer log level output with GST_DEBUG=<plugin name>*:<select from levels 1-9> :
GST_DEBUG=rtspsrc*:3 gst-launch-1.0 rtspsrc location=myStreamIP ! rtpjpegdepay ! jpegparse ! avdec_mjpeg ! videoconvert ! autovideosink
本文标签: cGStreamerRTPS stream to MJPEG pipelineStack Overflow
版权声明:本文标题:c++ - GStreamer - RTPS stream to MJPEG pipeline - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743955457a2568049.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
gst-launch-1.0 videotestsrc ! video/x-raw,format=RGB ! autovideosink
work ? If no just remove the caps beforeautovideosink
, or addautovideoconvert
instead. – SeB Commented yesterday