2013-01-24 113 views
2

繼承人的命令:我的FFMPEG轉換器不允許mp4進行webm轉換。

ffmpeg -i videos/test.mp4 -c:v libvpx -level 216 -profile 0 -qmax 42 -qmin 10 -c:a libvorbis -f webm out.webm 

我不斷收到此錯誤:

Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height 

這裏是全響應

# ffmpeg -i videos/test.mp4 -c:v libvpx -level 216 -profile 0 -qmax 42 -qmin 10 -c:a 

libvorbis -f webm out.webm 
ffmpeg version N-49225-g7e059c9 Copyright (c) 2000-2013 the FFmpeg developers 
    built on Jan 24 2013 05:14:06 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-54) 
    configuration: --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-gpl --enable-postproc --enable-nonfree 
    libavutil  52. 15.101/52. 15.101 
    libavcodec  54. 90.100/54. 90.100 
    libavformat 54. 61.104/54. 61.104 
    libavdevice 54. 3.102/54. 3.102 
    libavfilter  3. 33.100/3. 33.100 
    libswscale  2. 2.100/2. 2.100 
    libswresample 0. 17.102/0. 17.102 
    libpostproc 52. 2.100/52. 2.100 
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'videos/test.mp4': 
    Metadata: 
    major_brand  : mp42 
    minor_version : 1 
    compatible_brands: mp42avc1 
    creation_time : 2010-08-12 15:42:21 
    Duration: 00:00:34.20, start: 0.000000, bitrate: 358 kb/s 
    Stream #0:0(eng): Audio: aac (mp4a/0x6134706D), 44100 Hz, stereo, fltp, 100 kb/s 
    Metadata: 
     creation_time : 2010-08-12 15:42:21 
     handler_name : Apple Sound Media Handler 
    Stream #0:1(eng): Video: h264 (Main) (avc1/0x31637661), yuv420p, 640x320, 251 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 5994 tbc 
    Metadata: 
     creation_time : 2010-08-12 15:42:21 
     handler_name : Apple Video Media Handler 
Please use -profile:a or -profile:v, -profile is ambiguous 
File 'out.webm' already exists. Overwrite ? [y/N] y 
v0.9.6 
[libvpx @ 0x7e38d20] Failed to initialize encoder: ABI version mismatch 
Output #0, webm, to 'out.webm': 
    Metadata: 
    major_brand  : mp42 
    minor_version : 1 
    compatible_brands: mp42avc1 
    Stream #0:0(eng): Video: vp8, yuv420p, 640x320, q=10-42, 200 kb/s, 90k tbn, 29.97 tbc 
    Metadata: 
     creation_time : 2010-08-12 15:42:21 
     handler_name : Apple Video Media Handler 
    Stream #0:1(eng): Audio: none, 44100 Hz, stereo, fltp 
    Metadata: 
     creation_time : 2010-08-12 15:42:21 
     handler_name : Apple Sound Media Handler 
Stream mapping: 
    Stream #0:1 -> #0:0 (h264 -> libvpx) 
    Stream #0:0 -> #0:1 (aac -> libvorbis) 
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height 

沒有任何人有任何想法怎麼回事?我完全失去了。我嘗試了很多不同的命令。從mp4到ogg的轉換工作正常,我已經有mp4到webm工作,但我重新安裝ffmpeg讓mp4到ogg工作,現在我的mp4轉換爲webm。 >。這整個安裝過程是如此惡夢般的噩夢。有沒有人有一個很好的教程,爲mp4 ogg和webm工作的ffmpeg的centos安裝?我使用了ffmpeg網站下載的centos tut,但它讓我失望了。如果任何人有任何想法可以指出我正確的方向,我將非常感激!

+0

有關使用FFmpeg命令行的問題是堆棧溢出的主題。請在將來向[SU]提問。 (但請不要交叉發表這一個) – slhck

回答

3

真正的問題是不是你正在使用的設置添加

-map 0:1 -map 0:0 

。這是您的FFmpeg配置:

[libvpx @ 0x7e38d20] Failed to initialize encoder: ABI version mismatch 

這是應用程序二進制接口。您構建的源代碼與編碼時使用的實際庫顯然不同。

看來你已經安裝了libvpx的多個版本。刪除所有這些,但最新的,並嘗試重新編譯FFmpeg。或者下載靜態版本from the download page,其中包括libvpx

+0

啊,我認爲你想找點東西!我確實有2個版本在我的服務器上,但是當我嘗試卸載它時,它一直給我一個錯誤 #make distclean make [1]:***沒有規則使目標'distclean'。停止。 make:*** [distclean]錯誤2 使卸載 使[1]:***沒有規則,使目標'卸載'。停止。 make:*** [卸載]錯誤2 這兩個都是從兩個安裝目錄運行,並且都給我提供了相同的錯誤 –

+0

你是如何安裝它們的第一個地方?你運行了什麼,「卸載」? – slhck

0

您的輸入文件具有向後的音頻和視頻流。您必須重新映射它們才能進行此轉換。

的順序來告訴ffmpeg的輸入是A,V,當它的默認值輸出到V,A

+0

你怎麼能夠確定?對不起,我有點迷失在這個視頻轉換世界。消化這麼多信息,似乎如果我不明白這一切,只是ganna不停地擊中這些磚牆。然而,無論如何,你給我的東西都不起作用。也許這是問題的一部分,但即時通訊接收到相同的確切錯誤 –

+2

@Isaac你錯了libvpx是一個視頻編解碼器和libvorbis音頻,不需要重映射! – d33pika

+0

@ d33pika,你是對的......我看到映射自動切換在底部。 – Isaac

1

從版本輸出中,您使用的是從官方源代碼樹編譯的FFmpeg

v0.9.6 [libvpx @ 0x7e38d20] Failed to initialize encoder: ABI version mismatch

從你的輸出日誌,似乎FFmpeg要求libvpx版本0.9.6libvpx你目前整合不0.9.6,所以FFmpeg抱怨錯誤。

你可以從here找到與libvpx匹配的版本,下載並重新編譯它。