Writing AVI files in OpenCV

前端 未结 7 782
青春惊慌失措
青春惊慌失措 2021-01-11 14:38

There example on the net and code given in Learn OpenCv,Orielly.

After many attempts the out.avi file is written with 0 bytes. I wonder where i went wrong.

T

相关标签:
7条回答
  • 2021-01-11 15:26

    My bet is that cvCreateVideoWriter returns NULL. Just step through it to see if it's true. In that case, the problem is probably with CV_FOURCC(..) which doesnt find the codec and force a return 0;

    you can try using -1 instead of CV_FOURCC. There is gonna be a prompt during runtime for you to chose the appropriate codec

    0 讨论(0)
提交回复
热议问题