vid2dvd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
vid2dvd [2012/02/17 10:10] – arYheiVKgtDEUFfG 109.168.50.226vid2dvd [2012/02/18 13:46] (current) brot
Line 1: Line 1:
-2uRQoH  <a href="http://xiwgocaguedv.com/">xiwgocaguedv</a>+===== Erstellen von Video DVDs ===== 
 + 
 +==== Umwandeln des Quellvideos ins richtige Format ==== 
 + 
 +Das Videoformat auf einer DVD ist recht eng festgelegt. Deswegen müssen wir erstmal unser Video ins passende Format wandeln. Dafür haben wir den  mencoder 
 +  mencoder -sid 107 -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf scale=720:432,expand=720:576,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=8000:keyint=15:trell:mbd=2:precmp=2:subcmp=2:cmp=2:dia=-10:predia=-10:cbp:mv0:vqmin=1:lmin=1:dc=10:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 25 -o out.mpg in.mkv 
 + 
 +Immer anpassen muss man 
 +  * die Dateinamen ;) 
 +  * die Werte für scale und expand (das expand macht um das skalierte video dann noch balken, da sonst keine erlaubte auflösung) 
 +  * das aspect ratio (für das es allerdings nen [[http://rellig.minad.de/resolution.php|praktischen rechner vom rellig]] gibt) 
 + 
 +Die erlaubten Werte für eine DVD kann man in der [[http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html|mencoder Dokumentation]] nachlesen 
 + 
 +==== Optional: Untertitel einfügen ==== 
 + 
 +geht ziemlich simpel: 
 + 
 +neue datei sub.xml: 
 +  <subpictures> 
 +        <stream> 
 +                <textsub filename="sub_de.srt"  
 +                font="DejaVuSans.ttf" 
 +                /> 
 +        </stream> 
 +  </subpictures> 
 +für mehr mehrere Subs einfach nen neuen Tag machen. 
 + 
 +Warnungen:  
 +  * Zickt gerne wegen charset. Einfach in UTF-8 umbaun. 
 +  * das font-file muss nach ~/.spumux/ *facepalm* 
 + 
 +und 
 +  spumux sub.xml < in.mpg > out.mpg 
 + 
 +mit hilfe von z.B. mkvextract kommt man da auch ganz leicht ran (vielleicht noch konvertieren). 
 +mehr infos im [[http://dvdauthor.sourceforge.net/doc/r2515.html|doc]] 
 + 
 +==== Erstellen der DVD-Video Struktur ==== 
 + 
 +Hat man das Video endlich im richtigen Format, muss man eine DVD-Video Struktur erstellen. Dafür gibts [[http://dvdauthor.sourceforge.net/|dvdauthor]] 
 + 
 +Theoretisch könnte das auch Kapitel und Menüs, aber wir wollen die DVD einlegen und dann ohne Umwege den Film sehn. Also schreiben wir folgendes in die dvd.xml: 
 + 
 +  <dvdauthor> 
 +    <vmgm /> 
 +    <titleset> 
 +        <titles> 
 +            <pgc> 
 +                <vob file="out.mpg" /> 
 +            </pgc> 
 +        </titles> 
 +    </titleset> 
 +  </dvdauthor> 
 + 
 +Dann nurnoch drauf achten dass der Dvdautor dass nicht alles ins jetzige Verzeichnis schreibt 
 +  dvdauthor -o dvdroot -x dvd.xml 
 + 
 +==== Mit mplayer kurz Testen ob alles stimmt ==== 
 + 
 +Bevor man das Ganze auf einen Rohling brennt kann man mit mplayer kurz kontrollieren ob alles stimmt 
 +   mplayer dvd:// -dvd-device ./dvdroot 
 + 
 +==== Auf DVD brennen ==== 
 + 
 +Wenn alles funktioniert kann man endlich die DVD brennen 
 +  growisofs -dvd-compat -Z /dev/dvdrw -dvd-video ./dvdroot/ 
 +   
 +==== notes ==== 
 +   
 +  * Using "harddup" at the end of the filter chain will help A/V sync. It will copy frames when in the original there is nothing to stay in sync with the original. It results in a slightly bigger file, but improves demuxing and remuxing. 
 +  * NOT using -ofps (the option that sets the output frame rate) prevents the output result to have artifacts during the first seconds of the video (to be exact it will have artifacts (grey pixels) until it reaches the first keyframe) 
 +  * Keeping an audio track during the video pass fixes pretty much all sync issues exept for wmv, h264 and any other codec that allows variable frame rate. In those cases using "-mc 0" fixes the sound sync. '(adding "-mc 0" for non variable frame rate codecs screws up some contents !)' 
 +  * mencoder is made to fix A/V sync issues of the input file, but if that doesn't work (mostly when the original has a variable frame rate) you can use "-mc 0" (it sets the 'M'aximum 'C'orrection to 0). If you want to further guard against strange frame duplications and skips you can use "-mc 0 -noskip". This prevents all A/V sync and copies frames one-by-one so you can NOT use any filter that drops or duplicate frames or if the input has variable bitrate.
  • vid2dvd.txt
  • Last modified: 2012/02/18 13:46
  • by brot