mencoding malcolm

Malcolm in the Middle is one of my favorite TV shows evah. It’s great stuff. I watched about twelve episodes this weekend. It was great.

Anyway, since only season one is on DVD, I’m making my own set just for me. I’ve already got about 100 or so of the 151 episodes recorded using mythtv. Well, first of all I strip out the commercials manually with avidemux2, which actually doesn’t take very long. Then I re-encode it to MPEG2 with some special settings so it can be burned onto a DVD.

Newer versions of mplayer (I forgot where they started with this, since I run the SVN development version) have a feature called “profiles” which saves me a ton of time, especially with encoding. Basically what you do is take a set of options and stick it in a profile in your mencoder config file. Then, instead of passing 500 arguments to the command line, you just do something like this:

mencoder mitm_002_red_dress.avi -o mitm_002_red_dress.mpg -profile dvd

Isn’t that much simpler? Here’s my dvd profile settings:

profile-desc=”NTSC DVD”

Just drop that in ~/.mplayer/mencoder.conf and you’re good to go.

The only real difference between mine and the mencoder docs is I changed the video bitrate to 2200 instead of 5000. And if you wanted to save a little more space, you could change the acodec to mp2 instead of ac3.

I hate having to type even all that profile stuff in though, so I made it even simpler and made a tiny bash script that does the same thing for me:

F=`basename $1 .avi`


if [[ ! -f ${MPG} ]]; then
mencoder $1 -o $MPG -profile dvd

The nice thing about it is it checks to see if the file exists first, and won’t overwrite it. Now I just run avi2mpg mitm_002_red_dress.avi, come back in a few minutes, and I’m ready to go. Then I just create the DVD filesystem and burn em, and I’m all done. They look great, too.

And I have no idea why I’m reencoding one that’s already on season one. Whoops.

Leave a Reply