2013-09-25 57 views
0

我嘗試了以下URL,使用FFMPEG的streamio包裝。 URL的是FFMPEG從MP4隱藏到WEBM只能處理某些文件。

http://static.bouncingminds.com/ads/5secs/baileys_5sec.mp4 (works) 
http://techslides.com/demos/sample-videos/small.mp4 (doesn't work) 

對於後者我收到以下錯誤:

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

我用轉碼它們的代碼:

movie.transcode("test.webm", "-vcodec libvpx -strict -2") { |p| puts p } 

如前所述這完全適用於第一視頻。爲了與所有的mp4視頻一起工作,我需要什麼具體設置?

回答

2

的音頻編碼器(vorbis)箍架並顯示以下消息:

[vorbis @ 0x7ffcc292f600] Current FFmpeg Vorbis encoder only supports 2 channels. 

原來,該文件僅具有單聲道。

要麼指定-ac 2強制兩個通道(假立體聲)或-map v:0刪除音頻通道。

(或等待opus to become available in webm,或要求開發商ffmpeg的固定編碼器,支持單流)