Home > General, PHP > Categorizing Your Movie Collection with IMDB

Categorizing Your Movie Collection with IMDB

June 17th, 2009

If you have a ton of movies like I do, scrolling through the full list on the PS3 is painful. After about 100 movies or so, you realize that you need a better method of doing it.

Well if you’re on Linux, you are in luck! As I started categorizing stuff by hand, I ran into another unrelated problem. While I was searching for the solution, I came across IMDB-to-MPEG. I had to hack around a bit in the PHP code to get it to work the way I wanted, but man did it save a lot of time. I fixed a number of things and submitted it back to the author, so hopefully we’ll see a new version soon.

Basically, you give it a movie name and it queries IMDB for the movie. Based on the IMDB Genres and Ratings, it creates your symlink tree for you. So in the PS3 XMB, when you go t your movie server you have all of your movies categorized by Genre so you can get a list of all Action movies, for example. Of course, since it’s all just symlinks, you can have the same movie covering multiple genres. So for a military crime drama — such as A Few Good Men — it would be listed under all 3 genres of Military, Crime, and Drama.

But it also had another interesting feature. It creates a MPEG video file that you can play from your uPnP client that gives you IMDB info, like the plot, the year, the ratings, etc.

This is what the original looked like: About Army of Darkness.m4v

This is what my latest version looks like: About Army of Darkness.m4v

And if you have an HTML 5 browser, here it is with the video tag (in Ogg Video format):

I wish I knew a good algorithm for making motion more fluid. The animation frames look jerky. I’m sure I need to blur or leave trails or something, but my attempts have all been failures.

General, PHP , ,

  1. June 27th, 2009 at 05:16 | #1

    I am the author of IMDB-to-MPEG and I am very grateful for the improvement you made to my original hack :-) I will indeed be creating a new release incorporating your changes. Thanks for contributing!

  2. Anon
    December 25th, 2009 at 21:40 | #2

    Hello, I have been trying to sort and categorize my videos by hand. I am running Ubuntu 9.10 and my media is broadcasted over Mediatomb UPnP to my PS3. I’m a noob to running PHP from the CLI and I am exhausted after sorting my aging MP3 collection and updating all ID3 tags to sort better in my Mediatomb library. I’m not wanting to to the same to my videos. How do I go about using this script? The author leaves a lot to be desired in documentation on where to place files and what PHP files to edit to have it work for you. I apologise for asking you this but I could not find a way to ask the original author. I went through and edited the PHP files to my location of my videos and such. I may be confused about the way the script works.

    Let me explain the way my directory is setup.

    All movies are stored in subfolders at /storage/media/movies/(MOVIE NAME)/movie.avi

    The IMDB-to-MPEG script is stored at /storage/IMDB-to-MPEG/IMDB-to-MPEG.php

    Is there a way to run the scrip so that it grabs the info recursively to process my entire movie storage location with me just answering (y) or (n) to automated search? It seems so but I’m lost.

  3. Anon
    December 25th, 2009 at 22:01 | #3

    Nevermind… I must have not used enough scrolling action. Completely missed the bottom of the authors page.

  1. No trackbacks yet.