Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Video FFMPEG仅在某些文件上从MP4转换为WEBM。_Video_Ffmpeg_Transcoding - Fatal编程技术网

Video FFMPEG仅在某些文件上从MP4转换为WEBM。

Video FFMPEG仅在某些文件上从MP4转换为WEBM。,video,ffmpeg,transcoding,Video,Ffmpeg,Transcoding,我使用FFMPEG的streamio包装器尝试了以下URL。 网址是 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 incorr

我使用FFMPEG的streamio包装器尝试了以下URL。 网址是

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视频,是否需要任何特定设置?

音频编码器(
vorbis
)会显示以下消息:

[vorbis @ 0x7ffcc292f600] Current FFmpeg Vorbis encoder only supports 2 channels.
结果表明,该文件只有mono

指定
-ac 2
强制两个频道(假立体声)或
-map v:0
放弃音频频道

(或等待,或要求ffmpeg开发人员修复编码器以支持单声道流)

音频编码器(
vorbis
)将释放以下消息:

[vorbis @ 0x7ffcc292f600] Current FFmpeg Vorbis encoder only supports 2 channels.
结果表明,该文件只有mono

指定
-ac 2
强制两个频道(假立体声)或
-map v:0
放弃音频频道

(或等待,或要求ffmpeg开发人员修复编码器以支持单声道流)