Mencoder
Hier sind ein paar Befehle, die ich mal gebraucht habe um Videos in ein anderes Format zu wandeln
DTS nach AC3 Tonspur, Video behalten
mencoder {InputVideo} -o {OutputVideo} -ovc copy -oac lavc -lavcopts acodec=ac3
Irgend ein Format nach MPEG für die Dreambox
mencoder {InputVideo} -o {OutputVideo.mpg} -of mpeg -ofps 25 -oac lavc -ovc lavc -srate 44100 -lavcopts acodec=mp2:vcodec=mpeg2video:vhq:keyint=25:vbitrate=10000:abitrate=192:scplx_mask=0.2 -vf pp=hb/vb/dr,hqdn3d -vf scale=720:-2,expand=0:576,crop=704:576
Links
- http://www.tevs.eu/blog_6.html
- http://blog.ax11.de/archives/2008/08/30/1461-H264-Kompression-mit-Mencoder-Update.html
- http://kalfaoglu.com/wp/?p=4
- http://wiki.dbox2-tuning.net/wiki/index.php/Beliebiges_Filmformat_in_TS-Datei_umwandeln
- http://www.linuxforen.de/forums/archive/index.php/t-174252.html
- http://www.linuxforen.de/forums/archive/index.php/t-229612.html
- http://www.marcus-mende.de/mypage/index.php?view=mwiki&filename=ffmpeg.php
- http://mitschnitt.net/blog/?page_id=66
- http://handbrake.fr/
- http://avi.alkalay.net/2008/03/mpeg4-dvd-rip.html
- http://psyklops.blogspot.com/2008/11/encoding-to-h264x264-with-mencoder-and.html
To test
1. Demuxing TS: mplayer -dumpvideo -dumpfile Y:\Outfile.264 Z:\Infile.ts mplayer -dumpaudio -dumpfile Y:\Outfile.ac3 Z:\Infile.ts
1. Demuxing TS: Extract the video to RAW H264 and AC3 audio. I used mencoder for this. I used the version from 31.07.2006 from here: http://tirnanog.fate.jp/mirror/mplayer/ The latest official release didn't work To demux video use the following command: mencoder.exe "Z:\Infile.ts" -of rawvideo -ovc copy -oac copy -noskip -o Y:\Outfile.264 Demux audio using ProjectX (http://www.lucike.info/page_projectx.htm). This has the advantage that you see stream errors in the log. ProjectX will complain a lot about GOP size and won't extract the video track. It will extract all audio tracks and fix errors. I recommend recapping if you'll get errors as watching a file with errors is not much fun and synching the audio will be a pain in the ass. If you don't like ProjectX, you can still use mencoder.exe "Z:\Infile.ts" -of rawaudio -ovc copy -oac copy -noskip -o Y:\Outfile.ac3 but you'll only get one audio track and no error report.
vom mpeg ins vob Format
mencoder Film.m2p -o Film.vob -of mpeg -mpegopts ‚format=dvd‘ -oac copy -ovc copy
Vom avi ins Vob Format: mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf scale=720:576,harddup -ofps 25 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:vstrict=0:aspect=16/9 -o movie.mpg movie.avi
Ermittlung der Bitrate
Bitrate = (Ziel_Dateigröße_in_Mbyte - Audio_Dateigröße_in_Mbyte) * 1024 * 1024 / Länge_in_Sekunden * 8 / 1000
Komprimierung in x264
erster durchgang mencoder -v Dateiname.vob -vf crop=688:576:18:0,harddup -ovc x264 -x264encopts subq=4:bframes=3:b_pyramid:weight_b:turbo=1:pass=1:psnr:bitrate=745 -ofps 25 -oac copy -of rawvideo -o Dateiname.264
Zweiter durchgang mencoder -v Dateiname.vob -vf crop=688:576:18:0,harddup -ovc x264 -x264encopts subq=6:4x4mv:8x8dct:me=3:frameref=5:bframes=3:b_pyramid:weight_b:pass=2:psnr:bitrate=745 -ofps 25 -oac copy -of rawvideo -o Dateiname.264
MP4 erzeugen
MP4Box -add Dateiname.264 Dateiname.mp4

Post new comment