So verketten Sie MKVs mit verschiedenen Spuren

977
Dave

Ich habe einen mkvFilm und einen separaten Film mkvmit einer Einführung des Regisseurs. Ich versuche zu verwenden, mkvmergeum sie zu verketten. Der Film hat jedoch Untertitel und das Intro hat keine Untertitel, und dies scheint ein Problem zu verursachen.

Im Einzelnen mkvinfo intro.mkvlautet die Spurausgabe von :

| + A track | + Track number: 1 (track ID for mkvmerge & mkvextract: 0) | + Track UID: 1 | + Track type: video | + Default flag: 0 | + Lacing flag: 0 | + MinCache: 2 | + Codec ID: V_MPEG2 | + CodecPrivate, length 164 | + Default duration: 33.367ms (29.970 frames/fields per second for a video track) | + Video track | + Pixel width: 720 | + Pixel height: 480 | + Display width: 853 | + Display height: 480 | + A track | + Track number: 2 (track ID for mkvmerge & mkvextract: 1) | + Track UID: 2 | + Track type: audio | + Codec ID: A_AC3 | + Default duration: 32.000ms (31.250 frames/fields per second for a video track) | + Name: Stereo | + Audio track | + Sampling frequency: 48000 | + Channels: 2

und mkvinfo film.mkvgibt:

| + A track | + Track number: 1 (track ID for mkvmerge & mkvextract: 0) | + Track UID: 1 | + Track type: video | + Default flag: 0 | + Lacing flag: 0 | + MinCache: 1 | + Codec ID: V_MS/VFW/FOURCC | + CodecPrivate, length 74 (FourCC: 0x57564331 "WVC1": VC-1) | + Default duration: 41.708ms (23.976 frames/fields per second for a video track) | + Video track | + Pixel width: 1920 | + Pixel height: 1080 | + Display width: 1920 | + Display height: 1080 | + A track | + Track number: 2 (track ID for mkvmerge & mkvextract: 1) | + Track UID: 2 | + Track type: audio | + Codec ID: A_AC3 | + Default duration: 32.000ms (31.250 frames/fields per second for a video track) | + Name: Surround 5.1 | + Audio track | + Sampling frequency: 48000 | + Channels: 6 | + A track | + Track number: 3 (track ID for mkvmerge & mkvextract: 2) | + Track UID: 4 | + Track type: subtitles | + Default flag: 0 | + Lacing flag: 0 | + Codec ID: S_HDMV/PGS | + Content encodings | + Content encoding | + Content compression

Ich habe es versucht, mkvmerge -o full.mkv intro.mkv + film.mkvaber das gibt mir

Error: The file no. 0 ('intro.mkv') does not contain a track with the ID 2, or that track is not to be copied. Therefore no track can be appended to it. The argument for '--append-to' was invalid. 

Es ist mir auf der Manpage nicht klar, mkvmergewie man festlegen soll, --append-todass der Intro-Track keine Untertitel haben sollte und die Timecodes für die Untertitel des Films einfach verschoben werden können. Ist das jenseits der Möglichkeiten von mkvmerge?

Vielleicht muss ich mich mit einem anderen Tool befassen, wie ffmpegzum Beispiel, um das Audio / Video zu verketten, mkvextractund dann ein anderes Tool, um die PGS-Subs und mkvmergesie alle wieder zusammen zu manipulieren ?

Habe ich weitere Probleme, weil sich die Audio- / Video-Dateien auch zwischen den beiden Dateien unterscheiden (z. B. Stereo vs 5.1)?

Vielen Dank

2

1 Antwort auf die Frage

0
GwenKillerby

Your problems are caused because the two videos are fully different, not (just) because of the subs.

How to concatenate MKVs with different tracks

The quick answer is uncompress your audio tracks (to say, WAV), mux them (stitch them together) and then compress the audio (to say, AC3)

The best way to do this is to convert the soundtrack to uncompressed WAV, (to prevent out-of-sync), separately for each MKV-file. Then concantenate and then recode them but don't recode the video stream, just the audiostream to a compressed format (MP3, AAC or AC3)

The above in steps:
1. Blow up the audio for each file, to an uncompressed format
2. Stitch them together.
3. Recode only audio to a compressed status

After 2, you should check if your audio is really sync.

You can do all of this with VirtualDub, or AviDemux 2.6.12 (set Video Output to copy), these are free and not malware.

Perhaps I need to be looking into some other tool like ffmpeg to concatenate the audio/video from mkvextract and then some other tool to manipulate the PGS subs and them mkvmerge them all together again?

If you don't have denominational issues with Windows, rather than Linux, you could also convert your subs to ".SRT" format, and use that. I'm inclined to think it's easier to work with a text based format, than with a picture based format. Up to you.

Am I going to run into further problems because the audio/video differ between the two files as well (e.g. stereo vs 5.1)?

In general, YES! The 2 audio tracks should have as identical characteristics as possible, so both stereo, this is the easiest because it's the most universal. Don't use 5.1, unless you are in a theater.

Your videos should be the same width and heigth, so either 1920 x 1080 or 720 x 480 My advice is to edit the shorter intro video. You can choose between:
- adding a border (but, it will be a tiny image)
- increase the width x height to 1920 x 1080 (but, it will be grainy)
- do both, half way, to split the difference. In your case this means:
a. increase the width x height to 1440 x 640
b. add a border of 240 - (1920-1440)/2 - left and right and a border of 220 - (1080-640)/2 to top and bottom.