I’m splitting a long video (around 2 hours) into smaller chunks using ffmpeg commands like:
ffmpeg -i input.mp4 -ss START_SECOND -t LENGTH -c copy -reset_timestamps 1 -y chunk_X.mp4
Then, I’m concatenating the resulting chunks using a concat list file:
ffmpeg -f concat -safe 0 -i list.txt -c copy -y merged_output.mp4
So the chunks always come from the same file, and have the same codec/size/bitrate.
My goal is to avoid re-encoding the entire video to keep the process fast. However, I’m noticing that after the final merge, the audio in some parts of the merged video is out of sync with the video. The first chunk seems fine, but from the second chunk onward, the audio often drifts out of sync.
What could be causing the audio desynchronization, and how can I correctly extract and merge the chunks without losing A/V sync, while still avoiding a full re-encode?
I tried to first pass in -ss
before -i
to cut on keyframes, but I get the same result.