MP4 Video to MP3 File Using ffmpeg

81 篇文章 0 订阅

MP4 Video to MP3 File Using ffmpeg (Ubuntu 9.10 Karmic Koala)

Here's how you can use ffmpeg to convert avideo (an MP4 video, for example) to an MP3 that you can load on your MP3player:
    ffmpeg -i video.mp4 -f mp3 -ab 192000 -vn music.mp3
But there's a catch: You have to have ffmpeg and thelibavcode-unstripped-52 packages installed on your computer. The problemis that second package is available in the multiverse respository only. Toenable the multiverse repository, select Administration from the Systemmenu, then Software Sources. In the Ubuntu Software tab of the SoftwareSources dialog box, select the check box that reads Software RestrictedBy Copyright Or Legal Issues (Multiverse). Click the Close button whenyou're done.

After you've enabled the multiverse repository, you can install the ffmpegand libavcodec-unstripped-52 packages from a Terminal window with thefollowing command:

    sudo apt-get install ffmpeg libavcodec-unstripped-52
Now, let's go back to the options that I used with the ffmpeg command atthe beginning of the article. The -i video.mp4 option is easy: itidentifies the path to the input file. The -f mp3 option tellsffmpeg that we want the output format to be MP3. The -ab 192000bit tells ffmpeg that we want our MP3 encoded at 192Kbps. The -vn optionmeans "No video in the output". Finally, "music.mp3" is just the name wewant to give to the output file.

That's it! Now, if you could justfigureout how to download video from popular sites on the Internet, you couldextract MP3 audio from your downloads!


http://donnieknows.com/blog/mp4-video-mp3-file-using-ffmpeg-ubuntu-910-karmic-koala

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值