使用 FFMPEG 将 AMR 转换为 MP3

发布于 2024-10-13 11:24:57 字数 5821 浏览 6 评论 0原文

我正在尝试使用 FFMPEG 将 AMR 音频文件转换为 MP3。我在 Windows 7 主机上使用 VBox 在 Ubuntu 10.10 上运行,并且通过运行 sudo apt-get install ffmpeg 安装了 ffmpeg 我已经有一个之前记录的 AMR 文件,因此我运行了命令: ffmpeg -i myfile.amr myfile.mp3 转换失败,跟踪如下:

FFmpeg version 0.6-4:0.6-2ubuntu6, Copyright (c) 2000-2010 the FFmpeg developers
  built on Oct  5 2010 22:35:47 with gcc 4.4.5
  configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
  WARNING: library configuration mismatch
  libavutil   configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
  libavcodec  configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
  libavformat configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
  libavdevice configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
  libavfilter configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
  libswscale  configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
  libpostproc configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
[amr @ 0x8538420]Estimating duration from bitrate, this may be inaccurate
Input #0, amr, from '/home/octavius/share/1-aloalodwd.amr':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Audio: amrnb, 8000 Hz, 1 channels, flt
File '/home/octavius/share/1-aloalodwd.mp3' already exists. Overwrite ? [y/N] y
Output #0, mp3, to '/home/octavius/share/1-aloalodwd.mp3':
    Stream #0.0: Audio: 0x0000, 8000 Hz, 1 channels, flt, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Encoder (codec id 86017) not found for output stream #0.0
octavius@octavius-VirtualBox:~$ 

因此,根据该线程的指示 ffmpeg:将纯音频 flv 转换为 swf 我运行了命令 sudo apt-get install ffmpeg libavcodec-extra-52< /代码> 安装额外的库,我仍然有同样的问题。还有其他想法吗?

更新:也在线程中,他们链接到该网站以使其正常工作 http:// stephenjungels.com/jungels.net/articles/ffmpeg-howto.html 按照所有步骤操作,但仍然无法正常工作

I'm trying to convert AMR audio files to MP3 using FFMPEG. I'm running on Ubuntu 10.10 with VBox on Windows 7 host and i've installed ffmpeg by running sudo apt-get install ffmpeg I already have an AMR file that i've previously recorded so I ran the command: ffmpeg -i myfile.amr myfile.mp3 the conversion failed and the trace is as follows:

FFmpeg version 0.6-4:0.6-2ubuntu6, Copyright (c) 2000-2010 the FFmpeg developers
  built on Oct  5 2010 22:35:47 with gcc 4.4.5
  configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
  WARNING: library configuration mismatch
  libavutil   configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
  libavcodec  configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
  libavformat configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
  libavdevice configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
  libavfilter configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
  libswscale  configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
  libpostproc configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
[amr @ 0x8538420]Estimating duration from bitrate, this may be inaccurate
Input #0, amr, from '/home/octavius/share/1-aloalodwd.amr':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Audio: amrnb, 8000 Hz, 1 channels, flt
File '/home/octavius/share/1-aloalodwd.mp3' already exists. Overwrite ? [y/N] y
Output #0, mp3, to '/home/octavius/share/1-aloalodwd.mp3':
    Stream #0.0: Audio: 0x0000, 8000 Hz, 1 channels, flt, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Encoder (codec id 86017) not found for output stream #0.0
octavius@octavius-VirtualBox:~$ 

So as per the indications of this thread ffmpeg: convert audio-only flv to swf I ran the command sudo apt-get install ffmpeg libavcodec-extra-52
to install the extra libraries and i still have the same issue. Any other ideas?

UPDATE: also in the thread they link to this site to make it work http://stephenjungels.com/jungels.net/articles/ffmpeg-howto.html followed all the steps and it still won't work

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

谈场末日恋爱 2024-10-20 11:24:58

唉,那些关于无用的 ubuntu 软件包的无用的 ubuntu 问题。

使用 FFMPEG 将 AMR 转换为 MP3

ffmpeg -i audio1.amr -ar 22050 audio1.mp3

这将转换audio1.amr 文件转换为音频率为 22.05 Khz 的 audio1.mp3

Argh, those useless ubuntu questions regarding useless ubuntu packages.

Converting AMR to MP3 using FFMPEG

ffmpeg -i audio1.amr -ar 22050 audio1.mp3

This will convert audio1.amr file to audio1.mp3 having audio rate 22.05 Khz

别低头,皇冠会掉 2024-10-20 11:24:58

我按照此处的说明解决了这个问题 http://pasindudps .blogspot.com/2010/12/compiling-ffmpeg-in-ubuntu-1010.html 这样做后,我在进行音频转换时没有问题

编辑:我发布的链接已失效现在,这是 Linux 系统的另一个 http://linuxers.org/tutorial/how-install -ffmpeg-linux 这是另一个适用于 Mac OS X 的 http://jungels.net/ articles/ffmpeg-howto.html

更新的答案:

由于我必须使用此解决方案,似乎该过程变得更加容易。在 Mac OS 上,您只需使用 Homebrew

brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265

仅可以从存储库安装 Linux 系统:

sudo apt-get install ffmpeg

su -c 'yum install ffmpeg'

FFMPEG 网站 现在也更新了适用于 Windows、Mac 或 Linux 的文档和下载;如果需要任何进一步的信息。

I solved this by following the instructions here http://pasindudps.blogspot.com/2010/12/compiling-ffmpeg-in-ubuntu-1010.html after doing so I had no problem doing the audio conversion

EDIT: the link I posted is dead now, here's another one for Linux systems http://linuxers.org/tutorial/how-install-ffmpeg-linux and here's another for Mac OS X http://jungels.net/articles/ffmpeg-howto.html

UPDATED ANSWER:

Since I had to use this solution seems like the process has gotten much easier. On Mac OS you can simply use Homebrew:

brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265

Only Linux systems you can install from the repository:

sudo apt-get install ffmpeg

or

su -c 'yum install ffmpeg'

The FFMPEG website now has updated documentation and downloads for Windows, Mac or Linux as well; in case any further information is required.

眉黛浅 2024-10-20 11:24:58

我的 Thunar 自定义操作命令:

ffmpeg -i *.amr -ar 12000 lastcall.mp3

外观条件 *.amr 和以下:“图像文件”

My command for Thunar custom actions:

ffmpeg -i *.amr -ar 12000 lastcall.mp3

Appearance condition *.amr and bellow: "image file"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文