[mythtv-users] Transcode blues...

jack snodgrass mrlinuxgroups at gmail.com
Mon Nov 27 16:42:17 UTC 2006


On 11/26/06, Michael Tiller <michael.tiller at gmail.com> wrote:
> I've never used transcoding in MythTV (automatic or otherwise) but because I
> recently got an HDHomerun I am now dealing with two issues that, it would
> seem, would benefit from transcoding.
>
> The first is that I can now get HD.  For the time being, I cannot view HD
> (still working on XvMC, etc but no joy so far).  What I'd like to do in the
> meantime is trancode things down.  I thought this would be simple.  Just
> setup a transcoding profile (I used the High Quality one) to transcode to
> 720x480.  I used a bit rate around 3800 and left pretty much everything else
> the same.  I used this to transcode an HD program.  The results were
> terrible.  First, the file size went from 7Gb to 6.6Gb.  This despite the
> fact that I was transcoding from MPEG2 to MPEG4?!?  The picture quality was
> pretty bad (in spite of this) and, finally, the playback was jerky.  This
> seems like such a straightforward thing, how did I screw it up?
>
> The second is that I can now get SD broadcasts as well.  However the audio
> is AC3.  Unfortunately my MediaMVPs can't play this (even though mvpmc says
> it supports AC3).  So I thought I would simply do some kind of MPEG2->MPEG2
> transcoding switching the audio to MP3.  But this doesn't seem to be an
> option.  If I want to transcode it seems like I can only trancode to MPEG4
> or RTJpeg (?).  But those won't play on the Media MVP.  Am I correct in
> saying that there is no support for MPEG2->MPEG2 trancoding?  I could swear
> I've seen people talk about that before?!?  Ideally I'd like lossless video
> trancode ( i.e. strictly AC3->MP3 transcoding).
>
> Oh yes, and lastly I would like to try and save space by transcoding some of
> the movies I have down in MPEG2 to MPEG4.  I've tried this with mixed
> results.  Often the transcoding bombs out with an error status of 0 (is that
> an error status?!?) or 255.  Where do I look to find out more details about
> why the failure occurred?  Also, while successful commercial flaggings
> appear in the jobs queue window in MythWeb, it doesn't show successful
> transcodings (only unsuccessful ones) which makes me a big nervous.
>
> Any pointers would be very much appreciated.  Thanks.
>

I never could figure out how transcode was supposed to work or if it does
work. I ended up setting up a user job using this script:

#!/bin/sh
# pdatranscode - original...
# now it's hdtv_shrink.sh
#
# created by Jeff Volckaert (inspired by Zach White)
# hdtv changes by jack snodgrass
#
echo $1 $2 $3 $3 >> /tmp/hdtv.log

WIDTH=720
HEIGHT=400
RATE=900

VIDEODIR=$1
FILENAME=$2

# Sanity checking, to make sure everything is in order.
if [ -z "$VIDEODIR" -o -z "$FILENAME" ]; then
echo "Usage: $0 <VideoDirectory> <FileName>"
exit 5
fi
if [ ! -f $VIDEODIR/$FILENAME ]; then
echo "File does not exist: $VIDEODIR/$FILENAME"
exit 6
fi

# Transcode the file

OFILE="$VIDEODIR/"
OFILE+=`expr substr $FILENAME 1 19`
OFILE+="_"
OFILE+=$WIDTH
OFILE+="x"
OFILE+=$HEIGHT
OFILE+="x"
OFILE+=$RATE
OFILE+=".avi"

/opt/local/bin/mencoder -srate 22050 -vop scale=$WIDTH:$HEIGHT -oac
mp3lame -lameopts \
preset=15:mode=3 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=$RATE -sws 2 \
-o $OFILE $VIDEODIR/$FILENAME 2> /dev/null 1> /dev/null

this gives me a 5-1 compression ratio and gives me a pretty good picture.

I just run user job #1 on the shows that I want made smaller.

jack


More information about the mythtv-users mailing list