# Tiny Media Manager by Seth Kenlon The trouble with media files is that they are not easily parse-able. How can your computer tell whether that 8 GB file in your `~/Movies` files is the latest superhero movie or just your daughter's soccer game? For some music formats, we have ID3 tags that can help, but movies and non-ID3 music files don't benefit much from that. I consider myself more or less an early adopter of digital content. Any time I can get a movie or album in a digital format, the better, for me, and since I consume a lot of independent content that hasn't got the budget for physical releases anyway, it works out that most of my purchases are digital files. These, I keep on an NFS shared drive and stream to [Kodi](http://kodi.tv) or [ncmpcpp](http://rybczak.net/ncmpcpp/) or whatever media client I happen to be using on any given Linux or Android device. For a long while, I had devised my own naming scheme for my files but not all media clients handled that very gracefully; they tended to attempt to parse the names and determine what the content was based on file names, or else they'd ignore the names entirely, and sometimes they'd ignore the file. I did a little bit of research, though, and discovered that for well over a decade, a sort of unofficial standard had emerged for exactly this problem, and in typical open source fashion, there were dozens of applications available to scan a media library and generate external meta data files and assets so that all the best media clients could better parse all the crazy things you throw at it. The one I've been using lately is **TinyMediaManager**. ## Getting Tiny Media Manager [TinyMediaManager](http://www.tinymediamanager.org) is an open source media management tool designed to generate metadata for the media players like Kodi (formerly **XBMC**) and other clients that use the same metadata schema. It's written in Java with Swing libraries, so it runs on Linux, BSD, Windows, Mac OS, and anything else that Java runs on. After downloading the TinyMediaManager archive (it will be a `tar.gz` file if you're on Linux or BSD or similar, and a `zip` file for all other platforms), untar it to whatever path you prefer. I place my non-packaged applications in `~/bin`, but it works just as well from `/opt` or `/usr/local/bin`; it's up to your own management style. As with any Java application, a hard requirement of tinyMediaManager is Java, or more specifically either [JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html), [OpenJDK](http://openjdk.java.net/). On Linux or BSD, install one these from your software repository or ports tree; other operating systems should visit the Java site directly for downloads. Once Java has been installed, you can optionally add `tinyMediaManager.desktop` to `/usr/share/applications` so that it shows up in your applications menu, or just launch it directly from a terminal on an as-needed basis with the included `tinyMediaManager.sh` script (which is what I do, since I only use it occasionally): $ ~/bin/tmm/tinyMediaManager.sh & ## Getting Started When you first start TinyMediaManager, a setup wizard prompts you to provide it with *source*: a drive, either local or on your network, containing media. Add your media location and then wait as TinyMediaManager scans the location. ![Tiny Media Manager startup](tmmsplash.jpg) It may seem obvious, but in order for a network drive to be added as a source, that network drive must be mounted on your current machine. You can't just export the volume as NFS or share it via SAMBA and have it pop up in TinyMediaManager on another machine; the computer running TinyMediaManager must "see" the drive as a usable location. So if you're not seeing your media drive in TMM, make sure you see it on your desktop first! The setup wizard also gives you a choice in the metadata format you want to generate. If you don't know, then it's probably safe to use the default. ## The Big Parse The reason you're running TinyMediaManager is so that when you launch your media player of choice, you get titles and movie poster thumbnails instead of generic icons and an endless list of "Unknown"s. That means the next step is for all those video files you have on your drive need to be identified. To generate metadata, your media needn't be in any specific layout, but the closer you get your files to easily-parsed entities, the better. It helps, I have found, to at least separate TV shows from Movies. It also helps to pre-emptively recognise when something really is too independent to be identified; you'll just have to sort through your [obscure](https://www.youtube.com/channel/UCUbRDEBC36teNzs4nbUw_Mw) [nerd](https://www.youtube.com/channel/UC08MSCPIk5InIwVLTQfWfeg) [podcasts](http://scannerdrome.com), collection of [Let's-Plays](https://www.youtube.com/user/lejonicom), [indie](http://haphead.com/) [web series](http://www.referencepointseries.com/about) and [leekspins](https://www.youtube.com/watch?v=GFPmARQHylY), yourself. In terms of everything else, the very existence of digital media is, strangely, *still* a hotly debated topic, so there isn't really an industry-standard schema for naming and sorting. Schemata have emerged, and at least in my experience it seems that Kodi's preferred format is the leader. Once TMM has listed the movie files it has found on your drive, click the Magnifying Lens icon in the top toolbar to start scraping the web for data. Kodi (and many other projects) expect to find one movie per directory, with the directory title and the movie file it contains being in the basic format of `Movie Title (Year)`; for instance, in a directory called `Infest Wisely (2007)`, I can place the movie file `Infest Wisely (2007).webm`, and half of TinyMediaManager's work is done. From that information, TMM can accurately identify the movie authoratatively, and then pull in all the data the web has to offer about it. Not provided with such explicit identification, TinyMediaManager makes every effort to parse whatever you do give it. Generally, it's pretty smart and will at least propose titles that seem to match up to your file names. Names like `infestWisely-jimMunroe-anarchistSciFi-xvid-SD.mp4` might result in prompts for movies containing the words "infest" and "anarchist" and maybe a few others, but chances are good that one will be the right hit, and TMM will let you choose which to use. ![Metadata](1tmmUI.jpg) Metadata can be sourced from a wide variety of websites, from the most obvious but not necessarily most reliable (IMDB) to several others, like [themoviedb.org](http://themoviedb.org), Rotten Tomatoes. You can even use more than one as a source, which I have found generally to render impeccable results. ![Metadata](3tmmUI.jpg) In the **TinyMediaManager** > **Settings** panel, you can even choose what metadata you want to pull from the web. For instance, I opt out from pulling data about a movies "genre", or its trailer, or rating. ## Manual Override Some things, for whatever reason, cannot be identified; maybe you had to split a movie into two parts, or maybe you've done a fan re-edit of a film that you prefer to the original, or maybe you've made your own movie from scratch and the world has yet to discover it. In these cases, you can manually create your own metadata from within the TinyMediaManager interface. Predictably, the **Edit** button is the pencil icon in the top toolbar. Select a movie to edit and click the **Edit** button to add or change information about any movie file. ![Editing Metadata](2tmmUI.jpg) All metadata about a movie or TV show gets saved into the directory containing the media file. This means that there's a natural association between a movie file and the data about that file, so there's no messy database required (although TMM maintains one, but that's just for its own features) to keep track of what data goes with what file. It's all on your file system, completely independent of any one media client, and entirely human and computer parse-able. ## Cut, and Print The point of TinyMediaManager isn't *necessarily* to be a pedant about your movie collection. The end result of finally getting your movies and tv shows in order is that they look really nice when browsing your collection in your favourite media center. ![The Kodi Interface](kodi.jpg) There are, certainly, several other media management applications out there, including the terminal-centric [Kolekto](https://github.com/NaPs/Kolekto), [MediaElch](http://www.kvibes.de/mediaelch/download/), and others. Tiny Media Manager, however, balances nicely between providing the basic features plus a few extras that make "offline" (I mean, outside of Kodi, or your media center of choice) viewing a pleasure.