[mythtv-users] Automatic converting HDTV to MPEG2

Boleslaw Ciesielski bolek-mythtv at curl.com
Mon Dec 11 17:18:40 UTC 2006


On Sun, Dec 10, 2006 at 07:52:55PM -0500, Trampas wrote:
> The problem I have is I use a MediaMVP as a front end and the HDTV Mpeg2 is
> not supported. Thus I was trying to figure out how to transcode it to a DVD
> or SVCD format such that I could watch using mediaMVP. 

I use the following hacky script (which requires mencoder) to convert
HD videos so they can be displayed using the PVR-350 hw decoder. I am
pretty sure it should work for MediaMVP as well.

The script assumes that the input video has 16:9 aspect ratio and the
resulting file is 720x480 with the original video letterboxed to be
displayed on 4:3 TV.

Bolek


#!/bin/sh -x

INFILE=$1
OUTFILE=$2

if mencoder -o /dev/null $INFILE 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

mencoder -of mpeg -mpegopts format=mpeg2:vbitrate=4000 -oac lavc -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=4000:keyint=18:aspect=4/3:acodec=mp2:abitrate=256 -vf $FILTER -fps $FPS -ofps $OFPS -vc mpeg12 -o $OUTFILE $INFILE


More information about the mythtv-users mailing list