I’m going to do a series of posts here on automated transcoding of recordings in MythTV. The idea is to explain the basics, then evolve the design to end up with recordings suitable for playback on the iPad, which is a little more advanced.
- The complete series of articles is available at this page
What is transcoding? The data saved to disk by MythTV from your TV tuner cards has both a format, and a bit-rate. These are usually particular to how the TV station is broadcast and/or how your tuner hardware works. The idea of transcoding is to change either or both properties, perhaps to enable playback on another device, or to save on disk space used.
MythTV includes a transcoding system and support for some data formats and bit-rates (but not all). In this first session I’ll enable really basic, manual transcoding.
What catches people out is that just hitting the Transcode button in MythWeb will not work unless the backend is allowed to transcode. That’s done in mythtv-setup
, the program you probably ran years ago and forgot all about (or never ran).
Log into your MythTV box (these are instructions for 0.24):
workstation:~$ ssh -Y mythtv.example.com mythtv:~$ mythtv-setup --geometry 640x480
Select General and then hit Next until you reach the Job Queue (backend specific) page:
The notable settings are the six Allow … Jobs tick-boxes. As you can see I have commercial-detection disabled, and the effect is that even if I hit the Flag Commercials button in MythWeb the job will never start (it will just sit in the job queue). There are three types of job:
Edit: updated descriptions due to feedback from a friend – thanks, Colin!
- Commercial-detection: this will attempt to detect and store the commercial break points in TV shows (not a transcode, but may be used by one)
- Transcoding: what you set to happen when you hit Transcode in MythWeb, which (usually) replaces the original recording file
- Four User Jobs: scripts you create that transcode (or anything else), which we’ll come to later, and typically don’t replace the original recording file
Hitting Next takes you to the Job Queue (Global) transcode settings page:
An interesting option is Save original files after transcoding (globally). If you transcode and intend to replace the original recording file (as in bullet two, above), this is a way to preserve a backup should things go wrong. If you do, just make sure there’s a cron
job or similar to delete these old files as otherwise your disk will fill up.
Finally, hitting Next will show the third transcode-related page where you can configure the User Jobs I mentioned in bullet three, above. I’ll save these for another blog post to come.
So far I’ve allowed transcode jobs but not actually asked MythTV to to run any. Bringing up the MythWeb page for a recorded show (click the thumbnail from Recorded Programs) presents a Transcode button which now works:
For a different show I recently used this button, and on the Backend Status page there’s a corresponding Job Queue section entry showing its progress:
Next time I’ll show what type of transcode is happening, and how to automate this to occur immediately after each recording finishes.