This topic created in 2173 days ago, the information mentioned may be changed or developed.
原始文件是 h265 的,转换就是普通的转换命令,但是只要输出尺寸大于 1280 就提示
原始尺寸是大于 3800x3800 的。
Error initializing output stream 0:0 --
Error while opening encoder for output stream #0:0 (Video) -
maybe incorrect parameters such as bit_rate, rate, width or height
这个错误我郁闷了好几个月了,今天又遇到。
唉
3 replies 2020-08-20 16:25:46 +08:00  | | 1 aliofwind Jun 3, 2020 命令参数是什么,这个报错看起来是参数冲突之类的 |
 | | 2 hardwork Jun 3, 2020 ffmpeg 命令行吗,发出来看看 |
 | | 3 hungkuishing Aug 20, 2020 视频编码器 open 失败就会报这个错,ffmpeg 代码如下:
if ((ret = avcodec_open2(ost->enc_ctx, codec, &ost->encoder_opts)) < 0) { if (ret == AVERROR_EXPERIMENTAL) abort_codec_experimental(codec, 1); snprintf(error, error_len, "Error while opening encoder for output stream #%d:%d - " "maybe incorrect parameters such as bit_rate, rate, width or height", ost->file_index, ost->index); return ret; }
一些编码器对输入的宽高、码率有限制,如果参数不符合编码器要求,就会导致 open 失败,比如 H.261 需要输入的视频分辨率是 176x144 或者 352x288 ; H.263 需要输入的视频分辨率是 128x96, 176x144, 352x288, 704x576, 或者 1408x1152 。
你可以把命令行、以及终端打印贴出来,方便定位问题。 |