VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Hi guys,

    I was trying to downsize a mkv file by re-enconding it using "ffmpeg -i file_video.mkv -c:v libx264 -b:v 1000k -c:a aac -b:a 128k output.mp4" but after running that the audio is out of synch (sometimes just stops for a few frames.). Is there anything I can do to fix the mp4?

    Thanks guys.
    Quote Quote  
  2. You should add the video framerate with -vf fps=24000/1001 (for 23.976, as example).

    Code:
    ffmpeg -i file_video.mkv -vf fps=24000/1001 -c:v libx264 -b:v 1000k -c:a aac -b:a 128k output.mp4
    Quote Quote  
  3. Originally Posted by ProWo View Post
    You should add the video framerate with -vf fps=24000/1001 (for 23.976, as example).

    Code:
    ffmpeg -i file_video.mkv -vf fps=24000/1001 -c:v libx264 -b:v 1000k -c:a aac -b:a 128k output.mp4
    It kind worked but I still get a delay when i fast forward the video. The audio is synched but it takes a few seconds to play (the audio. the video is working). It's like it takes a few seconds to catch up with the video.
    Quote Quote  
  4. You might try inserting one of these:
    -c:a aac copy
    -c:a aac -b:a 128k -strict -2
    -c:a aac -b:a 128k -strict experimental

    If that fails you could try :
    -vsync -1
    or
    -async 1
    Depending on which way the audio is out of sync.
    Using ProWo's code with -vsync -1 &
    Code:
    ffmpeg -vsync -1 -i file_video.mkv -vf fps=24000/1001 -c:v libx264 -b:v 1000k -c:a aac copy output.mp4
    You can also open the video in VLC & check what the amount of delay is by using the k or j keys.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!