[mythtv-users] nice working transcode scripts for upsampled SD over HD?

Brad Templeton brad+myth at templetons.com
Fri May 4 02:22:28 UTC 2007

As you may know, most of the HDTV broadcast stations broadcast their
SD programs upsampled and pillarboxed in their standard HD format
(1080i or 720p, they never switch.)    I can choose to record these
shows off of analog cable with my pvr-250, but that never looks as
good as recording the upsampled HD version.   But the upsampled HD
version takes 6 or so gigs/hour, so I don't want to do that long term.

So I want to do a user job to transode these puppies down.   The job
should crop the pillarbars (though admittedly they don't take too
much room in a good mp4 compression) and transcode down to 640x480 or
similar, which is all that should be in the video.    As an option,
for the few shows which are letterboxed and then upsampled/pillarboxed,
it might be nice to crop the letterbars too, but that's not as important.

Of course 720p would be transcoded to 640x480p.   1080i is more
fun, you want to do the right thing with the interlacing.   One idea
is to resize to 640x540 -- a little bigger but this has no interlace
issues.   Otherwise you want to recover the original 480p or 480i
signal that was upsampled.

Anyway, I am fairly handy with mencoder and the rest, but I find that
when I play with them it still takes a lot of tweaking and trial and
error to get things right, so I thought I would ask if anybody had
done that and just take their final results.

I see two approaches -- it might be possible to do the crop and other
items as custom filters and flags on some transcode profiles, or it
might make sense to write a "user job" which invokes mencoder in full
glory.   In the latter case it might even be a smart user job able
to spot the difference between 1080i and 720p recordings and detect the
pillarbars even.

Some stations have a sub-channel where they simulcast at 480i.  So you
can sometimes record from that, but it's actually still not quite as
good.   First of all 480i is not 480p, and secondly some stations like
PBS broadcast their widescreen non-HD shows in 480i with letterbox on
their sub channels, but do a full upsample of the widescreen 720x480
original to their 1080i HD channel, which means higher quality.

Now of course the other thing I would add to this if doing a custom user
job would be some way to delay these jobs until the middle of the 2nd
night after recording.  That's because if I watch right away, I want to
see the original and not waste the CPU.  Only if I don't get around to it
do I need this downsample.

More information about the mythtv-users mailing list