Projects

  • Refinery

    What is this?

    I recently got an iPod Touch, and was disappointed (but not surprised at all) at the lack of support for content that didn't originate from or managed by iTunes. I found decent tools to compensate for the music side of things, but not so much for TV shows. After re-encoding TV shows using Handbrake and adding them into iTunes, I got this -

    Not only is it impossible to know which episode is which for shows with long titles (apparently long titles don't exist in the Apple world), you end up with a massive list of videos without any organisation. They also appear in iTunes under films, with no organisation there either. You can fix things up by manually fixing the metadata inside iTunes, one at a time. Very tedious.

    Enter Refinery. Refinery is a Windows app that lets you easily modify metadata (show name, episode title, episode and season number, description etc.) on multiple videos at once. So if you're importing a season of Entourage, you don't need to fill in the details for every episode.

    But it has an ace up its sleeve - it can download metadata from thetvdb.com (effectively the IMDB for TV shows). So you can have full metadata for all your TV shows with next to zero effort.

    Once the metadata has been downloaded, Refinery updates the tags within the MP4 file, so iTunes can read them when importing.

    Right now, Refinery only works with TV shows.

    How do I use it?

    You must use Refinery before you import your videos into iTunes. If your videos are already in iTunes, you need to remove them from iTunes first.

    Fire up Refinery and add your MP4 video files into it by either dragging the files into it, or using the Add Files button. Only MP4 files will be imported.

    Files loaded into Refinery

    Ensure all your files have at least the title, episode and season number filled in. Refinery will attempt to work this out from the filename, but it might not always work. Use the 'Apply to Multiple' button on the toolbar to apply the same values to multiple videos, or click on an individual video to edit it.

    Click on the 'Download metadata' button on the toolbar. Ensure all the files you need metadata for are ticked (use the 'check all videos' shortcut). Once it has downloaded the database matches, ensure the titles match, then click 'Download metadata'.

    Downloading metadata using Refinery

    When Refinery has finished, check the results, and if it all looks good, click the 'Save metadata' button. Choose whether you want to overwrite the original files, or save the newly tagged files to a new location, then click 'Save metadata'. This may take a few minutes as the tagging process sometimes has to make a copy of the video to allocate space for the metadata.

    Downloaded metadata using Refinery

    Now your video files are ready to be imported into iTunes and synced to your iPod.

    Videos organised in iPod     TV shows organised in iPod

    How does this work?

    Refinery is pretty much just a front end for the great command-line tool AtomicParsley. It reads metadata using AtomicParsley, provides a user interface for modifying the metadata, then uses AtomicParsley again to write metadata back to the file.

    It can also be used via the command line. This means you can tell Refinery to download the metadata and tag your file as part of a script. Start by running the following to see what you can do -

    C:\Program Files (x86)\edgylogic\Refinery\RefineryCLI.exe --help

    (remove the (x86) bit if you're running a 32-bit operating system.)

    As an example, with an untagged file named in one of the standard file name formats, the following command line will tag the file in-place.

    C:\Program Files (x86)\edgylogic\Refinery\RefineryCLI.exe entourage.s05e14.mp4

    Where can I get it?

    Warning - this is an alpha version. It works for me, but don't trust it for your most important video collection just yet, especially without any backups.

    Download Refinery. Windows is required, as is .NET Framework 3.5. If you're running Windows 7, you have this already. If you're unsure, trying installing Refinery. It will tell you if you don't have it.

    'Aargh! Things aren't working!' or 'This could be better if...'

    Leave a comment below or drop me an email.

    What's next?

    • Make it work with movies as well.
    • Use taglib-sharp instead of AtomicParsley. This means Refinery will be purely .NET and should provide better progress indication and reliability. The last time I looked though, taglib-sharp still had issues with reading and writing to MP4 files.
    • Make it possible to drag completed videos straight out of Refinery into iTunes.
    • Refine animations and general look and feel, especially the crazy colours.
    • Release the source under a reasonable license.
    • Port it over to Mono.
     

    Changelog

    1.

    Added a new command line interface to Refinery. Fixed a few minor bugs as well.

    The previous version, v0.8.2, is available here.

    8th November 2010 10:35 PM
     
    2.

    Fixed regression bug introduced by changes in v0.9.0 - looking for series matches with the same name more than once no longer results in a crash.

    Added a 255 character limit to all string fields. This only really affects the episode overview field, as all others are generally less than 255 characters. If the data from the data source is longer, it is automatically truncated. This limit is necessary as iTunes refuses to show strings longer than 255 characters.

    Fixed bug with CLI where the --abortIfMultipleMatches switch was always enabled even when not specified.

    Previous version here - Refinery v0.9.0.

    24th November 2010 2:40 PM
     
    3.

    Released Refinery 0.9.2.

    This release fixes a small but annoying bug - Refinery will no longer crash if it can't find any matches from the online metadata source.

    Also refined the algorithms used to guess metadata from filenames.

    Previous version - Refinery v0.9.1.

    6th December 2010 9:22 PM
     

Comments

No comments have been posted yet.

Leave a comment