Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
22nd March 2018, 20:16 | #1 | Link |
Registered User
Join Date: Nov 2010
Posts: 15
|
Convert multi language DVD using ffmpeg
I try to convert a multi language DVD movie into an mkv or ogv video, with the first 2 audio tracks using ffmpeg.
I copied the VOBs of a DVD to the harddrive (using MS-W and ripit4me and DVDDecrypter since I cannot get it to work on Linux alone, I tried installing libdvdcss-1.4.0-x86_64 but the VOBs are still not readable, not even for the "file" command. See also here: http://forum.doom9.org/showthread.php?=t=1753332 ) This is the info I get via playing the merged VOB files of the main video (I merged the main VOBs into one single VOB file using "cat Whatever*.VOB > P_V0.VOB" and played it via mpv to get the below info) Code:
Playing: P_V0.VOB (+) Video --vid=1 (mpeg2video 720x576 25.000fps) Subs --sid=1 (dvd_subtitle) Subs --sid=2 (dvd_subtitle) VO: [opengl] 720x576 => 1024x576 yuv420p (+) Video --vid=1 (mpeg2video 720x576 25.000fps) Audio --aid=1 (ac3 6ch 48000Hz) Audio --aid=2 (ac3 6ch 48000Hz) Audio --aid=3 (ac3 6ch 48000Hz) Audio --aid=4 (ac3 2ch 48000Hz) Subs --sid=1 (dvd_subtitle) Subs --sid=2 (dvd_subtitle) Subs --sid=3 (dvd_subtitle) (+) Video --vid=1 (mpeg2video 720x576 25.000fps) Audio --aid=1 (ac3 6ch 48000Hz) Audio --aid=2 (ac3 6ch 48000Hz) Audio --aid=3 (ac3 6ch 48000Hz) Audio --aid=4 (ac3 2ch 48000Hz) Subs --sid=1 (dvd_subtitle) Subs --sid=2 (dvd_subtitle) Subs --sid=3 (dvd_subtitle) Subs --sid=4 (dvd_subtitle) Subs --sid=5 (dvd_subtitle) Subs --sid=6 (dvd_subtitle) V: 00:00:04 / 00:00:00 (0%) Cache: 14s+73MB Invalid video timestamp: 4.920000 -> -0.033367 V: 00:00:03 / 00:00:00 (0%) Cache: 11s+73MB Track switched: (+) Video --vid=1 (mpeg2video 720x576 25.000fps) (+) Audio --aid=1 (ac3 6ch 48000Hz) Audio --aid=2 (ac3 6ch 48000Hz) Audio --aid=3 (ac3 6ch 48000Hz) Audio --aid=4 (ac3 2ch 48000Hz) Subs --sid=1 (dvd_subtitle) Subs --sid=2 (dvd_subtitle) Subs --sid=3 (dvd_subtitle) Subs --sid=4 (dvd_subtitle) Subs --sid=5 (dvd_subtitle) Subs --sid=6 (dvd_subtitle) Code:
Audio --aid=1 (ac3 6ch 48000Hz) ENG <- KEEP! map:0 Audio --aid=2 (ac3 6ch 48000Hz) DEU <- KEEP! map:1 Audio --aid=3 (ac3 6ch 48000Hz) jap Audio --aid=4 (ac3 2ch 48000Hz) jap-Audio-Commentary I try to first cut off some stuff at the beginning ( "-ss 1:15.500" ), and create a 30 seconds test sample to see if ffmpeg gets it all right, especially in adding the two audio tracks. I first want a stream copy with includes the main video (video0) and the first two audio tracks (audio0 = ENG and audio1 = DEU). But I seem not to be able to get it right, I read the ffmpeg documentation ( http://ffmpeg.org//ffmpeg.html ), and also some posts about mapping on superuser.com and video.stackexchange.com, but so far to no prevail. Code:
ffmpeg -y -v error -ss 1:15.500 -i P_V0.VOB -map 0:0 -map 0:1 -c:a ac3 -codec copy -acodec copy -t 30 P_V1_30s.mpg [mpeg @ 0x2540de0] Invalid media type data for output stream #0 Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument $ ffmpeg -y -v error -ss 1:15.500 -i P_V0.VOB -map 0 -codec copy -acodec copy -t 30 P_V1_30s.mpg [mpeg @ 0x1a71b20] Invalid media type data for output stream #0 Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument $ ffmpeg -y -v error -ss 1:15.500 -i P_V0.VOB -map 0:0 -map 0:1 -codec copy -t 30 P_V1_30s.mpg [mpeg @ 0xe5fae0] Invalid media type data for output stream #0 Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Code:
time ffmpeg -y -v error -ss 1:15.500 -i P_V0.VOB -codec copy -t 30 P_V1_30s.mpg real 0m3.239s user 0m0.915s sys 0m0.815s But for some reason (unknown to me reason, that is), the resulting test 30 seconds file has only video and lacks any audio: Code:
$ mpv P_V1_30s.mpg Playing: P_V1_30s.mpg (+) Video --vid=1 (mpeg2video 720x576 25.000fps) VO: [opengl] 720x576 => 1024x576 yuv420p V: 00:00:06 / 00:00:30 (20%) Cache: 10s+11MB What do I do wrong trying to use -map to include the 1st and 2nd audio track (aka audio0 and audio1) ? |
Tags |
ffmpeg dvd multi-language |
Thread Tools | Search this Thread |
Display Modes | |
|
|