0

Short version: What are the best settings to convert low-audio-quality WAV files into MP3 to save space? I plan on using ffmpeg.

Hi, first time caller, long time listener, I have 22 GB of about 340 air-recorded phone conferences that I'd like to convert from WAV to MP3 to save space on my HD.

The audio was captured on separate audio recorder phone apps or USB audio recorders sitting next to my cell phone. - in other words, the quality is telephonic through my phone speaker, or me in open air. All of the audio is in WAV format, and much higher quality than needed for phone audio. All recordings are two channel, even though the input is mono.

I've pulled some into Audacity to convert - nice because I can see all of the levels, and chop off dead air, but very time consuming.

I have played with ffmpeg for converting, and I can write a script to do all of the recordings in a batch, but I don't know good settings. I've tried defaults (44khz, 2 channel, 128kbps, etc.), but the results are close to, as big as, or bigger than the WAV files. I've tried single channel (stereo mix), but that is larger.

Are there any better settings? Anything recommended to still keep the (admittedly marginal) phone audio and self, but lose the size?

Thank you.

Update: I thought that the recordings were lossless WAV format. Instead, they were adpcm (adaptive differential pcm). Checked the audio bandwidth in samples, it was at/below 8000 hz for all samples.

Processing through ffmpeg showed the encoding to be Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 16000 Hz, 2 channels, s16p, 128 kb/s

I wound up choosing the options:

-ar 16000 -ab 24000 -ac 1 -f mp3 [ audio sample rate = 16000, bitrate = 24000, mix the two channels down to 1, enforce mp3 output format ]

This has shown about a 5:1 size reduction [ 89.2 MB input size, 16.7 MB output size ].

  • How big are the individual WAV files you're converting? – user9881 Aug 29 '16 at 18:54
  • The file sizes range from under a meg to ... a couple 100 Meg or more. These are from cheap USB audio recorders - 8GB memory, the devices chop long recordings into 112 MB or 225 MB max sizes. I have a couple larger files from early attempts to use Android apps to record conferences. – Marc Aug 29 '16 at 21:57
  • I didn't think about the file size having anything to do with it, or need for sampling. I took a "smaller" 15MG file to test against. I just figured I had really bad settings. I'll try your recommended settings, and also try on one of the larger files. – Marc Aug 29 '16 at 22:00
  • By converting wav to mp3 you shouln't get close file sizes. This is really weird, can you put in your post you ffmpeg command line? Best. – JSmith Aug 30 '16 at 7:37
  • 1
    Check my comments on sound.stackexchange.com/questions/39699/… - same thing applies... We need to know the input format before we can advise on an output format – Tetsujin Aug 30 '16 at 18:56
1

Since the desired audio is already telephony quality, you might as well set your conversion around those standards: 8kHz sample rate, 64kbps, mono. http://www.voxforge.org/home/docs/faq/faq/why-record-at-highest-sampling/bits-per-sample-rates


One caveat, the compression algorithm just might not have much data to work with in the first place (How big are the individual WAV files you're converting?), so your space savings would be marginal (otherwise I'm not sure how 44.1k,128kbps mps could fail to give large space savings).

0

You could try using LAME instead of FFmpeg.
I haven't used either for a long time, but I read quite a bit about LAME recently, and I'm pretty sure you could get a good result from it.

Useful options for you:

  • gapless encoding for a set of contiguous files
  • downmix stereo file to mono file for mono encoding
  • get only the left channel of a stereo signal for a mono output
  • get only the right channel of a stereo signal for a mono output

  • lowpass filter cutoff above freq. Range [0.001..50]kHz or [50..50000]Hz

  • lowpass window width. Range [0.001..16]kHz or [16..50000]Hz
  • highpass filter cutoff below freq.Range [0.001..16]kHz or [16..50000]Hz
  • highpass window width.
  • --preset phone -b 16 -m m
  • --preset phon+ / lw / mw-eu -b 24 -m m

The usage page is full of useful options and switches to help you to encode with the best settings for your situation. Check what frequency range you need to keep then encode a mono test file with the lowest possible settings(like DoritoStyle's parameters) with highest quality encoding, and relevant high-pass and low-pass settings, see how it sounds and go from there.

References
LAME Project(download source, info etc)
LAME compiled by RareWares

  • FFmpeg doesn't have a native MP3 encoder - usually LAME is used via a library. – Gyan Aug 31 '16 at 20:39

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.