I just want to convert all the 320kbps in my WALKMAN to 128kbps since they are heavy. Of course, converting all 8GB would be so long, as a .5GB 320kbps album would take half an hour in here. I can wait for 6 hours to convert 3GB, but I can't wait for all 8GB to convert from 128kbps to 128kbps, since the 5GB in it is in 128kbps already. So the question here is how to I force Ubuntu to convert ONLY 320kbps files in my WALKMAN?
Here's a way to find all of your mp3 files which are over your specified bitrate and convert them to a lower bitrate. Be sure to read all the way to the end before starting, because there are two options for the actual transcoding: Clementine or script.
You'll need to install some packages:
To make a list of all your music files and their bitrates, execute the following after you replace /path/to/your/music appropriately:
Look at the file
transcode.kbps
and make sure it looks something like this (bitrate:filename):When that looks good execute this awk command, to create a playlist containing only the files higher than a specified bitrate (here all files with bitrate > 160 will be put into the m3u playlist):
Check the file
transcode.m3u
and make sure it looks OK. When it's good, your ready to transcode!Clementine Transcode Solution
Wait for your transcoding to finish.
The main problem with using Clementine at least on Ubuntu 10.04 Trusty with Clementine 1.2, the only option is to create a new file alongside the old file. I think if you have a music player connected, Clementine would let you transcode directly to the music player.
Since the files you want to convert are already on the music player, that presents a problem, because the new files may fill up your player.
Script Transcode Solution
It's a fairly trivial script to process the
transcode.m3u
withlame
to transcode the files and remove the old files as it goes. Save this into a file namedtranscode.sh
:Now you can execute:
and the script will transcode all the files, deleting the old file each time after the new one is successfully created by lame.
You can edit the lame command parameters in the transcode.sh script to do any other transcoding parameters you like.