Reputation: 323
I want to record video from a camera, save it to file, and at the same time have access to the last frame recorded.
One idea would be to use ffmpeg's Multiple Outputs functionality where I split the stream into two, one gets saved to file, one spits out the last recorded frame (ideally, the frames won't need to be written to disk, but piped onwards for processing).
What I don't know is how to get ffmpeg to spit "the last frame" from a stream.
Any ideas?
Upvotes: 0
Views: 559
Reputation: 133873
ffmpeg -i input.foo outputvideo.mp4 -r 1 -update 1 image.jpg
ffmpeg -i input.foo outputvideo.mp4 -r 1 images_%04d.jpg
images_0001.jpg
, images_0002.jpg
, etc.Upvotes: 1