I converted a DVD into MKV files using MakeMKV, but since the main feature is made up of multiple titles, I combined them into one using MKVToolNix, which worked as expected. This video is made up of 8 titles, 4 of which have an audio commentary track, which I'm trying to concat to add to the combined video as a single track.
I extracted the audio track from each video like so:
ffmpeg -i 01.mkv -map 0:a:0 -c copy 01.ac3 (standard audio)
ffmpeg -i 03.mkv -map 0:a:1 -c copy 03.ac3 (commentary audio)
Then I added each file name to a text file and concatenated them using:
ffmpeg -f concat -safe 0 -i audio_list.txt -c copy combined_audio.ac3
The length appears to match the video file, which I added via MKVToolNix, but as the video plays, the audio becomes out of sync.
I did some Googling and made sure that the audio tracks all have the same bitrate (224 kbps), codec (ac3), and layout (stereo). I also tried enforcing a frame rate of 29.97 fps, but it didn't make a difference, so I'm not sure what the issue is. I can provide any further details
EDIT: I re-encoded the combined video and then added the commentary track, which didn't create any sync issues this time. I'm not sure what's wrong with the video concatenated, but this is how I created it:
ffmpeg -f concat -safe 0 -i file_list.txt -c copy main_output.mkv