We are trying to get Gstreamer working on a DM368 Leopardboard*, we've successfully persuaded it to create a test video (videotestsrc), encode it, and dump it into a file.
The pipe that worked is:
gst-launch -v videotestsrc num-buffers=100 ! queue ! ffenc_mpeg4 bitrate=800000 ! ffmux_mp4 ! filesink location=video_test.mp4
The next step is to modify the pipe to stream the testcard over the network, to be viewed on a PC with VLC using something like rtsp://ip_addr:port/streamname but the documentation on how to do this seems quite thin on the ground (and often outdated), and the examples seem to blur source code and command line ways of doing it.
I'll freely admit that >50% of the problem is our lack of familiarity with Gstreamer & its various parts, I've always found that if I have a working example to start from I can poke it with sticks and work out the rest from there.
I've got this far:
gst-launch -v videotestsrc ! queue ! ffenc_mpeg4 bitrate=800000 ! rtpmp4vpay ! tcpserversink host=<PC_ip> port=5000
Which seems to make something happen in VLC (using tcp://board_ip:port)- it seems to think there's something going on (doesn't throw an error) but doesn't play/show anything. When I break (^C) the gst process, VLC notices.
So, basically - any guidance/feedback would be great, a working one-liner would be fantastic.
Edited to add: Yes I see the test_video.c example, but that's compiling a special program to do something which looks like it should be possible to just invoke from the command line to prove the concept.
* = Linux version 2.6.32-17-ridgerun /CPU: ARM926EJ-S
GStreamer - ZED RTSP Server ZED RTSP Server is a GStreamer application for Linux operating system that allows to instantiate an RTSP server from a text launch pipeline using the “gst-launch” style.
gst-rtsp-server is a library on top of GStreamer for building an real-time streaming protocol server (RTSP). RTSP is a presentation-layer protocol that lets you command media servers via pause and play capabilities, whereas RTP is the transport protocol used to move the data.
node-rtsp-stream has been updated to node-rtsp-stream-es6. In the latter, there is a function . stop() that you can call to stop the streaming.
Source: In contradiction to RTP, a RTSP server negotiates the connection between a RTP-server and a client on demand (Link). The gst-rtsp-server is not a gstreamer plugin, but a library which can be used to implement your own RTSP application. The following test case was applied on a Ubuntu 12.04.5 machine:
autoconf automake autopoint libtool
and the other missing essential build toolsgit clone git://anongit.freedesktop.org/gstreamer/gst-rtsp-server && cd gst-rtsp-server
git checkout remotes/origin/1.2
./autogen.sh --noconfigure && GST_PLUGINS_GOOD_DIR=$(pkg-config --variable=pluginsdir gstreamer-plugins-bad-1.0) ./configure && make
(For some reason, GST_PLUGINS_GOOD_DIR is not set by pkg-config, so we set it explicitly)cd examples && ./test-launch "( videotestsrc ! x264enc ! rtph264pay name=pay0 pt=96 )"
rtsp://HOST_IP:8554/test
Finally found a working example here:
GStreamer rtp stream to vlc
But it does require creating an .SDP file for VLC and specifying IP addresses which is not really how we want to end up... but hey it's a start!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With