Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
differing track order mkvmerge / ffprobe
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 446

PostPosted: Thu Jul 04, 2013 5:43 pm    Post subject: differing track order mkvmerge / ffprobe Reply with quote

As you might be able to tell from my other posts, I am working with turning ripped vobs into mkv's. The only problem I have now is labeling the audio tracks properly. The problem seems to be that mkv has a strange order for its track order.
Code:
$ mkvmerge -i Input.vob
File 'Input.vob': container: MPEG program stream
Track ID 0: video (MPEG-2)
Track ID 1: audio (AC3)
Track ID 2: audio (AC3)
Track ID 3: audio (AC3)
Track ID 4: audio (DTS)
$ ffprobe Input.vob
...
Input #0, mpeg, from 'Input.vob':
  Duration: 02:20:42.75, start: 0.280633, bitrate: 7428 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 32:27 DAR 16:9], 7701 kb/s, 26.33 fps, 59.94 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, 5.1(side), s16, 448 kb/s
    Stream #0:2[0x81]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:3[0x8a]: Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 768 kb/s
    Stream #0:4[0x83]: Audio: ac3, 48000 Hz, 5.1(side), s16, 384 kb/s
    Stream #0:5[0x20]: Subtitle: dvd_subtitle
$lsdvd -a -t1                           
libdvdread: Using libdvdcss version 1.2.13 for DVD access
Disc Title: Input
Title: 01, Length: 02:20:35.333 Chapters: 23, Cells: 24, Audio streams: 04, Subpictures: 04
        Audio: 1, Language: en - English, Format: ac3, Frequency: 48000, Quantization: drc, Channels: 6, AP: 0, Content: Undefined, Stream id: 0x80
        Audio: 2, Language: en - English, Format: ac3, Frequency: 48000, Quantization: drc, Channels: 2, AP: 0, Content: Undefined, Stream id: 0x81
        Audio: 3, Language: en - English, Format: dts, Frequency: 48000, Quantization: drc, Channels: 6, AP: 0, Content: Undefined, Stream id: 0x8a
        Audio: 4, Language: fr - Francais, Format: ac3, Frequency: 48000, Quantization: drc, Channels: 6, AP: 0, Content: Undefined, Stream id: 0x83

So AFAICT lsdvd and ffprobe agree on the track order but mkvmerge disagrees (note the format of the last two tracks) I want to use the language labels from the dvd on the mkvmerge run, but I can't if mkvmerge doesn't use the same track order. Any suggestions on how to do this without manual intervention?
Back to top
View user's profile Send private message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 446

PostPosted: Thu Jul 04, 2013 9:05 pm    Post subject: Reply with quote

Made something of a workaround.

If I run the vob through ffmpeg it keeps the order of the audio tracks and then everyone agrees on the order.
Code:
$ffmpeg  -v warning -i  Input.vob  -map 0:a -c copy Input-audio.mkv


Then, I put it back together with something like
Code:
$mkvmerge --default-language en -o Out.mkv  -A -S Input.vob --language 0:en --language 1:en --language 2:en --language 3:fr Input-audio.mkv


I generate the --language options automatically from the lsdvd output.
Back to top
View user's profile Send private message
syn0ptik
Apprentice
Apprentice


Joined: 09 Jan 2013
Posts: 267

PostPosted: Fri Jul 05, 2013 5:51 am    Post subject: Reply with quote

Not all vob's keep information about lang's.

Try mencoder, that could use dvd as dvd-disc.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum