2011-01-21 128 views
13

我正嘗試使用FFMPEG將AMR音頻文件轉換爲MP3。我在Windows 7主機上使用VBox在Ubuntu 10.10上運行,並且我已經通過運行sudo apt-get install ffmpeg安裝了ffmpeg我已經有一個AMR文件,我之前已經記錄了,因此我運行了命令:ffmpeg -i myfile.amr myfile.mp3轉換失敗,跟蹤如下:使用FFMPEG將AMR轉換爲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 
[email protected]:~$ 

所以按照這個線程ffmpeg: convert audio-only flv to swf的跡象,我跑的命令sudo apt-get install ffmpeg libavcodec-extra-52 安裝額外的庫,我仍然有同樣的問題。任何其他想法?

UPDATE:也是在它們鏈接到這個網站上線,使其工作http://stephenjungels.com/jungels.net/articles/ffmpeg-howto.html遵循所有的步驟,它仍然是行不通的

回答

7

我解決了這個按照指示在這裏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

UPDATED ANSWER:

因爲我不得不使用這個解決方案,所以似乎過程變得更容易了。在Mac OS,你可以簡單地使用Homebrew

sudo apt-get install ffmpeg 

su -c 'yum install ffmpeg' 

FFMPEG website現在已經更新的文檔和附件:您可以從系統信息庫安裝

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

只有Linux系統Windows,Mac或Linux;以防需要更多信息。

+2

我希望你能複製相關信息。這樣一個死鏈接不會殺死你的答案。 – Richard 2015-05-18 16:48:59

+0

好主意@理查德,會做。而不是冒着其他鏈接冒死的風險。 – 8vius 2015-05-18 16:55:13

13

argh,那些沒用的ubuntu關於無用ubuntu軟件包的問題。

Converting AMR to MP3 using FFMPEG

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

這將有音頻率22.05千赫audio1.amr文件轉換爲

0

我對Thunar中自定義操作命令:

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

外觀狀態* .AMR和波紋管: 「圖像文件」