udp streaming: reconnect on the fly
Sebastian Dröge
sebastian at centricular.com
Tue Jan 21 00:29:11 PST 2014
On Di, 2014-01-21 at 01:37 +0200, Andrey Utkin wrote:
> 2014/1/20 hobbesc7 <hobbesc7 at gmail.com>:
> > Andrey Utkin wrote
> >> BTW which multimedia container (format) do you use for streaming? MPEG TS?
> >
> > x-h264?
> >
> > On the server:
> >
> > gst-launch -v filesrc location=/dev/video0 ! queue ! video/x-h264 !
> > udpsink host=192.168.1.100 port=5011
>
> Haven't check it, so cannot substantiate should it work or shouldn't.
> But to be safe, i'd suggest you to try
>
> gst-launch -v filesrc location=/dev/video0 ! queue ! video/x-h264 !
> h264parse ! mpegtsmux ! udpsink host=192.168.1.100 port=5011
>
> (h264parse may be not necessary, try without it to check if it still works.)
>
> Maybe the client can stay the same, or, to be sure,
>
> gst-launch -v udpsrc port=5011 ! tsdemux ! decodebin2 ! xvimagesink sync=false
>
> MPEG TS is surely loss tolerant and can start playback mid-stream.
At least if there are keyframes and PPS/SPS of the video stream every
now and then. You can configure that resending of PPS/SPS with the
config-interval parameter on h264parse, for the keyframe interval you'll
have to check the documentation of your video capture driver.
Also use v4l2src for v4l2 devices, filesrc won't work reliably in
general as it's not just simple file IO that is required.
And UDP is not connection based, so the client will just continue to
play something when it receives something new on the port. There's no
need to "reconnect".
--
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140121/884e257e/attachment.pgp>
More information about the gstreamer-devel
mailing list