FFmpeg convert video w/ dropped frames, out of sync
Posted
by
preahkumpii
on Super User
See other posts from Super User
or by preahkumpii
Published on 2012-06-13T08:49:26Z
Indexed on
2012/06/13
10:43 UTC
Read the original article
Hit count: 281
I recorded a video using Bandicam with the MJPEG encoder to get the least amount of lag. Now, I am trying to convert that massive file to a h264 avi using ffmpeg. I know there are dropped frames in the video stream...more than 100 in the first two minutes, which I assume is simply because Bandicam dropped some when it couldn't keep up. So, when I convert the file to h264, the video and audio are out of sync, and appear to be more and more out of sync as output video progresses. Here is my basic command in ffmpeg:
ffmpeg -i "C:\...\input.avi" -vcodec libx264 -q 5 -acodec libmp3lame -ar 44100 -ac 2 -b:a 128k "C:\...\output.avi"
I have tried EVERYTHING I can think of including:
-itsoffset [-]00:00:01
Tried this before and after input file. This doesn't work because as the video progresses it becomes more and more out of sync.
-async 1
Doesn't work.
-vsync 1
Doesn't work, but it does show dropped frames being duplicated.
Two inputs of same file with mapping using -map 0:0 -map 1:1
. Doesn't work.
The source plays just fine. Any ideas how to convert it with ffmpeg and keep the audio and video synced? Thanks.
© Super User or respective owner