View Full Version : [SOLVED] Extract every 250th frame from video?
cord-factor
31st August 2010, 16:42
Subj. How can I do that?
I have 1 hour video and I have to do "Time-lapse (http://en.wikipedia.org/wiki/Time-lapse)" clip from it. Video is HDV (progressive, 25fps).
Which software can extract every 250th frame?
Next, the frame-sequence will be converted to video by mencoder (like this)
mencoder "mf://*.jpg" -mf fps=25 -o output.avi -ovc lavc -lavcopts vcodec=mpeg4
Guest
31st August 2010, 18:13
Avisynth:
SelectEvery(250,0)
kypec
31st August 2010, 18:51
Is Avisynth working in Linux???
cord-factor
31st August 2010, 19:04
No, linux only solution. And, I don't use wine.
However, ffmpeg seems to can do that:
ffmpeg -i 02.m2t -y -an -sameq -s 1920x1080 -f image2 -r 1/10 nome%03d.png
it creates some PNG's, but I am not sure, is it correct frames...
nm
31st August 2010, 19:25
How about encoding directly with MEncoder? This avoids unnecessary colorspace conversion (YUV->RGB->YUV) and writing temporary image files on disk:
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:vqscale=3 -vf framestep=250 -fps 6250 -ofps 25 input.m2t -o output.avi
Note the relation of framestep, ofps and fps: 250*25=6250. If you meant to encode every 10th frame (10x speedup instead of 250x), it would be -vf framestep=10 -fps 250 -ofps 25.
cord-factor
1st September 2010, 16:14
How about encoding directly with MEncoder? This avoids unnecessary colorspace conversion (YUV->RGB->YUV) and writing temporary image files on disk:
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:vqscale=3 -vf framestep=250 -fps 6250 -ofps 25 input.m2t -o output.avi
Note the relation of framestep, ofps and fps: 250*25=6250. If you meant to encode every 10th frame (10x speedup instead of 250x), it would be -vf framestep=10 -fps 250 -ofps 25.
Thx, It works :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.