Resampling audio data

I’ve never done much with audio data, so when I had to write some audio files to cd, and they weren’t sampled at the right rate, I had a problem. Fortunately, I found sox:

sox input.wav -r 44100 output.wav resample

did the job.
And I tought it was going to be difficult 🙂


Comments

2 responses to “Resampling audio data”

  1. Nice that helped me too 🙂

  2. jarcogna avatar

    /usr/lib/libavutil.so.49
    /usr/lib/libavutil.so.49.4.0
    for i in *.m4a; do
    faad -w “$i”|lame -h – “${i%m4a}mp3”;
    done
    I realise that the following has nothing to done with this thread…
    However, I´ve tried quite hard to add my comment to the correct thread, but it seems that unless a comment already exists on a thread, you can not add a commment to the thread 🙁
    I´m sure I doing something stupid, like using Firefox on Linux, instead of IE on Windows, but hey, as this is a Linux site…
    I would like to add the following:-
    Thread: Converting AAC audio files to mp3
    Yes, I agree, most times, it is just simple. However, in my case it was not.
    I tried to get ffmpeg installed on my system (Fedora Core 6), and it took me ages, as I use http://rpm.livna.org/fedora/
    I already had vlc installed, which requires ffmpeg-libs, so when I tried to install ffmpeg, yum complained that ffmpeg-libs had conflicts with some libraries that ffmpeg needs to install. Weird huh, but try this on a fresh install of FC6, and you´ll see what I mean.
    I ended up downloading the rpm manually, and forcing the installs.
    Now that I have ffmpeg, I thought cool, now your little simple script should work.
    However, I forgot about licensing, someone´s screwed up ffmpeg so it no longer supports AAC as an input codec 🙁
    I then found that someone else on the net, had come across this problem, so they had downloaded the source for faad2, complied it, installed it, and voila…
    Well no actually, that was just another nightmare, that didn´t work.
    So I did a bit more searching on the web, and found the following:-
    http://gimpel.gi.funpic.de/wiki/index.php?title=Howto:convert_aac/mp4_to_wav/mp3/ogg_on_Linux
    What I´ve found, is that what ffmpeg is actually using, is a program called faad, which was already installed on FC6, so to make thing even SIMPLER, the new script is:-
    for i in *.m4a; do
    faad -w “$i”|lame -h – “${i%m4a}mp3”;
    done

Leave a Reply

Your email address will not be published. Required fields are marked *