I'm trying a live streaming of video using a web cam attached to my laptop. I am working in Linux Ubuntu.
Here are the Gstreamer pipeline for server side and client side:
Streaming server: I'm trying to use gst-rtsp-server to serve the video from a v4l2 device.
./test-launch --gst-debug=0 "开发者_Python百科( v4l2src ! video/x-raw-yuv,width=352,height=288,framerate=15/1 ! x264enc ! rtph264pay name=pay0 pt=96 )"
Receiver:
gst-launch -v rtspsrc location=rtsp://192.168.XX.XX:8554/test ! decodebin ! autovideosink
I have this message error:
Setting pipeline to PAUSED …
ERROR: Pipeline doesn’t want to pause. ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not read from resource. Additional debug info: gstrtspsrc.c(4573): gst_rtspsrc_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Got error response: 503 (Service Unavailable). Setting pipeline to NULL … Freeing pipeline …
Who know this problem and/or can try to help me?
You will get lot of examples here for receiver(client) and sender(server) application : http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp
There might be several reasons for a stream not to be available, and that HTTP 503
is not that clear (that error message about PAUSED state either, since a stream has to switch to every state from NULL to PLAYING, and it is necessarily already playing while switching to PAUSED).
You better add GST_DEBUG={1,9}
before your command as in,
GST_DEBUG=3 ./test-launch --gst-debug=0 ...
In my case it was,
ERROR GST_PIPELINE grammar.y:691:priv_gst_parse_yyparse: no element "x264enc"
ERROR GST_PIPELINE grammar.y:776:priv_gst_parse_yyparse: link has no sink [source=@0x7f62b800a0d0]
ERROR GST_PIPELINE grammar.y:776:priv_gst_parse_yyparse: link has no source [sink=@0x7f62b801a1b0]
And I solved it by installing the package gstreamer-plugins-ugly-orig-addon
on an openSUSE system. Hope this helps somebody to tear less hair off.
精彩评论