I have some footage of episodes from a show, with each episode in its own MKV file.
I would like to append each of these episodes to another MKV (an opening for the show), so that in the end I will have an MKV for each episode that has this other MKV “prepended” to it.
The opening MKV had to have its video stream re-encoded from MPEG-2 to H.264. I was able to match the stream settings to the episodes’ stream settings enough to make it mkvmerge-able with the episode footage (also H.264).
The problem I’m having is that the resulting MKV (opening + episode) suffers considerable de-coloration in the episode’s footage (see below, left).
I’ve read around on the internet about mkvmerge, and people have said that it doesn’t do any re-encoding of the video stream. I’m inclined to believe this given how quickly it completes, but it definitely appears to be doing something.
One other “video concatenation” solution I’ve tried is using ffmpeg’s concat demuxer. This method produces the footage I want (ie, w/o the discoloration above), but it has its own downsides (like stripping away all of the chapter metadata).
What I’m mostly interested in is how the mkvmerge and ffmpeg solutions differ in their processing of the video files to produce these different results. I’m no expert in any of this, so I’m sure there’s a lot I’m missing, but conceptually it seems like they should both just copy the video stream, and only ffmpeg appears to be doing that.
Some other experimentation I’ve done:
- Instead of appending the episode to the opening, I tried appending the opening to the episode just to see if that would make a difference in color, and it did. The color in the episode footage is restored to what it should be (of course, the problem with this is that the opening now plays after the show ends!).
- I ran the episode footage through a bitstream filter per the answer here, thinking that the episode’s “stream configuration” (for lack of a better term) is being supplanted by that of the opening. This significantly improved the color in the episode, but it’s still not perfect.
Thank you!