Using ffmpeg to extract every n frames from a given range of an m2ts video

AI Thread Summary
To extract every second from a specific segment of a video using FFmpeg, the command should include the -ss option to specify the start time and the -t option to define the duration. For a video titled myvideo.m2ts, to extract frames from 54 minutes to 55 minutes, the command would be: ffmpeg -ss 3240 -t 60 -i myvideo.m2ts -r 1 output_%04d.png. This effectively captures one frame per second for the desired one-minute interval.
member 428835
Hi PF!

I have a video titled myvideo.m2ts that is 2 hours long at 60 fps. I would like to extract every second from 54 min to 55 min via ffmpeg. It looks like I would execute something similar to this: ffmpeg -i myvideo.m2ts -r 1 output_%04d.png except this will run the entire video. Any help is greatly appreciated!
 
Computer science news on Phys.org
Use the -ss option before the -i option like:
Code:
ffmpeg -ss 3240 -i myvideo.m2ts -r 1 output_%04d.png
as described in the online manual: https://ffmpeg.org/ffmpeg.html#toc-Main-options

Edit: oh, you only want 1 minute: use the -t option as well:
Code:
ffmpeg -ss 3240 -t 60 -i myvideo.m2ts -r 1 output_%04d.png
 
  • Like
Likes sysprog and member 428835
Amazing, thanks so much!
 
I have been idly browsing what Apple have to offer with their new iPhone17. There is mention of 'Vapour cooling' to deal with the heat generated. Would that be the same sort of idea that was used in 'Heat Pipes' where water evaporated at the processor end and liquid water was returned from the cool end and back along a wick. At the extreme high power end, Vapour Phase Cooling has been used in multi-kW RF transmitters where (pure) water was pumped to the Anode / or alternative Collector and...

Similar threads

Back
Top