[mythtv-users] batch transcoding

Tom Metro tmetro+mythtv-users at gmail.com
Tue Apr 17 23:19:21 UTC 2007


If I have a collection of shows recorded with MPEG2 in my MythTV library 
and I want to transcode them to MPEG4 to save space (and probably cut 
out the commercials as well), what's the best way to do this in batch? 
I'd like to avoid having to select each show individually in the 
front-end, load the commercial flagging into the cut list, and fire off 
a manual transcode.

(Note: I'm aware that you can configure MythTV to do the transcoding 
automatically as a post-processing step for recordings. These recordings 
were intentionally left in MPEG2 format because the front-end, a 
MediaMVP, was being used without the assistance of VLC, and thus could 
only handle MPEG2 playback.)

It appears that mythtranscode:
http://www.mythtv.org/wiki/index.php/Mythtranscode

should be fairly easy to script and drive from lists of 
channel-id/starttime parameters extracted from the database. Any 
existing tools that already do something like this where you might say 
"transcode all shows with the title "foo" using the recording profile 
"Medium (MPEG4)"?

The documentation on removing commercials with mythtranscode:
http://www.mythtv.org/wiki/index.php/Mythtranscode#Remove_commercials_from_an_MPEG2_recording

seems to raise other questions. The --honorcutlist switch causes the 
edits to happen, but my understanding is that flagged commercials are 
different from a cut list, and to turn the former into the latter 
requires using the editor in the front-end to load the commercial cut 
points into the editor. So does that mean commercial removal still 
depends in a manual step?

Removing commercials isn't critical, but if it isn't done as part of the 
transcoding, will the original commercial flagging in the database still 
work correctly with the transcoded file? (If they're time offsets, 
rather than frames, that should be OK.)

That section in the wiki also says, "This will drop the cut version 
beside the original, but with an added .tmp extension." Why isn't the 
original file replaced, with the original optionally renamed? (I thought 
there was an option in the UI to work that way, so I'd expect the 
underlying command line tool to support it.)


Another option I considered was exporting the shows out of MythTV for 
storage elsewhere as Xvid files. For that, MythArchive seems like the 
logical choice, but MythArchive only seems to be setup to either export 
MPEG2 for DVDs or native format.

Ideally, I'd like to be able to export to Xvid along with the meta data 
to then write to DVD-ROMs, which could then either be played on a 
DiviX/Xvid compatible DVD player, or later re-imported back into MythTV. 
But I gather Xvid in an AVI container is rather different from a MythTV 
MPEG4 NuppelVideo container, though shouldn't a lossless conversion be 
possible?

It seems like nuvexport has fallen out of favor, but it looks like it 
would be suitable for the task as well. It appears to have a UI that 
makes it easy to select all episodes of a given show title for batch 
processing, which should be less painful than MythArchive's UI. It also 
seems to have options for generating a cut list automatically from 
commercial flagging, and the ability to export meta data as SQL. 
(Technically the latter only happens if you're exporting as a .nuv file, 
which I wouldn't bother doing. But it can probably be hacked to produce 
that data along side other formats, with the understanding that a 
conversion back to .nuv would be needed if ever re-imported.)

  -Tom


More information about the mythtv-users mailing list