20

I have a few thousand MP3 files and they are all of mixed bitrate.

I would like to run a program that can batch encode them all to 128 kbps. Are there any decent and free solutions for this for Windows?

  • 2
    Any particular reason why? They'll likely sound worse than when going directly to 128 kbit/s from the CD if you re-encode them. And hard drive space is quite cheap these days – Joey Jun 27 '10 at 17:10
  • My sister-in-law has about 9gb of music on the family computer and she continually screws up the machine. I then have to come over, transfer the music to a laptop, and then transfer it back after a reformat. She won't notice the difference in quality between 256 kbps and 128 kbps and the transfer time for her music collection will be almost cut in half. – FireFly Jun 27 '10 at 17:42
  • 1
    ^ wow, that's evil! Imagine what she will do when she finds out. – Display Name Nov 9 '14 at 21:09
29

Simple: here's a free one: http://winff.org
Run it and add all your files then go to options button and the audio settings tab and change audio bitrate to 128.

It will take a while and bring up a command prompt where it does its magic with ffmpeg

Advanced: if you are into command lines, you can download ffmpeg and use the below command line to convert a file: ffmpeg -i source.mp3 -vn -ar 44100 -ac 2 -ab 128 -f mp3 output.mp3

If you put it into a batch file, you can convert a whole bunch at once. mine looks like this:

---convert.bat----

set formats=*.mp4 *.flv
set presets=-vn -ar 44100 -ac 2 -ab 192k -vol 400 -f mp3
set outputext=mp3

for %%g in (%formats%) do start /b /wait "" "%~dp0bin\ffmpeg.exe" -i "%~dp0%%g" %presets% "%~dp0%%~ng.%outputext%" && TITLE "Converted: "%%g

--end---
8

My sister-in-law has about 9gb of music on the family computer and she continually screws up the machine. I then have to come over, transfer the music to a laptop, and then transfer it back after a reformat. She won't notice the difference in quality between 256 kbps and 128 kbps and the transfer time for her music collection will be almost cut in half.

I don't think the problem you have is converting mp3, but having a fast recovery process from your sister-in-law machine.

So, I suggest the following:

  • Create another partition (D: for example). C: is where you install your OS (I'm assuming it's Windows) and D: is where you keep all personal files. It's possible to move "My Documents" to another folder.
  • After formatting the machine, create a Ghost Image from your C: drive, and record a dvd with it or store on the D: partition. (You can try an OSS alternative to Ghost named Clonezilla as well)

When your sister-in-law screws up the machine, you just need to restore the Ghost Image (in 10 minutes) in your C: drive. All files in D: are kept intact.

(If you don't like my suggestion and still want to reencode the mp3s, you can use foobar2000, a free windows audio player (it can convert files too) application.)

4

dbPowerAmp is what I use. There is a 21 day fully functional trial, and it can handle everything in batches.

http://www.dbpoweramp.com/dmc.htm

  • Dbpoweramp is such a well written program. Thanks! – Matthew Lock Dec 6 '13 at 9:39
0

Converting MP3 to MP3 can cause serious audio quality problems, it is best to convert them to .wav files first, then encode them back to your desired bit rate. Regardless of what method you use, the converted files will be of lesser quality than the original MP3.

DB PowerAmp is probably the best solution to keep the directory structures intact and is great for batch work.

DB Poweramp use to be free, there may be old versions (Version 10) of it floating around on the internet somewhere, http://www.videohelp.com/tools/dBpowerAMP, you will need to download codecs and install them After DB is installed.

http://www.dbpoweramp.com/legacy/codec-central-legacy.htm

  • 6
    While you're right that transcoding from .mp3 to .mp3 will reduce quality, converting back to .wav and then re-encoding to .mp3 isn't going to help anything. In fact, almost every transcoder already does exactly this behind the scenes. – afrazier Jun 28 '10 at 1:08
  • Not the ones I have used like DB or CDEX, I can hear the difference using both methods, at least that has been my observation. – Moab Jun 28 '10 at 13:02
  • 1
    @Moab converting to WAV in between is the same or worse as doing it directly, because if you use low bit depth (16 or 24 bits per sample), you add additional quantization noise — this is awful. Of course, if a crappy software does it worse when doing it directly, it simply should not be used for this task… – Display Name Nov 9 '14 at 21:14
0

Format Factory: http://www.pcfreetime.com/formatfactory/

Can bulk convert virtually any media format to any other. I have used this to alter resolution and bitrate on videos as well as downsample audio files.

0

This is going to take a very long time on 9 gb, but a naive approach that I'm using is to walk the folder structure, locate mp3s and plop anything that isn't already 128kbps into ffmpeg which needs to be installed and on the path. I tested this on Windows but haven't benchmarked against any of the industrial-strength solutions. Use at your own risk--it destroys the original files.

To improve speed, you can fork a few processes for each available core either in the Perl script or manually and run each on a subset of the folders/files since the task is embarrassingly parallel.

# Convert files to mp3 recursively using ffmpeg, destroying originals

use strict;
use warnings;
use File::Copy;
use File::Find;

my $verbose = 0;
my $target_bitrate = 128;

# any mp3s above this bitrate will be converted to $target_bitrate
my $threshold_bitrate = 128; 

sub process {
    if (-f $_ && $_ =~ /\.mp3$/) {
        my $file = $_;
        my $info = `ffmpeg -i \"$file\" 2>&1`;
        $info =~ /^\s*Stream.+Audio: mp3.+?(\d+) kb\/s$/m;

        return if $1 <= $threshold_bitrate;

        print "$file\n" if $verbose;
        my $cmd = "ffmpeg -i \"$file\" -hide_banner -loglevel warning -vn ".
                  "-write_id3v1 1 -id3v2_version 3 ".
                  "-b:a ${target_bitrate}k \"____$file\"";
        system($cmd) == 0 or die "$0: [$cmd] failed: $?\n";
        move("____$file", $file) or die "move failed: $!";
    }
}

find(\&process, $ARGV[0] || ".");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.