[mythtv-users] Transcoding Artifacts (MPEG-2 -> MPEG-4)

Cymen Vig cymenvig at gmail.com
Sat Dec 17 11:59:45 EST 2005

On 12/15/05, ffrr <ffrr at tpg.com.au> wrote:
> Cymen Vig wrote:
> >I have been experimenting with transcoding the MPEG-2 output of my
> >Hauppauge PVR-500 device to MPEG-4. The current settings are are below
> >
> >I've also noticed that attempting to play the MPEG-4 files with
> >mplayer results in the wrong aspect ratio as it thinks the video is
> >720x480 while it really appears to be 480x480. If I jump around in the
> I convert to small mpeg4 files for viewing on a Palm Tx.  I have limited
> my minimum quality to 10.  It is much better, but not perfect.  I think
> you should limit your minimum quality, and maybe reduce the bitrate to
> keep the size down at the same time.  The overall result might be better.

After the advice in the thread and some guessing I switched to this:

Transcoders->Autodetect from MPEG2:
Profile name: MPEG2
 Reize video while transcoding: unchecked
 Width: 720
 Height: 480
Video compression:
 Codec: MPEG-4
 Bitrate: 2400
 Maximum quality: 1
 Minimum quality: 6
 Max quality difference between frames: 2
 Scale bitrate for frame size: checked
 Enable high-quality encoding: checked
 Enable 4MV encoding: checked
 Enable interlaced DCT encoding: checked
 Enable interlaced motion estimation: checked
Audio compression:
 Codec: MP3
 Sampling rate: 32000
 MP3 quality: 5
 Volume (%): 90

The picture quality is much better but transcoding time is long -- 26
minutes for a 30 minute MPEG-2 file with jobs set to medium priority.
I don't know if the interlaced options apply to MPEG-2 data coming out
of a Hauppauge card. With the resolution changes (see below) the file
sizes are 1.1 GB for MPEG-2 and 650 MB for MPEG-4.

I did get one step closer to the aspect ratio issue -- I found ivtvctl
-a on -d /dev/video0 and /dev/video1 (Hauppauge PVR-500 card with dual
tuners) thought the it should be 480x480 which is what MythTV was
initially set to also. But the MPEG-2 files seemed to really be

After reading a few pointers on the list I switched my settings to 720x480 with:

1) edit startup scripts:
/usr/local/bin/ivtvctl -d /dev/video0 -f width=720,height=480 -c
dnr_temporal=0 >> /dev/null
/usr/local/bin/ivtvctl -d /dev/video1 -f width=720,height=480 -c
dnr_temporal=0 >> /dev/null

2) change settings in MythTV to 720x480 and type of DVD Special 2 for
stream (apparently works with this resolution for playing the MPEG-2
back on DVD player)
3) change transcode settings to 720x480

More information about the mythtv-users mailing list