Concatenate files and maintain all subtitle and audio tracks
I've ripped a movie that is split into two parts. I wish to concatenate it, but maintain all audio and subtitle files.
A simple concatenation will join the two video files with the main audio, but not the other audio tracks, and none of the subtitles:
ffmpeg \
-f concat -i videofiles.txt \
-c copy -map 0 movie.mkv
where videofiles.txt is a list of the original two files.
I found the following command to concatenate subtitles:
ffmpeg \
-f concat -safe 0 -i videofiles.txt \
-f concat -safe 0 -i subfiles.txt \
-map 0:v -map 1 -c:v copy -c:s copy movie.mkv
This joined the two video files, but none of the audio tracks, and the subtitles only appeared for the first half of the movie.
As this is a rip, the subtitles I have extracted with mkvextract are in the .sub/.idx format, so I thought I'd need to include both in order to make this work:
ffmpeg \
-f concat -safe 0 -i videofiles.txt \
-f concat -safe 0 -i subfiles.txt \
-f concat -safe 0 -i idxfiles.txt \
-map 0:v -map 1 -c:v copy -c:s copy movie.mkv
But this yielded the same results. No audio, and only half of the subtitles.
It should probably be noted that ffmpeg is confusing for me, and I don't even know half of what these options are trying to do in these commands, since the places where I got them just say "enter this here", rather than explaining what each option does. As such, I don't know what I can change, and what I can keep the same.