Mythbrake

This script shall be called as MythTV user job. It transcodes the DVB recordings (mpeg files) using Handbrake.

Features:

On a Phenom II X4 2,8Ghz it is roughly 5 times faster than mythnuv2mkv for HDTV while using comparable quality settings.

All transcodings are single pass with constant quality as this results in the same quality as dual pass without the need for a second pass, thus its even faster. The only downside to dual pass is a slightly less predictable file size. As burning files to optical media is imho a thing of the past, exact file size hardly matters though.

Alerts via email in case of an error, so no problems lurk in the dark until the recording sheduled for transcoding is overwritten with newer recordings.

HDTV will be reencoded with Mpeg4 AVC H264 to save space. All HDTV channels I can receive here in Germany are without commercials, so I don't bother running mythcommflag on them. In case your situation differs you'll have to modify the script.

SDTV will have commercials cut out if necessary and will then be transcoded to Mpeg4 ASP (H263, Xvid, DivX). The scipt will check the ChanID of the recording to decide wethere there are commercials, so you have to adapt the list of ChanIDs to your setup.
I use Mpeg4 ASP instead of Mpeg4 AVC on SDTV recordings because the transcoding is much faster and it is easier to cut later on as mythcommflag isn't perfect. For manual cutting afterwards I use Avidemux

Audio: Currently the scipt just takes the first audio stream from the source file, transcodes it to Mp3 and names the stream "Deutsch-Stereo". You might want to at least adjust the stream name. I am planning to improve this script to preserve surround sound (AC3). As the script directly accesses the recording file no hacking / patching of MythTV is required, this script just needs some logic to detect if surround sound is present.

If you find any bugs or problems feel free to mail me at ares.drake@gmail.com