Page 1 of 1
How to change sample rate of bulk .wav files with bash script?
Posted: Tue May 18, 2021 11:59 pm
by taersh
Hi.
I want to change the sample rate of a bulk of .wav files from 48000 to 44100. How can I do this via bash script and e.g. ffmpeg?
Perhaps there's something other/easier to use than ffmpeg?
Thanks
Re: How to change sample rate of .wav file?
Posted: Wed May 19, 2021 12:12 am
by Flash
If your pup has Menu -> Multimedia -> FFConvert multimedia converter, I'd say look into it. The UI takes some getting used to but I think you'll be able to do what you want with it. There are several other Puppy programs that might work. I think they all use ffconvert. Multimedia -> mhWaveEdit is a very powerful program. You drag the file you want to change into its window, then play around with it.
Re: How to change sample rate of .wav file?
Posted: Wed May 19, 2021 12:34 am
by taersh
Thanks, but no. I don't have FFConvert installed.
Where to find?
Re: How to change sample rate of .wav file?
Posted: Wed May 19, 2021 1:01 am
by Grey
Re: How to change sample rate of .wav file?
Posted: Wed May 19, 2021 1:15 am
by taersh
@Grey
Thanks.
I have QWinFF installed and it does what I want.
But I still would like to know how to do this via bash script and ffmpeg (or whatever tools are there).
Re: How to change sample rate of .wav file?
Posted: Wed May 19, 2021 1:56 am
by Grey
taersh wrote: Wed May 19, 2021 1:15 am
(or whatever tools are there).
Maybe then SoX. "Swiss Army knife of sound processing". Old but good. It is in PPM. Something like:
HELP
Re: How to change sample rate of .wav file?
Posted: Wed May 19, 2021 2:01 am
by taersh
Thanks.
I have Sox installed. Will try this.
Re: How to change sample rate of .wav file?
Posted: Fri Aug 06, 2021 5:58 pm
by kiash
You can use ffmpeg commad line tools to change sample rate of .wav file
ffmpeg.exe -i "Audio Input FilePath" -b:a 64k "Audio Output FilePath"
Re: How to change sample rate of .wav file?
Posted: Sat Aug 07, 2021 5:44 am
by Grey
ffmpeg.exe -i "Audio Input FilePath" -b:a 64k "Audio Output FilePath"
Hi. First, you seem to be used to Windows
Secondly, even if you remove the .exe, it will hardly work. The starter of the topic says about sampling frequency (Hz), and you have bitrate (kbit/s).
Therefore, the command should be like this:
Code: Select all
ffmpeg -i test.wav -ar 44100 test1.wav