Tuesday, November 11, 2008

Now, was that so hard?

A quick update.



  1. PLUR: DoaR is dead. I killed it. Not enough time and it sucked, anyway.

  2. I now run an Internet radio station, co-DJ'd with Kyo-sama. It's called SubLevel 21.


Now, this post is all about audio formats. Specifically, resampling. What I use on my server to broadcast is called sc_trans_linux040. Support is still experimental, but it works well enough. Now, a common problem with sc_trans is that it does not handle anything with a sample rate other than 44.1 kHz. I have some of my songs encoded at 48 kHz.
The error goes as such:

Warning: input file samplerate is 48000 Hz, must be 44100!
or
Warning: input file samplerate is -1209601104 Hz, must be 44100!
It was literally impossible to find a guide online of how to re-encode mp3s. So, here you go. Note that this guide requires a basic understanding of Terminal (or at least DOS).



  1. Open your favorite Terminal application.

  2. Enter in the following commands and let them run:

    • sudo apt-get install mpg123

    • sudo apt-get install lame


  3. cd to directory containing the mp3.

  4. Enter in the following commands (in order) and let them run:

    • sudo mpg123 -w <filename>.wav <filename>.mp3

    • sudo rm <filename>.mp3

    • sudo lame --resample 44.1 <filename>.wav <filename>.mp3



This process does not work on Windows. Why? Because Windows doesn't really use RAW audio for its wav files. It uses a proprietary audio codec that doesn't compress, similar to FLAC.

0 comments: