问题描述
我是opencv的新手,我正在尝试使用opencv-python创建帧大小为56x72的视频文件.我正在使用"MJPG"对帧率为20的视频进行编码.我收到一条错误消息,指出[mjpeg @ 0x27ee9e0]缓冲区小于最小大小.
我检查了avcodec.h文件,它说FF_MIN_BUFFER_SIZE = 16384并验证buf_size是否至少为FF_MIN_BUFFER_SIZE并且我认为buf_size为width * height * 4(我对此不确定). /p>
那么这是否意味着我无法创建帧尺寸为56x72或更小的视频文件?有什么办法吗?
在使用MJPG以外的其他编解码器时,使用opencv2.4也会遇到相同的问题.升级到3.1.0版后,该错误不再发生.
I am new to opencv and I am trying to create a video file with frame size 56x72 using opencv-python. I am using 'MJPG' to encode the video with a frame rate of 20. I get an error which says - [mjpeg @ 0x27ee9e0] buffer smaller than minimum size.
I checked the avcodec.h file and it says that the FF_MIN_BUFFER_SIZE = 16384 and it verifies if the buf_size is at least FF_MIN_BUFFER_SIZE and i think the buf_size is width*height*4 (i am not really sure of this).
So does it mean that I can't create a video file with frame size 56x72 or smaller? Is there any way around?
Had the same problem using opencv2.4 also when using other codec than MJPG. After upgrading to version 3.1.0 the error doesn't occur anymore.
这篇关于mjpeg @ 0x27ee9e0缓冲区小于最小缓冲区大小:如何创建小于最小缓冲区大小的视频文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!