h.264 Video Streaming over TCP
Tim-Philipp Müller
t.i.m at zen.co.uk
Thu Feb 28 04:24:22 PST 2013
On Sat, 2013-02-23 at 07:30 -0800, pfarmer wrote:
> Server
> gst-launch-1.0 videotestsrc horizontal-speed=5 ! x264enc tune="zerolatency"
> threads=1 ! rtph264pay config-interval=2 ! tcpserversink port=8554
> Client:
> gst-launch-1.0 tcpclientsrc port=8554 host=localhost ! application/x-rtp,
> payload=96 ! rtph264depay ! avdec_h264 ! xvimagesink
This will not work. The problem is that a TCP connection just transmits
a stream of bytes, unlike UDP it won't maintain the packetisation of the
input data, but RTP relies on that.
There are some things you can do:
a) skip the RTP pay/depay - you can send h264 byte-stream right over the
wire and then use h264parse to packetise it on the receiver end.
b) use rtph264pay ! gdppay ! sink and src ! gdpdepay ! rtph264depay
(But I'm not sure how much I'd rely on the GDP elements in 1.0, I don't
think they're production-use ready, but you can test if they work for
you in your use case)
Cheers
-Tim
More information about the gstreamer-devel
mailing list