zoukankan      html  css  js  c++  java
  • 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 音訊。

    详细的,看一下链接

  • 相关阅读:
    会跳舞的树(只用HTML+CSS)(转)
    国内UED收录
    HDU 1078 dfs+dp
    HDU 1278
    HDU 4499
    HDU 4597
    POJ2777
    POJ1780 Code
    简单的Fleury算法模板
    POJ 2513 无向欧拉通路+字典树+并查集
  • 原文地址:https://www.cnblogs.com/dahu-daqing/p/9542482.html
Copyright © 2011-2022 走看看