安装软件
apt-get install mpg321 vorbis-tools
使用如下命令转换
mpg321 tweet.mp3 -w raw && oggenc raw -o tweet.ogg && rm -rf raw
示例:
root@hkvps:/home/res# mpg321 tweet.mp3 -w raw && oggenc raw -o tweet.ogg && rm -rf raw
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.3.2-1 (2012/03/25). Written and copyrights by Joe Drew,
now maintained by Nanakos Chrysostomos and others.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Playing MPEG stream from tweet.mp3 ...
MPEG 1.0 layer III, 192 kbit/s, 44100 Hz joint-stereo
[4:45] Decoding of tweet.mp3 finished.
Opening with wav module: WAV file reader
Encoding "raw" to
"tweet.ogg"
at quality 3.00
[ 99.7%] [ 0m00s remaining] |
Done encoding file "tweet.ogg"
File length: 4m 45.0s
Elapsed time: 0m 16.3s
Rate: 17.5056
Average bitrate: 112.1 kb/s
root@hkvps:/home/res# ll