1 | initial version |
To be sure that you have answer for your question.
```python
import cv2 cv2.__version__ 2.4.9.1
fourcc = cv2.VideoWriter_fourcc() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'VideoWriter_fourcc' ```
That means there is no cv2.VideoWriter_fourcc()
because it exsist from 3.0 ver.
Like
2 | No.2 Revision |
To be sure that you have answer for your question.
```python
>>import cv2
That means there is no cv2.VideoWriter_fourcc()
because it exsist from 3.0 ver.ver. but you using 2.4.9.1 :)
When you use that version you should change that for
Like
3 | No.3 Revision |
To be sure that you have answer for your question.
>> import cv2 >> cv2.__version__ 2.4.9.1 >>> fourcc = cv2.VideoWriter_fourcc() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'VideoWriter_fourcc'
That means there is no cv2.VideoWriter_fourcc()
because it exsist from 3.0 ver. but you using 2.4.9.1 :)
When you use that version you should change that for fourcc = cv2.cv.CV_FOURCC(*'XVID')
like @pjthakkar3192 said before.
Like Best regards.
4 | No.4 Revision |
To be sure that you have answer for your question.
>> import cv2 >> cv2.__version__ 2.4.9.1 >>> fourcc = cv2.VideoWriter_fourcc() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'VideoWriter_fourcc'
That means there is no cv2.VideoWriter_fourcc()
because it exsist from 3.0 ver. but you using 2.4.9.1 :)
When you use that version you should change that for fourcc = cv2.cv.CV_FOURCC(*'XVID')
like @pjthakkar3192 said before.before. (if you want to support 2.4.* and 3.* ver of OpenCV just check if func is callable - callable(cv2.cv.CV_FOURCC)
)
Best regards.