linux convert mp3 to wav and opus to wav
link : https://www.cyberciti.biz/faq/convert-mp3-files-to-wav-files-in-linux/
Install mpg321 or mpg123
Type the following command under Debian / Ubuntu Linux, enter:
sudo apt-get install mpg321
OR
sudo apt-get install mpg123
I recommend using mpg123 as it is updated frequently.
Install mpg123 under CentOS / RHEL / Fedora Linux
Turn on rpmforge repo and type the following command:
yum install mpg123
Convert an MP3 to WAV
The -w option will convert an .mp3 file to .wav file. The syntax is:
mpg123 -w output.wav input.mp3
OR
mpg321 -w output.wav input.mp3
A Sample Shell Script Helper Function
Add the following to your ~/.bashrc startup file (tested with bash v3.x+):
mp3towav(){ [[ $# -eq 0 ]] && { echo "mp3wav mp3file"; exit 1; } for i in "$@" do # create .wav file name local out="${i%/*}.wav" [[ -f "$i" ]] && { echo -n "Processing ${i}..."; mpg123 -w "${out}" "$i" &>/dev/null && echo "done." || echo "failed."; } done }
Use it as follows:
mp3towav *.mp3 mp3towav "this is a test.mp3" ls *.wav
在 Linux 上使用 Opus Tools 將音樂轉成 Opus 格式
装一下opus-tools即可
sudo apt-get install opus-tools
Opus Tools 包含什麼工具?
Opus Tools 包含了以下幾種工具:
- opusdec:Opus 的解碼器。
- opusenc:Opus 的編碼器。
- opusinfo:Opus 檔案的資訊顯示器。
- opusrtp:發送 Opus 音訊至 RTP 串流,或從 RTP 串流接收 Opus 音訊。
详细的,看一下链接
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 零经验选手,Compose 一天开发一款小游戏!
· 一起来玩mcp_server_sqlite,让AI帮你做增删改查!!