Renaming Music Videos
Here’s my situation. I have a very large library of music videos, roughly 30,000-35,000 of them. In the earlier days of collecting, I adopted a naming convention that emphasized short filenames and a limited character set so that my videos would work with a serial-controlled computerized playback system that would choke on funky characters and long strings.
Almost 15 years later, my Windows NT-based Video Jukebox is long gone, replaced by the more modern media centre software Plex, and I want to likewise upgrade my filenames so they are more intelligible, searchable, and matchable to metadata providers. (I actually run a site that provides music video metadata - http://www.rockpeaks.com/web-services - via an API, and plan on building an agent for Plex, but that’s another story).
Here’s how my folder system is structured and files currently named:
/Music Video
------> /A
------> /B
------> /C
------> /Cabaret Voltaire
------> /Cage the Elephant
------> /Cake
------> /Cale, John
------>1975 06-07 - Crystal Palace Park
------>Cale_John_01_Fear_is_a_Man's_Best_Friend_Crystal_Palace_Park_75.mpeg
------>Cale_John_02_Buffalo_Ballet_Crystal_Palace_Park_75.mpeg
------>1985 - Old Grey Whistle Test
------>Cale_John_Dying_On_The_Vine_OGWT_85.mpeg
So you can see that while my folder names have spaces in them, my filenames do not, using underscores instead. And while the folder name has the full show name and full date, I very often abbreviated both in the filename itself to shorten its length. And where there is a sequence number to preserve the sort or playback order, those double-digit numbers come after the artist name.
The convention I’d ideally like to adopt for filenames going forward is this:
01 - John Cale - Fear Is A Man’s Best Friend - Crystal Palace Park - 1975.mpg
What I’d like to do is automate the following as much as possible (realizing that a certain amount of manual intervention is inevitable, and not all of this may be possible).
It seems to make sense to me to work from back to front on the filenames, given how they are structured. So:
(1) Convert to four digit years. The logic, as best as I can express it, would be something like this. Look for two digit numerals towards the end of a filename string and where the first of the digits is 2 or greater, prepend “ - 19”. If the the leading digit is less than 2, prepend “ - 20”.
This would result in the first of the files above having the new name:
Cale_John_01_Fear_is_a_Man’s_Best_Friend_Crystal_Palace_Park - 1975.mpeg
A couple of caveats. In some cases, the filename may already have a four digit year, in which case just the replacing of the underscore with a “ - “ would be required.
In some other cases, the year numerals are not the last characters before the file extension. Example:
ACDC_It’s_A_Long_Way_To_The_Top_Bandstand_76_(digital_rebroadcast).mpeg
(2) Very often the show name is abbreviated, as mentioned. Ideally, we would be able to grab the full show name from the containing folder, look for a full or partial partial match in the filename, and replace that match with the full name and a leading “ - “ , giving us:
Cale_John_01_Fear_is_a_Man’s_Best_Friend - Crystal Palace Park - 1975.mpeg
A potential issue with this one: Sometimes matching based on similar sequences of characters will be difficult or perhaps impossible, since an abbreviation has been used (Like the example above of “OGWT” for “Old Grey Whistle Test”). However, a limited number of abbreviations tend to occur frequently, I.e. TOTP for Top Of The Pops, SNL for Saturday Night Live etc.. so perhaps there is a way to draw on a reference table of common abbreviations?
(3) The third step would be to determine the division point between the song name and the artist name and place a “ - “ there. I could see how In cases where the two digit sequence numbers are present this would be easier, but there are lots of circumstances where there is just a single clip. In those cases, might it be possible to rely on a third-party matching service for artist names perhaps? Or maybe we go two levels up the folder tree and grab the name from there?
Or maybe this is a case where I would simple have to manually identify the division point once for an artist, and then for the remaining clips in that folder, Filebot would follow the same pattern? While I use the format "Last Name, First Name" for proper artist names in the folders, I would like to swap the order for the filenames themselves, and have a consistent and universally recognized exact spelling and formatting for artist names.
(4) The last step would be to swap the remaining underscores for spaces, and move the sequence numbers (if present) before the artist name instead of after it.
Thanks in advance for your help!
Barn