VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. Member
    Join Date
    Dec 2006
    Location
    Bangladesh
    Search Comp PM
    i am having issue, to concat video, it looses the audio sync and audio started from previous video.

    here is the code i am trying:

    1: re-encode file a (1):

    Code:
    ffmpeg.exe -i "f:\1.avi" -af apad -vf scale=1280:720 -crf 15.0 -vcodec libx264 -acodec aac -ar 48000 -b:a 192k -coder 1 -rc_lookahead 60 -threads 0 -shortest -avoid_negative_ts make_zero -fflags +genpts 01.mp4
    2: re-encode file b (2):

    Code:
    ffmpeg.exe -i "f:\2.mp4" -af apad -vf scale=1280:720 -crf 15.0 -vcodec libx264 -acodec aac -ar 48000 -b:a 192k -coder 1 -rc_lookahead 60 -threads 0 -shortest -avoid_negative_ts make_zero -fflags +genpts 02.mp4
    3: Now contact using following command:

    Code:
    ffmpeg.exe -f concat -safe 0 -i "f:\files.txt" -c copy test.mp4
    but audio is not synced with video ;(

    i also uploaded both video (and also the output) on dropbox:

    Video Sync Issue Source And Result Files

    so, any help, how to make audio perfectly sync with video would be great
    Quote Quote  
  2. You need to match the framerate of the 1st file (e.g. add -r 25 as an output option)

    Code:
    ffmpeg.exe -i "f:\1.avi" -r 25 -af apad -vf scale=1280:720 -crf 15.0 -vcodec libx264 -acodec aac -ar 48000 -b:a 192k -coder 1 -rc_lookahead 60 -threads 0 -shortest -avoid_negative_ts make_zero -fflags +genpts 01.mp4
    Quote Quote  
  3. Member
    Join Date
    Dec 2006
    Location
    Bangladesh
    Search Comp PM
    Originally Posted by poisondeathray View Post
    You need to match the framerate of the 1st file (e.g. add -r 25 as an output option)
    oh! man, i was so dumb, i was concerned about same frame/video size, codec etc, but forgot about the frame rate and passed too many hours to figure out ;(

    thanks a lot you have saved my day.

    You OWE me 1 ton of thanks..

    best regards
    Quote Quote  



Similar Threads

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