Friday, November 21, 2008

Optimal mencoder option for me

Yesterday, I recorded a local Thai drama series, "Jai Rao", at channel 3 since my wife had a meeting so she couldn't watch it.(NOTE: This is for home use only, I didn't mean to distribute it!). The recording is done on my desktop machine using SnaZio (V One Multimedia) DVR tool came with my video capture card. It can record to DVD-compatible MPEG2 stream, the stream can't be converted to DVD easily due to some incompatibility, so I need to convert to some other viewable format.

As said in my last post, the format I chose was DivX, due to its quality and size. Since I have change my laptop, it seems that my laptop is powerfull enough to test drive the quality of encoding.

I think the best optimal option for mencoder is
mencoder -ovc lavc -lavcopts vcodec=mpeg4:vhq:vqmin=2:vqscale=5:threads=2:aspect=4/3 -oac mp3lame -lameopts preset=standard -ffourcc DX50 -edl edl1.txt - o output.avi input.mpg
The vqscale=5 yield best quality and good file size. The total file size is about 1G from 4.2G MPEG2 source file, note that I remove the commercial ad and other TV program at the end of file so the actual source file size would be about 3G.

Note that, actually the default option for lavcopts (vcodec=mpeg4:vhq) is actually sufficient for viewing on most CRT TV already. I believe that the difference is hardly noticable on 21"-29" CRT TV. For best quality file, 2 pass XVID encode will yield much better result but consume lots more time. The encoding is done within about 1 hr for me.

No comments: