0

I am looking to concatenate a list of videos using ffmpeg that are of different sources, but the audio always goes out of sync and sometimes the playback speed goes wild.

Even in the case of preconverting them separately to the same codec/size/frame rate, then trying to mux them together with codec copy, i get the same issues, so it must be something about mapping or timings.

I am using the following parameters

ffmpeg -f concat -safe 0 -i list.txt -map_metadata -1 -vf scale=480x270 -c:v libx265 -preset ultrafast -flags2 "fast" -vb 150k -max_interleave_delta 0 -r 22 -c:a opus -ab 30k -ac 1 -strict -2 -x265-params "--pmode --pme --ctu=32 --merange=20" output.mkv

I have tried -max_interleave_delta 0 and disabling the experimental 'opus' codec and the nonstandard -flags2 "fast". The result is still broken

These are the warnings i get in the output: [mov,mp4,m4a,3gp,3g2,mj2 @ 0x561090282280] Auto-inserting h264_mp4toannexb bitstream filter [concat @ 0x56108d88f400] DTS 1498384 < 4488000 out of order

If this is very hard to pull off, would you suggest using something other than ffmpeg?

Hitman47
  • 25
  • 5

0 Answers0