[FFmpeg-user] web stream video conversion on the fly without downloading

Da Rock ffmpeg-user at herveybayaustralia.com.au
Wed Nov 30 10:49:38 CET 2011

On 11/30/11 17:13, steven liu wrote:
> Thanks for reply. Is it possible to do this programmatically? I am able to
> receive the video byte stream (from socket) and store it into a tempary
> memory buffer. I plan to convert the buffer content to another format. The
> question is how much bytes I need to receive for each buffer before I start
> calling FFMPEG to convert?  The problem is how to cut the received video
> byte stream to different parts for conversion. Tks.
I don't think you need to worry about any of that. FFmpeg receives from 
any input (provided its media) and converts "on the fly"; in other words 
it will convert as it gets the data. Programmatically shouldn't be a 
problem either- many apps use ffmpeg in the background.

For instance, I'm taking input from gstreamer fdsink or udp:// and I can 
split and convert (I'm not, but I have tried this) a mp2/mpeg-ts to x264 
and output to file or a url in mpeg-ts format. No buffer required and 
cpu usage is extremely low.

You can split the different streams encoded in the format to different 
files or whatever. Check out -map options. But ffmpeg can encode *all* 
video streams to a specific codec and *all* audio streams to a specific 
codec, or independently to different codecs, and output to one file or 
url/socket or many.

All I can suggest is to just play: you'll never know unless you try :)
> On Wed, Nov 30, 2011 at 1:02 PM, Da Rock<
> ffmpeg-user at herveybayaustralia.com.au>  wrote:
>> On 11/30/11 14:51, steven liu wrote:
>>> Dear All,
>>> I am wondering whether FFMPEG has the web stream video conversion on the
>>> fly capability. What I want to do is to receive online web video stream
>>> from sockets, convert to another format/size/bit rate on the fly without
>>> waiting until the whole video file is downloaded completely. For example,
>>> I
>>> receive 1 sec video and start converting for this 1-sec video content.
>>> Then, I go to receive another 1 sec and start converting another 1-sec
>>> video content. Is it possible to do this using FFMPEG or other tools? Many
>>> thanks.
>>>   I believe that is the point of it. You can input from many sources
>> (including weburl) convert and view on the fly such as:
>> ffmpeg -i<url>  <conversion parameters>  |<mplayer or other viewer>  -
>> Essentially that is what ffserver does- it connects endpoints like this
>> automagically so to speak. One ffmpeg reads the source to ffserver, and
>> ffserver calls another to write it to the remote.
>> HTH
>> ______________________________**_________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> http://ffmpeg.org/mailman/**listinfo/ffmpeg-user<http://ffmpeg.org/mailman/listinfo/ffmpeg-user>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

More information about the ffmpeg-user mailing list