ffmpeg问题汇总

系统环境:Ubuntu 12.04

一、今天想将acc转换为mp3格式,执行该命令:

ffmpeg -i 町は賑やかに.aac -acodec libmp3lame -ab 192k 町は賑やかに.mp3
提示错误“Unknown encoder 'libmp3lame'”。后来安装以下解决:
sudo apt-get install libavcodec-extra-53
如果需要,可以直接安装附加受限软件,一次性解决一些问题。这些软件包括:cabextract ffmpeg flashplugin-installer gstreamer0.10-plugins-bad-multiverse libavcodec-extra-53 libavutil-extra-51 libfaac0 libmjpegtools-1.9 libnspr4-0d libopenjpeg2 libquicktime2 ttf-mscorefonts-installer ubuntu-restricted-addons ubuntu-restricted-extras unrar。命令如下:
sudo apt-get install ubuntu-restricted-extras


二、常见音频转换

:wav to mp3
ffmpeg -i audio.wav -acodec libmp3lame audio.mp3
:wav to ogg
ffmpeg -i audio.wav  -acodec libvorbis audio.ogg
:wav to aac
ffmpeg -i audio.wav  -acodec libfaac audio.aac
:wav to ac3
ffmpeg -i audio.wav -acodec ac3 audio.mp3
:ogg to mp3
ffmpeg -i audio.ogg -acodec libmp3lame audio.mp3
:ogg to wav
ffmpeg -i audio.ogg audio.wav
:ogg to aac
ffmpeg -i audio.ogg  -acodec libfaac audio.aac
:ogg to ac3
ffmpeg -i audio.ogg -acodec ac3 audio.ac3
:ac3 to mp3
ffmpeg -i audio.ac3 -acodec libmp3lame audio.mp3
:ac3 to wav
ffmpeg -i audio.ac3 audio.wav
:ac3 to aac
ffmpeg -i audio.ac3  -acodec libfaac audio.aac
:ac3 to ogg
ffmpeg -i audio.ac3 -acodec libvorbis audio.ogg
:aac to mp3
ffmpeg -i audio.aac -acodec libmp3lame audio.mp3
:aac to wav
ffmpeg -i audio.aac audio.wav
:aac to ac3
ffmpeg -i audio.aac  -acodec ac3 audio.ac3
:aac to ogg
ffmpeg -i audio.aac -libvorbis audio.ogg



你可能感兴趣的:(ffmpeg问题汇总)