mjpeg @ 0x27ee9e0 buffer smaller than minimum size

2019-05-30 06:05发布

问题:

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?

回答1:

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.