You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have labelled the videos every 1 second, and am trying to extract annotations every every 1 second along with the associated frame in the video using ffmpeg. I have uploaded 60fps videos. For some videos, the frame I extract using ffmpeg aligns with the 1 second intervals in the beaverdam player exactly as expected (i.e. 1s in beaverdam player = 60th frame using ffmpeg, 2s = 120th frame).
However, for many videos, there is a discrepancy between the 1,2,3...s mark in the beaverdam player, and the frame extracted via ffmpeg/vlc at that time stamp. It seems 1s = ~22nd frame, 2s = ~84th frame, 3s = 140th frame, but no clear relationship exists.
Could you please shed some light as to why this may be happening? My annotations rely on being able to extract the exact frame where the labels were created (1 second intervals). Thanks greatly for your help.
The text was updated successfully, but these errors were encountered:
The player in BeaverDam is just the standard HTML5 video player. I think it has some weirder behavior on the timestamps between frames? If it has a discrepancy with ffmpeg frames and it's important to you, consider using image lists instead, or look into HTML5 video players
The discrepancy you're seeing might be due to the videos having either a constant frame rate (CFR) or variable frame rate (VFR). If this theory is correct, the videos that align correctly are with CFR and the ones that don't are with VFR.
You can check this by running the following command (tested with ffmpeg v4.2.1):
ffmpeg -i input.mp4 -vf vfrdet -f null -
The output should tell you whether or not the video has a variable frame rate. For example, an output of:
means that 15818 frames have variable frame rate and 22777 have constant bitrate.
Note: I also rely on being able to extract exact frames for my workflow and have been playing around to see how this can be done with this tool. I found that creating a test video that has the frame number overlaid on each frame has been helpful. You can do this with ffmpeg very easily:
Hi,
I have labelled the videos every 1 second, and am trying to extract annotations every every 1 second along with the associated frame in the video using ffmpeg. I have uploaded 60fps videos. For some videos, the frame I extract using ffmpeg aligns with the 1 second intervals in the beaverdam player exactly as expected (i.e. 1s in beaverdam player = 60th frame using ffmpeg, 2s = 120th frame).
However, for many videos, there is a discrepancy between the 1,2,3...s mark in the beaverdam player, and the frame extracted via ffmpeg/vlc at that time stamp. It seems 1s = ~22nd frame, 2s = ~84th frame, 3s = 140th frame, but no clear relationship exists.
Could you please shed some light as to why this may be happening? My annotations rely on being able to extract the exact frame where the labels were created (1 second intervals). Thanks greatly for your help.
The text was updated successfully, but these errors were encountered: