本文介绍了打开编码器输出流#0.0时出错 - 可能是不正确的参数,如bit_rate,速率,宽度或高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此命令通过FFMPEG将avi,mov,m4v视频文件转换为flv格式

I am using this command to convert an avi,mov,m4v video files to flv format via FFMPEG

/usr/local/bin/ffmpeg -i '/home/public_html/files/video_1355440448.m4v' -s '640x360' -sameq -ab '64k' -ar '44100' -f 'flv' -y /home/public_html/files/video_1355440448.flv

[flv @ 0x68b1a80] requested bitrate is too low
Output #0, flv, to '/home/files/1355472099-50cadce349290.flv':
    Stream #0.0: Video: flv, yuv420p, 640x360, q=2-31, pass 2, 200 kb/s, 90k tbn, 25 tbc
    Stream #0.1: Audio: adpcm_swf, 44100 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
-------------------------------
RESULT
-------------------------------
Execute error. Output for file "/home/public_html/files/video_1355472099.avi" was found, but the file contained no data. Please check the available codecs compiled with FFmpeg can support this type of conversion. You can check the encode decode availability by inspecting the output array from PHPVideoToolkit::getFFmpegInfo().

但是,如果我手动使用这个命令,那么它的工作

But if I manually used this command then its working

/usr/local/bin/ffmpeg -i '/home/public_html/files/video_1355440448.m4v' -s '640x360' -sameq -ab '64k' -ar '44100' -f 'flv' -y /home/public_html/files/video_1355440448.flv


推荐答案


  1. 这是因为你有两个流,输出将被编码然后调整大小,看看你的输出消息:

  1. This is because you have two streams and output will be encoding then resizing, see your output messages:

Stream #0.0 -> #0.0
Stream #0.1 -> #0.1

...您使用 adpcm_swf 音频和 yuv420p 视频

... you use adpcm_swf audio and yuv420p video

答案很简单,你需要把 copy 作为您的音频编解码器...

The answer is very simple, you need to put copy as your audio codec ...

看到我的示例与视频mpeg4,yuv420p和音频ac3 ... / p>

See my example with video mpeg4,yuv420p and audio ac3 ...

ffmpeg -i input.mkv -vf scale=720:-1 -acodec copy -threads 12 output.mkv

这将会改变第一个大小= 720与宽高比= -1(未知)。还需要使用:

this will change first size = 720 with aspect ratio = -1 (unknown). Also you need to use:

-acodec copy -threads 12

如果不使用它,您将有一个错误。
例如:当我使用它,输出编码消息显示我,这样做很好:

If don't use this you will have one error.For example: When I used it, the output encoding messages show me this and it works well:

[h624 @ 0x874e4a0] missing picture in access unit93 bitrate=1034.4kbits/s    
Last message repeated 1163 times5974kB time=53.47 bitrate= 915.3kbits/s 


  • 您需要使用flv格式的文件,如下所示:

  • You need to use for flv format file, something like this:

    ffmpeg -i input.mp4 -c:v libx264 -crf 19 output.flv
    


  • 这篇关于打开编码器输出流#0.0时出错 - 可能是不正确的参数,如bit_rate,速率,宽度或高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    10-20 20:24