Download http stream to local disk and play from downloading location
tim at centricular.com
Sun Jun 28 06:00:52 PDT 2015
On Fri, 2015-06-26 at 06:25 -0700, Bhavya wrote:
> I am trying to download and play http stream simultaneously
> Download http stream
> gst-launch-0.10 souphttpsrc location=http://192.168.0.144/Test.avi ! queue2
> ! filesink location=Download.avi
> Meanwhile through other pipeline start playback from downloading location
> gst-launch-0.10 filesrc location=Download.avi ! avidemux name=demux demux. !
> queue ! ffdec_h264 ! autovideosink demux. ! queue ! ffdec_mp3 ! alsasink
> Now problem with above logic is, video doesn't play completely.
> Is this because filesrc caches entire file when pipeline set to play, so
> data downloaded until that is played? OR
> Do we need to set some property of filesink to make sure it as written to
> actual location?
GStreamer 0.10 is pretty ancient and no longer maintained. I would
suggest you switch to GStreamer 1.x.
In recent GStreamer 1.x versions there's an element called
'downloadbuffer' which should do what you want.
The old queue2 element can do something similar if you set the
temp-location property, but it won't do things like 'fill holes' in the
file automatically if there's nothing else to do.
Tim Müller, Centricular Ltd - http://www.centricular.com
More information about the gstreamer-devel