[mythtv-users] Transcoding HDTV?

Richard Freeman r-mythtv at thefreemanclan.net
Tue Oct 3 20:22:57 UTC 2006


Ivan Kowalenko wrote:
> 
>>> - Is it possible to keep the AC3 audio track, or will it be  
>>> converted to
>>>    MP3?
> 
> I don't see why not. There ought to be a transcode option for  
> passthrough, otherwise you might have to do a manual user job.
> 

No option exists in myth - I've been looking for it for a while.

This script works well as a user job:

#!/bin/sh
# Transcode mythtv video down to a reasonable resolution, preserving AC3
# audio
nice mencoder /var/video/$1 -o /var/video/$1.tmp -oac copy -ovc xvid -vf
scale=720:400 -xvidencopts
bitrate=900:turbo:nochroma_me:notrellis:max_bframes=0:vhq=0 && chown
mythtv /var/video/$1.tmp && mv /var/video/$1.tmp /var/video/$1
ERROR=$?
if [ $ERROR -eq 0 ]; then
        # Fix the database entry for the file
        cat << EOF | mysql mythconverg
UPDATE
        recorded
SET
        filesize = $(ls -l /var/video/$1 | awk '{print $5}')
WHERE
        basename = '$1';
EOF

Bits of this stolen from various sources (including the myth wiki I
believe).

This will work for h.264 - but right now it is just using xvid.  On
minimyth the resulting video doesn't play correctly, so I'm not using HD
right now.  Once minimyth releases 0.20 I'm guessing they'll have fixed
that bug, and I'll probably record from HD more often (right now that
tuner is just sitting idle).  If it gets a lot of use I'll be doing a
LOT of transcoding - hence the speed optimizations I'm using.  If you
get rid of the speed optimizations you can probably drop the bitrate for
the same quality.


More information about the mythtv-users mailing list