Writing x264 from OpenCV 3 with FFmpeg on Linux

前端 未结 3 652
南方客
南方客 2020-12-05 14:56

I\'m having trouble writing h264 video with OpenCV 3 via FFmpeg (\"\'X\',\'2\',\'6\',\'4\'\" FOURCC). I\'ve seen all the related posts so far on SO, but nothing helps. Code:

3条回答
  •  隐瞒了意图╮
    2020-12-05 15:45

    The problem had nothing to do with the displayed warning. I was trying to write single-channel images, while the VideoWriter was expecting a 3-channel color image (default value of isColor, the 5-th argument to VideoWriter's constructor, is "true"). The solution was setting isColor to false.

提交回复
热议问题