我需要转换音频文件到mp3使用FMPEG.
当我以ffmpeg -i audio.ogg -acodec mp3 newfile.mp3
的身份编写命令时,我得到以下错误:
FFmpeg version 0.5.2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration:
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 1 / 52.20. 1
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
built on Jun 24 2010 14:56:20, gcc: 4.4.1
Input #0, mp3, from 'ZHRE.mp3':
Duration: 00:04:12.52, start: 0.000000, bitrate: 208 kb/s
Stream #0.0: Audio: mp3, 44100 Hz, stereo, s16, 256 kb/s
Output #0, mp3, to 'audio.mp3':
Stream #0.0: Audio: 0x0000, 44100 Hz, stereo, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Unsupported codec for output stream #0.0
我还运行了以下命令:
ffmpeg -formats | grep mp3
并得到了这样的回应:
FFmpeg version 0.5.2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration:
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 1 / 52.20. 1
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
built on Jun 24 2010 14:56:20, gcc: 4.4.1
DE mp3 MPEG audio layer 3
D A mp3 MP3 (MPEG audio layer 3)
D A mp3adu ADU (Application Data Unit) MP3 (MPEG audio layer 3)
D A mp3on4 MP3onMP4
text2movsub remove_extra noise mov2textsub mp3decomp mp3comp mjpegadump imxdump h264_mp4toannexb dump_extra
我猜mp3编解码器没有安装。我是不是走对了路?
发布于 2010-07-25 03:06:37
不要紧,
我正在使用以下命令将我的音频文件转换为mp2:
ffmpeg -i input.wav -f mp2 output.mp3
此命令可以完美地工作。
我知道这实际上会将文件转换为mp2格式,但得到的文件大小是相同的。
发布于 2016-05-18 19:39:30
1) wav到mp3
ffmpeg -i audio.wav -acodec libmp3lame audio.mp3
2) ogg to mp3
ffmpeg -i audio.ogg -acodec libmp3lame audio.mp3
3) ac3到mp3
ffmpeg -i audio.ac3 -acodec libmp3lame audio.mp3
4) aac到mp3
ffmpeg -i audio.aac -acodec libmp3lame audio.mp3
发布于 2017-01-04 19:58:58
对于文件夹中文件的批处理,目标是190VBR,文件扩展名= .mp3,而不是.ac3.mp3,您可以使用以下代码
将.ac3更改为任何源音频格式。
for f in *.ac3 ; do ffmpeg -i "$f" -acodec libmp3lame -q:a 2 "${f%.*}.mp3"; done
https://stackoverflow.com/questions/3255674
复制相似问题