Reputation: 167
I'm using gstreamer to do RTSP streaming. To achieve that I downloaded the gst-rtsp-server setup from https://gstreamer.freedesktop.org/src/gst-rtsp-server/ . I compiled the code successfully. I could start the gstreamer rtsp server using (server side code )
./test-launch "(videotestsrc ! x264enc ! rtph264pay name=pay0 pt=96)"
After this server starts listening at port 8554
At the receiver side (client) , to play the streamed video I'm using
gst-launch-1.0 -v rtspsrc location=rtsp://127.0.0.1:8554/test
But I'm getting following error at server side :
** Message: state PLAYING media 0xb04160
** Message: 0xb04160: got message type new-clock
0:00:04.375120259 17746 0xa74b00 WARN bin gstbin.c:2395:gst_bin_do_latency_func:<media-pipeline> did not really configure latency of 0:00:00.000000000
** Message: client 0x95d760: sent a message with cseq 4
0:00:04.391459616 17746 0xa9f230 WARN basesrc gstbasesrc.c:2625:gst_base_src_loop:<udpsrc0> error: Internal data flow error.
0:00:04.391536109 17746 0xa9f230 WARN basesrc gstbasesrc.c:2625:gst_base_src_loop:<udpsrc0> error: streaming task paused, reason not-linked (-1)
** (lt-test-launch:17746): WARNING **: 0xb04160: got error Internal data flow error. (gstbasesrc.c(2625): gst_base_src_loop (): /GstPipeline:media-pipeline/GstUDPSrc:udpsrc0:
streaming task paused, reason not-linked (-1))
RTSP request message 0xaa0888
Kindly tell me, what gstreamer elements has to be used at client side ? I could play the streaming video successfully using VLC (Open VLC -- > Media --> Open Network Streaming -- > RTSP://path.... )
Note: Im' using gstreamer-1.0 I'm using Ubuntu PC for client and server setup.
Upvotes: 0
Views: 4776
Reputation: 167
I was able to run this with below command:
gst-launch-1.0 -v rtspsrc location=rtsp://127.0.0.1/test caps="application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264" ! rtph264depay ! decodebin ! videoconvert ! autovideosink
Upvotes: 2
Reputation: 737
At server side you are encoding the data using x264enc, so at client side you have to decode it and then have to play it.
Try this pipeline, It will work
gst-launch-1.0 -v rtspsrc location=rtsp://127.0.0.1:8554/test ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! xvimagesink
Upvotes: 0