[FFmpeg-user] Trying to get the last frame from a live FLV stream
andrey.krieger.utkin at gmail.com
Tue Sep 3 20:24:12 CEST 2013
2013/9/2 Eugene M <floyd311 at gmail.com>:
> Hi everyone
> I'm trying to get a single frame from given live stream:
> ffmpeg -i
> 1 -y frame.jpg
> What I expect here is the very last frame from the stream. But when I run
> ffmpeg with this options repeatedly several times per second I receive the
> same frame which changes (roughly) every 10 seconds.
> The stream itself plays smoothly and I can save it as an animated GIF or as
> a sequence of separate frames (when using something like frame_%09d.jpg).
> In that case there are no any lagging frames.
> I suppose that the "lagging frame" is some kind os keyframe or something
> like that. By the way, there is a line in program
> output<http://pastebin.com/YHBcsAr7>that says "[flv @
> 00000000027da340] Stream discovered after head already
> parsed". Is it connected somehow with my problem?
> I'm doing this because I need separate frames saved as still(!) GIFs, so I
> am running ffmpeg reepatedly as described above.
> Any ideas on how I can receive really the last up-to-date frame from a live
Try something like
ffmpeg -i http://blah -filter:v fps=fps=0.1 -vcodec gif -f image2
-update 1 last.gif
It will rewrite last.gif file with the frame from input stream, once
each 10 seconds (i.e. at 0.1 fps rate).
More information about the ffmpeg-user