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

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

Trackback URL for this post:

http://www.2030.tk/trackback/218

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Use <fn>...</fn> to insert automatically numbered footnotes.
  • You can use the <go> tags just like the <a> for nicer urls.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.