FFmpeg concat video and audio out of sync

前端 未结 5 1410
死守一世寂寞
死守一世寂寞 2020-12-13 14:37

Joining multiple files using ffmpeg concat seems to result in a mismatch of the timestamps or offsets for the audio. I\'ve tried with several videos and noticed the same pro

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-13 15:03

    I have been struggling with this one for quite some time as well. Particularly when working with Panasonic AVCHD-generated MTS files. My current solution is to concatenate them on the OS level not ffmpeg. I do this on windows and it looks something like this:

    COPY /b input_1.mts + input_2.mts + input_3.mts output.mts
    

    On linux it should be something like:

    $ cat input_1.mts input_2.mts input_3.mts > output.mts
    

    You can look up documentation for the windows and linux binary concatenation.

    This method of concatenation as apposed to transcoding is the way to go if the original format will work for you. This method practically uses no CPU processing and preserves the original quality. A win-win when dealing with bulk media of high quality.

提交回复
热议问题