[mythtv-users] mencoder and re-encoding HDTV shows.

Rod Smith mythtv at rodsbooks.com
Tue Sep 18 14:52:02 UTC 2007

On Tuesday 18 September 2007 04:30:46 jack snodgrass wrote:
> I'm using this mencoder command to re-encode a HDTV show to something
> smaller... something
> I can stream to my office over the internet or something I can put on
> a usb drive....
> mencoder -srate 22050 -vf scale=720:400 -oac mp3lame -lameopts
> preset=15:mode=3 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900 -sws 2
> -o /tmp/1005_20070914190000_720x400x900.avi
> /mnt/store/1005_20070914190000.mpg
> This command takes 22 minutes or so to re-encode a 30 minute,
> .... this 
> is on a E6600 Core Duo.
> Does anyone have any suggestions for alternatives to my mencoder setup
> that will be a lot
> faster and give me similar results?

I doubt if you'll be able to speed up that transcoding job by much, at least 
not without upgrading the CPU. HD content is BIG, and scaling it involves 
computations; it's not just a matter of discarding every other byte or 
anything simple like that.

That said, I do have a couple of suggestions:

1) You could use -oac copy rather than -oac mp3lame. (You'd also then
   discard the -lameopts options, too.) This will copy the original's
   audio track rather than re-encode the audio. In theory this should
   be faster, but compared to the video re-encoding, the audio re-encoding
   shouldn't be taking a lot of time, so I doubt if you'd cut the time by
   more than a couple percent. I'm not positive an MPEG-4 file would be
   happy with audio copied directly from an HD broadcast, though.

2) You could try a format other than MPEG-4 for the final format. MPEG-4
   is a CPU-intensive format, so you might be able to save a bit of time
   by encoding to MPEG-2 or RTJpeg; however, this will also result in
   bigger files and/or lower quality. If you go this route, you might
   actually get better results by going with slightly lower resolution
   than the 720x400 you've specified.

Rod Smith

More information about the mythtv-users mailing list