ffmpeg: Combine/merge multiple mp4 videos not working, output only contains the first video

前端 未结 10 895
逝去的感伤
逝去的感伤 2020-12-22 22:48

Here is the command I am using to combine multiple videos:

ffmpeg -i 75_540_38HQ2.mp4 -i 76_70_20.mp4 -i 76_173_80.mp4 -i 81_186_35.mp4 -vcodec copy -acodec copy M         


        
10条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-22 23:10

    MP4Box does work without breaking the audio. I did the following to obtain good results:

    1. Download the latest Linux deb build from the gpac web site: http://gpac.wp.mines-telecom.fr/downloads/gpac-nightly-builds/

    2. Use the -force-cat option

    Sample command line:

    MP4Box -force-cat -add in1.mp4 -cat in2.mp4 -cat in3.mp4 ... out.mp4
    

    Some minor comments:

    1. The above way is important, as the latest version of MP4Box distributed with Linux Mint 13 is buggy, and does result in corrupted audio.

    2. -force-cat is important, as the video format tag was changed from AVC to avc3 without it.

提交回复
热议问题