http stream broadcast in udp
Tim Müller
tim at centricular.com
Thu Oct 13 18:18:18 UTC 2016
On Thu, 2016-10-13 at 13:16 +0100, Francois Baret wrote:
Hi,
> I can grab a stream coming from my android camera and play it on a
> LAN machine with:
> gst-launch-0.10 souphttpsrc location=http://192.168.1.5:8080/video !
> decodebin2 ! autovideosink
You should really use GStreamer 1.x, 0.10 is ancient and unmaintained.
> My idea is then to broadcast it using udpsink:
> gst-launch-0.10 souphttpsrc location=http://192.168.1.5:8080/video !
> decodebin2 ! udpsink host=10.0.0.1 port=5200
> When I try to watch the stream on the same machine with:
> gst-launch-0.10 udpsrc port=5200 ! autovideosink
> I get: [nothing] but I do not get any images!
> Any explanation why?
You are just sending random decoded audio/video data over UDP here.
This is not going to work like that. You need to packetise it either
with RTP or put the streams into a container such as MPEG-TS.
To get started you could also use gst-rtsp-server, it comes with a
test-uri example, so you could do
gst-rtsp-server/examples $ ./test-uri http://...
and then use gst-play-1.0 rtsp://127.0.0.1/test or such. This will send
the audio/video data over UDP by default, with RTP as transport (RTSP
is used to set up the streaming). As added bonus it will not decode the
audio/video data but just send it as-is if possible.
Cheers
-Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
More information about the gstreamer-devel
mailing list