Buy @ Amazon

Search This Blog

September 1, 2014

Automate title metadata tag to its file name

Don't see media titles in your playlist of your media player. Chances are the title meta-data isn't set for those files. This blog post is a recipe to fix this situation, assuming you're a developer :)

Today, I tried to extract some of the media content from my old CDs so that I can play them in my computer that is devoid of CD drive. Who uses a CD drive these days ;-/

When I tried adding them to my media-player, I found that I don't see the names of the songs in my playlist. This kind of disappointed me.

Here is what I did to fix this situation.
Step 1: Install taglib in your OS.
Step 2: Install the taglib-ruby gem [Note: I've Ruby installed in my system.]
Step 3: Save the script  to my directory containing the said media files.
Step 4: Run the script from terminal like below:
          $ ruby modify_title_metadata_tag.rb          

For quick peek, the above mentioned Ruby Script is below.

Hope it helps you as well. Cheers!