Chinaunix首页 | 论坛 | 博客
  • 博客访问: 25529
  • 博文数量: 11
  • 博客积分: 601
  • 博客等级: 上士
  • 技术积分: 120
  • 用 户 组: 普通用户
  • 注册时间: 2010-02-07 22:11
文章分类

全部博文(11)

文章存档

2010年(11)

我的朋友
最近访客

分类: LINUX

2010-03-21 17:13:04

You can easily extract audio from video files such as avi, mpg, even flv! into mp3 uses either mplayer or ffmpeg. You can even record online stream into mp3, such as stream from radio cast.
Lets begin with mplayer. To extract audio from video files, use -dumpaudio option and specified the output filename with -dumpfile
mplayer -dumpaudio nodame_theme.flv -dumpfile nodame_theme.mp3
Okay check out the output:
file nodame_theme.mp3Output:
MPEG ADTS, layer III, v2,   8 kBits, 22.05 kHz, Monaural
Okay, The audio extracted from flv, so quality is quite low, haha. But you can change the audio rate by using ffmpeg. Let see how to use ffmpeg.
ffmpeg -i nodame_theme.flv -ab 128 -ar 44100 nodame_theme.mp3
-i is to specified input file, -ab audio bitrate, -ar audio sampling frequency
Let say what file tells you.
MPEG ADTS, layer II, v1, 128 kBits, 44.1 kHz, Monaural
How about record online stream?
First, find an online radio cast to try, you can have plenty of it from shoutcast.
mplayer -dumpstream -dumpfile smoothjazz.mp3
ffmpeg -i -ab 128 -ar 44100 smoothjazz.mp3
阅读(861) | 评论(0) | 转发(0) |
0

上一篇:sed

下一篇:没有了

给主人留下些什么吧!~~