Adding Your Own MythVideo Metadata

Unfortunately, the Myth UI for the video metadata leaves a lot to be desired. You can only edit some of the data, not all of it. If you can find your movie in IMDB, most of the information is filled in automatically. However, if you can't find your movie in IMDB or its information is wrong or missing, you can't change it.

Not to fear. We'll hack the MySQL database directly. What fun. Begin by firming up the MySQL command processor:

     mysql -uroot -p mythconverg

The first thing to do is list the movie you're trying to update. You can try something like this:

     select * from videometadata where title like 'A%';

The above would show all movies beginning with the letter 'A', for example.

Once you find the movie you want to update, you can try the following:

     update videometadata set director='Joe Blow' where intid=nn;
     update videometadata set year=2009 where intid=nn;
     update videometadata set length=105 where intid=nn;
     update videometadata set coverfile='/mnt/videoserv/DVD/posters/MyPoster.jpg'
       where intid=nn;

The first example would be used to set the director's name. You can use multiple names, separated by commas but don't go nuts. The second example would set the movie release year to 2009. The third example would set the movie run time to 105 minutes. In all of the examples, nn is the actual internal ID that you determined by selecting the movie you're interested in (above).

And, the fourth example sets the cover file (which is displayed when you surf through the list of movies) to something of your choosing.

If IMDB doesn't have a cover for your movie (or you hate their choice), you can scan the cover of your legally-purchased copy of the DVD (you do have one of those, don't you) and turn it into a cover that MythVideo can use. Crop the scanned image so that it is roughly 3" wide and 4.5" high. Make sure the dots per inch are set to 72. Save it in medium resolution as a JPEG. The place to save it is the posters directory on your video server. Once you've done that, aim the metadata at the poster (still at the MySQL command prompt):

     update videometadata set coverfile='/mnt/videoserv/DVD/posters/BVSSexy.jpg'
       where intid=nn;

Here, we're aiming the cover file at our own version of the Buffy The Vampire Slayer cover, with the sexy (not for general consumption) image of S.M.G. and A.H. You can't get that off of IMDB.

If you want to hack other columns in the videometadata table, this gets you a list of all of the columns:

     show columns for videometadata;

You might want to look at what's already there before you start blasting. Oh, yeah. Before we start, let's (as Norm would say) talk about shop safety. Always wear safety glasses and ear protection, when blasting. And, always make a backup of the database beforehand. Otherwise, you may be looking at a blank screen where all you back episodes of Lost used to be. In other words, they will be truly lost. Whaaa!