Script: mythsshimport

Here’s a useful script for users of a MythTV box equipped with a PVR-350 MPEG capture/playback cardmythsshimport:


mythsshimport – transcode and install video files onto a MythTV box


mythsshimport file1 [file2 …]


Transcodes video files (AVI, MPEG, MOV, WMV etc.) into MythTV-compatible and PVR-350-optimised MPEG-2 .nuv files, suitable for viewing on a 4/3 screen, then transfers them to the MythTV backend, inserts them into the “recorded programs” listings, and builds seek tables.

All this happens on-the-fly, at faster-than-real-time rates; with a recent CPU in the transcoding box, and over an 802.11b wifi home network, you can start the process and start watching the video within 20 seconds, while it is transcoded and transferred in the background.

SSH is used as the network transport. If you have the CPU power available on the MythTV backend itself, you can run this script there (as the mythtv user) and it will skip the SSH parts entirely.


  • ssh password-less key access from transcode box into [email protected] (this could be localhost, if you’re transcoding on the mythbox). Test using: “ssh [email protected] echo hi”. If you run this script on the mythbox as the mythtv user, this is not required.

  • mencoder. Tested with 2:0.99+1.0pre7try2+cvs20060117-0ubuntu8 (I swear that’s a version string and not just me rolling my head around the keyboard)

  • MythTV. Tested with MythTV 0.20.

  • The “contrib/” script from the MythTV source tarball, installed on the mythbox in $PATH: download from

  • screen(1) installed on the transcoding box, used to keep the mencoder output readable

Download here.

This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink. Both comments and trackbacks are currently closed.


  1. Shane Curcuru
    Posted March 1, 2007 at 03:39 | Permalink

    Bookmarked. My MythTV box still awaits time to fully recognize the -500 card (so I can put it in a corner and just use the wide screen TV as a primary display) so I can begin a life of streaming video. I’ll be asking questions, I’m sure (esp. as to best way to handle music, both overall and so my wife’s iPod syncs easily).

  2. Posted March 1, 2007 at 12:34 | Permalink

    Shane — hopefully I’ll be able to help. ;)

    I haven’t come up with a good solution to the music problem — the best fix I’ve found so far is to simply hook up the laptop’s audio out to the amplifier’s audio in using a long cable, and listen that way! (Basically, MythTV’s music interface isn’t anywhere near as usable as a decent desktop music app like JuK or iTunes.)

    I experimented with using esd’s networked-sound support to play from the laptop app, via wifi to the Mythbox, which then plays sound via the TV and from there out via amp. But that’s a lot of moving parts and a lot of clicking remotes, turning TVs on, etc. — all in all, it’s a bit of a waste of power for not much gain.

  3. Shane Curcuru
    Posted March 1, 2007 at 14:44 | Permalink

    Wow, auto-email feedback and everything.

    I have a local MythTV expert, but he’s also the father of a 10 month old, so I rarely get him over to my house.

    No, I already have a mini tower (IBM used, with employee discount) setup behind my stereo rack, with cabling to the TV for video. I should be able to follow the pretty good general Myth instructions to get the 500 card running and doing the Tivo thing.

    What I haven’t figured out is audio ripping, storage, and easy playing – computer wise. The amp is right there, so connections are easy. But I need something with a simple UI I can display out the 500 to the TV that my wife, for example, can pick the songs she wants using the wireless keyboard, without having to know it’s running linux.

    There are plenty of individual music apps on linux; what’s one that’s easy for end users, and can support also syncing to our iPod?

  4. Posted March 1, 2007 at 15:02 | Permalink

    Amarok may be your best bet — it’s pretty featureful and syncs. (I use JuK for playback and gtkpod for the iPod, myself, but they don’t integrate well together so I wouldn’t recommend it for most users I think.)