lisamelton / video_transcoding

Tools to transcode, inspect and convert videos.
MIT License
2.39k stars 160 forks source link

Advice on how to combine/append two MKVs into one transcoded MP4 #199

Closed ddribin closed 6 years ago

ddribin commented 6 years ago

I used MakeMKV to rip a DVD I have and it resulted in two title files: title00.mkv and title001.mkv. Is there a way to combine them when doing the transcode? I'd actually to put title001.mkv first.

I tried using mkvmerge on them:

mkvmerge -o dvd.mkv title01.mkv title00.mkv

But using transcode-video on dvd.mkv only transcoded the first title.

I tried using the "append" option of mkvmerge, and I got this ominous warning:

% mkvmerge -o dvd-append.mkv title01.mkv + title00.mkv
...
No append mapping was given for the file no. 1 ('title00.mkv'). A default mapping of 1:0:0:0,1:1:0:1 will be used instead. Please keep that in mind if mkvmerge aborts with an error message regarding invalid '--append-to' options.
Warning: The track number 0 from the file 'title00.mkv' can probably not be appended correctly to the track number 0 from the file 'title01.mkv': The codec's private data does not match (lengths: 98 and 523). Please make sure that the resulting file plays correctly the whole time. The author of this program will probably not give support for playback issues with the resulting file.

Despite this warning, I ran transcode-video on dvd-append.mkv and it seemed to work. The resulting MP4 looks fine.

Is there perhaps a better way to do what I want?

Thanks,

-Dave

lisamelton commented 6 years ago

@ddribin No, using the + is the simpler syntax for appending files with mkvmerge. Since you didn't supply a --append-to option, hence the peculiar warning, you got the default or standard mapping. Which was fine seeing as how transcode-video didn't have any problem with it.

The curious thing is why MakeMKV gave you two files in the first place. Are you sure you selected the correct playlist for extraction?

ddribin commented 6 years ago

It's probably the oddball DVD I have? It's called "The Theory and Practice of Juggling" and I bought it 8 or 9 years ago. Looks like they now sell it as 15 separate downloadable video files:

http://thewjfstore.com/item/5715892c6edca00338d953a6

In any case, here's the MakeMKV screen shot:

makemkv

If I click on "Make MKV" I get two files, one for each title. title00.mkv is a short ~6 minute video. It corresponds to the PracticeExhibition.mov file in the new version. title01.mkv is a 1.5 hour video for all the other stuff. I didn't see a way to have MakeMKV create a single file for both titles.

ddribin commented 6 years ago

Also, even if I use --append-to, I still get this warning:

Warning: The track number 0 from the file 'title00.mkv' can probably not be appended correctly to the track number 0 from the file 'title01.mkv': The codec's private data does not match (lengths: 98 and 523). Please make sure that the resulting file plays correctly the whole time. The author of this program will probably not give support for playback issues with the resulting file.

I don't get that warning. Why is it a problem that the lengths are different? Seems like that would be not uncommon for appending.

lisamelton commented 6 years ago

@ddribin Ah. Yeah, that's a weird DVD. Mastering of discs can be... random at times. :)

As to mkvmerge and it's overly cautious warnings, I have no idea. And I agree, your scenario seems like the common behavior for appending. Go figure.

ddribin commented 6 years ago

Alright, we can close this issue, then. Sounds like it's just an oddball DVD and mkvmerge did work, despite the warning, so there's nothing actionable here.

lisamelton commented 6 years ago

@ddribin Thanks. Hopefully we can find a bug next time. :)