[Bash] Convert wav to mp3 via ffmpeg
source link: http://siongui.github.io/2016/02/22/bash-wav-to-mp3-via-ffmpeg/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Question
Convert 9dt/9dtXXX.wav to output/9dtXXX.mp3, where XXX are numbers from 000 to 094.
Answer
Install ffmpeg:
# install ffmpeg on Ubuntu Linux 15.10 $ sudo apt-get install ffmpeg
The bash script to convert wav to mp3 via ffmpeg:
#!/bin/bash OUTPUTDIR="output" mkdir -p $OUTPUTDIR for i in {000..094} do ffmpeg -i 9dt/9dt$i.wav $OUTPUTDIR/9dt$i.mp3 done
Save the above bash script as wav2mp3.sh
Run the script by:
$ bash wav2mp3.sh
Tested on Ubuntu Linux 15.10
References:
[1]Google search: linux convert wav to mp3
[2]Converting WAV Files to High Quality MP3 Using Linux terminal - Stack Overflow
[3]Why would I choose Libav over FFmpeg, or is there even a difference? - Super User
[4]software installation - Is FFmpeg missing from the official repositories in 14.04? - Ask Ubuntu
Recommend
-
57
404 — Page not found Page not fou...
-
3
wav文件解析 2019-06-03 ...
-
8
Mass convert WMA to MP3 using ffmpeg and ruby Posted: 2010-09-11 - Last updated: 2019-06-05 Tagged
-
10
C语言解析WAV音频文件昌维我不生产代码,我只是代码的搬运工。在计算机中有着...
-
9
Convert YouTube to Mp3 using 4K YouTube to MP3 ConverterHave you been looking for an application that you can use to convert your YouTube videos to something more like MP3? As you know MP3 only takes up about a 10th of the storage size as a C...
-
2
Flac to MP3 320kbps conversion via ffmpeg · GitHub Instantly share code, notes, and snippets.
-
3
Convert mp3's to m4b using `ffmpeg` · GitHub Convert mp3's to m4b using `ffmpeg` Let's imagine we have a lot of mp3 files ( forexample one of the pluralsite courses co...
-
2
How to Convert YouTube to MP3 with YT Saver YouTube Converter
-
5
To convert audio mp3 to MP4 by ffmpeg, use the following command ffmpeg -f lavfi -i color=c=black:s=1280x720:r=5 -i audio.mp3 -crf 0 -c:a copy -shortest output.mp4 Description This generates mp4 fo...
-
4
本文将详细分析不同格式的wav文件。 wav即wave(下文统称为wav), 该文件格式是由微软开发的用于音频数字存储的标准,可应用于Windows、Linux和MacOS等多种操...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK