Showing posts with label mp3. Show all posts
Showing posts with label mp3. Show all posts

Monday, September 2, 2013

Editing ID3 tags from command line using Python.

You can build a Python module from scratch just to edit ID3 tags, but there is no need to reinvent the wheel since there are many modules ready for this job.I have been using http://id3-py.sourceforge.net which is very straightforward , anyway, here is a little How-to
* Download the module and extract it to any directory you like
* Navigate to the directory where you extracted the module to
cd /ID3/id3-py-1.2
*Install the module
sudo python setup.py install
* If there is no errors , you are ready to go.
download this python script created by the same author ,
http://id3-py.sourceforge.net/ID3/id3-tagger.py
make it executable
chmod  a+x id3-tagger.py
 , you can copy the file to the home directory for an easier access
we are almost done,
here is an example on how to use the file
find ./ -d 1 -name '*.mp3' -exec ~/id3-tagger.py -A 'soundcloud' {} \;

this command will search for any mp3 file in the directory [not recursively] , then will modify the Album tag to soundcloud , you can modify/add different tags to the command as you wish.

Sunday, October 7, 2012

How to merge audibook mp3 files into one ?

I have a first edition Nook e-reader for a quite long period of time, it's a good device that makes reading experience more enjoyable. Last week, my long beloved Ipod classic (along with the massive audiobooks lodaded) was stolen while I was in the hospital.So, I needed a replacement at least to pass the one hour I spend driving back and forth from the hospital, it was good to know Nook supports wide variety of audio files ,including mp3 and ogg =) , the problem was it's not as good as the I-pod, no ability to organize music libraries efficiently was one the cons,so you can imagine how navigating thru an audiobook with tens of mp3 files would be like, I decided to merge the mp3 files into one .
on linux you can do so by using this command (on windows you still can use it providing you installed Cygwin)

cat *.mp3 > the_audiobook_name.mp3

to fix the headers and the other tags using Foobar2000 in windows or Diags in linux
Thank you...