i use follow video to test
I need extract frames exact on each second.
f1.png should be 00:00:01.000
f2.png should be 00:00:02.000
and so on.
i have two variants of command line
This one give me follow results:Code:-y -i "10 Minutes Countdown.webm" -an -r 1 -ss 1 -f image2 test_out\f%%d.png
There is acceptable for rounding precision. ( 1.917 or 2.000 does not matter )f1.png - 00:00:01.000
f2.png - 00:00:01.042
f3.png - 00:00:01.917
f4.png - 00:00:02.917
f5.png - 00:00:03.917
f6.png - 00:00:04.875
but why first 2 frames is so strange ?
-ss 1 optional - without it result is same but starting from 0.
this variant give me exact what i need. but command line is too long. for long video need split for several runs.Code:-y -i "10 Minutes Countdown.webm" -an -f image2 -ss 1 -vframes 1 test_out2\f1.png -ss 2 -vframes 1 test_out2\f2.png -ss 3 -vframes 1 test_out2\f3.png -ss 4 -vframes 1 test_out2\f4.png ........
AND processing by this way is too slow.
+ Reply to Thread
Results 1 to 7 of 7
Last edited by mogadanez; 3rd May 2012 at 08:03.
1. quick&dirty solution: save all frames, delete all the frame you don't want,..
(ffmpeg -i "Path to input" "Path to outputfolder\output%d.png", mencoder or Avisynth&Imagewriter, or Virtual Dub should be able to produce the clip->png transition)
Pro: works and is relatively fast
Contra: high hdd space requirement, needs automated way to delete unwanted images
2. write a long avisynth script with a lot of ImageWriter(file="Output folder\Basename",start=0375,end=0375,type="png") entries run through the avisynth script with i.e. AVSMeter
Selur , if you are using avisynth can't you just do SelectEvery? So you don't need to delete images
ImageWriter("Output%03d.png", 0,1000) # use different endpoint if you want
What I don't get is the frames are perfect 00:00:00:00, 00:00:01:00, etc... but at 41 seconds, it becomes 00:00:41:042 ? (no longer 000 at the end). The internal timebase is corrected for 24.0 with AssumeFPS, not 24000/1001 as the original, and SelectEvery makes it so it's exactly 1 FPS
EDIT: OK I see 00:00:41:000 doesn't exist in original file because of the original timebase of 23.976 (24000/1001)
Last edited by poisondeathray; 4th May 2012 at 10:17.
there are probably a lot more ways this can be done in avisynth,..
OK I see 00:00:41:000 doesn't exist in original file because of the original timebase of 23.976 (24000/1001)
I think there might be rounding errors in his overlay information for the video. It doesn't conform to 24.0 or 24000/1001, but the encoded video timebase is 24000/1001. On frame 960, for a 24.0 clip it should read 00:00:40.000 (which his does), but 00:00:41:000 should exist on frame 984 (his is missing the frame). And on a 24000/1001 clip it should read 00:00:40.040 on frame 960 , not 00:00:40.000
On a 24.0 clip, there should be frames with whole seconds with none missing
You can check with these
blankclip(length=5000) assumefps(24000,1001) showtime
blankclip(length=5000) assumefps(24) showtime
So there are workarounds in avisynth, but I still don't understand why ffmpeg screws up the first few frames ? (ffmbc had same behaviour too)
Last edited by poisondeathray; 4th May 2012 at 10:49.
that's probably a seeking+decoding problem,... (if it's a VP8 source you would have far more problems,.. since ffmpeg should behave like ffmpegsource, see: https://forum.videohelp.com/threads/345279-VP8-vs-x264)
ffmpeg seeking & decoding issue? It does the same behaviour with lossless encode or I-frame made video
Or did you mean the timebase discrepancy? I tested using ffmpegsource2, with the flv (i didn't even bother with the VP8 version, because of your testing in those threads). Also indexed raw avc show discrepancy in the overlay
But even on properly made video, ffmpeg still has those messed up first few frames (There's 2 different issues here, the overlay error, and the original issue with ffmpeg)