View and forward rtp stream

uler3161 uler3161 at hotmail.com
Tue Mar 31 14:19:18 PDT 2015


Hi,

I'm new to both the mailing list and fairly new to gstreamer itself. I'm
hoping I can get some suggestions on a project I'm trying to set up.

The simple description is that I want to send video from a Raspberry Pi to a
Windows PC. This PC will allow viewing of the stream at any time (so maybe 3
minutes into the stream) AND will forward the stream to a destination Pi.

After trying many different thing, I've determined that gstreamer (I'm using
1.0) is the tool to use. I'd really prefer not to program anything, so I've
been trying to use gst-launch. After much testing, I've also determined an
RTP stream allows for much better quality than just UDP. 

I have a multicasting version of what I want to do. This allows the PC to
run both a video player and a packet forwarder bound to the same multicast
address and port. I'm piping raspivid video to gstreamer to handle RTP
payloading and sinking to the multicast address. It works great. On the PC
end, I'm using the Windows port of socat to forward and MPlayer to play (I
chose MPlayer to use the -wid option).

Now I'm in a situation where I think I might have to use unicast. As I
understand it, that means the PC can only bind to the port once and will
need to tee the stream. I've done some things that haven't really gotten me
where I want. For instance, I've written a program that listens on the
unicast port and writes bytes to a couple named pipes. One pipe is used for
forwarding (this worked fine) and the other pipe was for the player. I tried
to play the player pipe with gstreamer, but got errors about invalid RTP
format. I don't even think I could play it with MPlayer because I need an
SDP file and I don't think it's possible to specify a named pipe in an SDP.
And really I'd like to not even need an SDP, but I never could figure out
how to get MPlayer to work without one.

So I'm trying to figure out if there's some other way of using gstreamer to
do this. I suppose what I really want to do is have gstreamer take an rtp
stream and both forward it (I assume with a udpsink) and play it. But when
playing, I'd like to use MPlayer. Unfortunately it seems like gstreamer
doesn't have quite as much functionality on the Windows platform for doing
such a thing (I assume it'd be something like filesink location=/dev/stdout
or an fdsink). 

If it helps, this is how I'm currently streaming video from the pi with
unicast:
raspivid -g 10 -o - -w 1024  -h 500 -ih -hf -t 0 -n -fps 24 -b 500000 | \
        gst-launch-1.0 fdsrc ! \
        h264parse ! \
        rtph264pay config-interval=10 ! \
        udpsink host=pcaddress port=1500 sync=false > /dev/null 2>&1 &


Ideas? Suggestions? Am I crazy to do this? 

Thanks,
Dan



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/View-and-forward-rtp-stream-tp4671399.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list