[mythtv-users] Best HD transcoding setup & settings?

Richard Freeman r-mythtv at thefreemanclan.net
Thu May 17 23:19:45 UTC 2007


Joe Borne wrote:
> 
> Bryan Mayland wrote back:
> 
>>I have the following common settings:
>>Lossless Transcoding NOT checked
>>Resize Video while transcoding NOT checked
>>Codec: MPEG4
>>Scale bitrate for frame size NOT checked
>>Enable high-quality encoding checked
>>Enable 4MV encoding checked
>>(I believe the sound settings aren't used currently)
>>For 1080i I use Bitrate=3500
>>For 720p I use Bitrate=2500
>>For 480i I use Bitrate=1500
>>For both interlaced profiles, I have "Enable interlaced DCT encoding"
>>and "Enable interlaced motion estimation" checked.
>>

You mention that the sound settings aren't used.  Will there be any way
in the future to preserve an AC3 soundtrack when transcoding HD?  I've
been trying for ages to find a reliable way to transcode HD to SD while
preserving the sound - I only have an SD TV but I'd like to capture the
AC3 audio.  The problem is that I can't seem to generate a video stream
that myth's internal player can handle - they play fine unless you try
to seek in any way (even after rebuilding the seektable).  Part of the
issue may be defects in the original HD recording (I don't get
completely perfect reception, so there are glitches in the recorded
stream) - but the original recordings seek fine with the internal
player, so it should be possible to transcode them.

What I'd like to do is preserve the AC3 soundtrack while dropping the
resolution to 480 lines.  The best I've come up with is:

if mencoder -o /dev/null $1 2>/dev/null | egrep -q 'fps:(59|60)'; then
    # progressive
    OFPS="30000/1001"
    FPS="60"
    FILTER="tinterlace=4,scale=720:360:1,expand=:480"
else
    # interlaced
    OFPS="30000/1001"
    FPS=$OFPS
    FILTER="scale=720:360:1,expand=:480"
fi

nice mencoder -of mpeg -mpegopts format=mpeg2:vbitrate=2000 -oac copy
- -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=2000:keyint=18:aspect=4/3
- -vf $FILTER -fps $FPS -ofps $OFPS -vc mpeg12 -o /var/video/$1.tmp
/var/video/$1

(And various parts of that are borrowed from this list.)

I'd actually prefer something better then MPEG-2 and a lower bitrate but
I figured I should walk before I run...



More information about the mythtv-users mailing list