[FFmpeg-user] Extract image every x frames?
Peter B.
pb at das-werkstatt.com
Mon Aug 6 23:08:06 CEST 2012
On 08/06/2012 10:32 PM, Peter B. wrote:
> On 08/06/2012 06:25 PM, Roger Pack wrote:
>>> i may be wrong but "-r 1500" might do it
>> you could extract to images then select every 1500'th image.
>> -vf select='not(mod(n\,15))'
>>
>> might be helpful, too. "n" is frame number I...think...
>> -r
>>
> This one looks interesting!
> Will try.
>
Tried, but it didn't work as expected :(
I've tripple-checked the equation and it makes perfect sense...
It outputs frame 0 (correct), frame #1500 (correct) and then infinitely
write frame #1500 again and again... :(
The duration of the source video is 45000 frames at 25fps. The command
below exported 100 frames (should have been 30).
Anyone got any hint why this is happening?
Here's my commandline and console output:
//--------------------------
$ ffmpeg -i
../../DVA-Profession/fidelity_analyzer/test-video/dva_profession-testvideo-ffv1_yuv422p-45000frames_at_25fps.avi
-vf select='not(mod(n\,1500))' -f image2 -sameq -t 4 delme_images/%03d.jpg
//--------------------------
ffmpeg version N-43286-g7ae473e Copyright (c) 2000-2012 the FFmpeg
developers
built on Aug 6 2012 23:05:31 with gcc 4.6.1 (Ubuntu/Linaro
4.6.1-9ubuntu3)
configuration: --prefix=/usr/local
libavutil 51. 66.101 / 51. 66.101
libavcodec 54. 49.100 / 54. 49.100
libavformat 54. 22.101 / 54. 22.101
libavdevice 54. 2.100 / 54. 2.100
libavfilter 3. 5.102 / 3. 5.102
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
Input #0, avi, from
'../../DVA-Profession/fidelity_analyzer/test-video/dva_profession-testvideo-ffv1_yuv422p-45000frames_at_25fps.avi':
Metadata:
date : 2011-03-28T17:33
title : DVA Profession Test-Video (v0.1)
encoder : Lavf52.102.0
encoded_by : Österreichische Mediathek
Duration: 00:30:00.00, start: 0.000000, bitrate: 6924 kb/s
Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), yuv422p, 720x576, 25
tbr, 25 tbn, 25 tbc
Output #0, image2, to 'delme_images/%03d.jpg':
Metadata:
date : 2011-03-28T17:33
title : DVA Profession Test-Video (v0.1)
encoded_by : Österreichische Mediathek
encoder : Lavf54.22.101
Stream #0:0: Video: mjpeg, yuvj422p, 720x576, q=2-31, 200 kb/s, 90k
tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (ffv1 -> mjpeg)
Press [q] to stop, [?] for help
frame= 100 fps=9.1 q=0.0 Lsize= 0kB time=00:00:04.00 bitrate=
0.0kbits/s dup=1499 drop=0
video:9665kB audio:0kB subtitle:0 global headers:0kB muxing overhead
-100.000000%
Thanks,
Pb
More information about the ffmpeg-user
mailing list