FFmpeg cannot extract correct first frame – always extract the second frame
I am on macos Ventura 13.2.1, on Macbook Pro M1Max.
The video is number counting animation video. From 2 to 125. The number on first frame is 2. The number on last frame is 125. The number plus one on each frame. You can download the video here.
NOTE that:
First, you hit space bar to play it in Finder, you can see the first frame of the video is number 2.
Second, in professional Video editing software – davinci resolve, on the timeline, you can see the first frame is number 2.
Now I try to use FFmpeg to extract the first frame of the video.
First Try:
ffmpeg -i /Users/chris/Downloads/2to125.mov -vframes 1 /Users/chris/Downloads/1.png
The output png image is number 3. So it’s actually the second frame.
Second try:
ffmpeg -i /Users/chris/Downloads/2to125.mov -frames:v 1 /Users/chris/Downloads/1.png
The output png image is still the second frame – the number 3.
Third try:
ffmpeg -i /Users/chris/Downloads/2to125.mov -vf "select=eq(n\,0)" -q:v 3 /Users/chris/Downloads/1.png
The output image is sitll the wrong second frame.
NOTE that:
first: all these three method are from internet. And a lot of people voted correct answer for this question.
second: all their output on my system is the incorrect second frame, not the first frame.
I cannot find what’s wrong. Hope friend here help me.
Read more here: Source link
