[Libav-user] How can i suspend ffmpeg's file reading?
René J.V. Bertin
rjvbertin at gmail.com
Fri Dec 7 11:32:15 CET 2012
Hello Jack
How do you launch ffmpeg and on what os? If you have a process id for it, you could sigstop/suspend it while you wait for data, but that too would of course halt the playing. I've never tried, but I suspect that it would however resume playing when you sigcont/release the process.
Alternatively, buffer your stream, measuring download speed and expected bitrate during playback, so that you can launch ffmpeg only when you have downloaded enough content to be reasonably sure that you won't catch up with the download head. This is more or less how QuickTime handles streaming playback, but it isn't failure proof against net congestion or other unforeseen events.
René
Quy Pham Sy <phamsyquybk at gmail.com> wrote:
>Hi,
>
>My ffmpeg-based player plays a mpeg-ts file that downloaded from a
>server.
>I want my player be able to play the video file
>even when it is being downloaded.
>
>There is no problem if the download speed is faster than reading speed,
>otherwise, it just stop playing.
>My question is that is there anyway to suspend ffmpeg file reading to
>wait
>for data available to proceed?
>
>Thanks
>Jack
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Libav-user mailing list
>Libav-user at ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/libav-user
More information about the Libav-user
mailing list