[FFmpeg-user] Setting the frame number as the filename while frame extraction

Rohit powerohit at gmail.com
Wed Jan 7 19:42:03 CET 2015


The following command line extracts the I frames from the video

ffmpeg -i input.flv -f image2 -vf "select='eq(pict_type,PICT_TYPE_I)'"
-vsync vfr thumb%04d.png

But the frames are sequentially numbered ..like thumb0001,2,3,4,5....
Suppose the 9th frame is an I frame then I want the the extracted frame's
file name as 'thumb9.png'...suppose if 18th frame is the next I frame then
the extracted frame's filename should be 'thumb18.png' or '18.png'...

How to achieve this? Thanks in advance...



--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Setting-the-frame-number-as-the-filename-while-frame-extraction-tp4668786.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list