Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document for video writing (Python) not using FOURCC #4949

Closed
opencv-pushbot opened this issue Jul 27, 2015 · 3 comments
Closed

document for video writing (Python) not using FOURCC #4949

opencv-pushbot opened this issue Jul 27, 2015 · 3 comments

Comments

@opencv-pushbot
Copy link
Contributor

Transferred from http://code.opencv.org/issues/4231

|| Ehsan Azar on 2015-03-07 16:50
|| Priority: Normal
|| Affected: 2.4.9 (latest release)
|| Category: python bindings
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: Any / Any

document for video writing (Python) not using FOURCC

[Here](http://docs.opencv.org/trunk/doc/py_tutorials/py_gui/py_video_display/py_video_display.html#saving-a-video) this line:

    fourcc = cv2.VideoWriter_fourcc(*'XVID')

should be changed to this line:

    fourcc = cv2.cv.FOURCC(*'XVID')

History

Ehsan Azar on 2015-03-07 16:52
change @fourcc = cv2.VideoWriter_fourcc(*'XVID')@ to @fourcc = cv2.cv.FOURCC(*'XVID')@
Vadim Pisarevsky on 2015-04-27 11:33
-   Category set to python bindings
@walchko
Copy link

walchko commented Aug 1, 2015

I think you are wrong and it should not be changed. When I use OpenCV 3.0 from homebrew on OSX, and use fourcc = cv2.cv.FOURCC('m', 'p', '4', 'v') as you suggest, it complains:

Traceback (most recent call last):
  File "./video.py", line 20, in <module>
    fourcc = cv2.cv.FOURCC('m', 'p', '4', 'v')
AttributeError: 'module' object has no attribute 'cv'
Cleaned up camera.

But if I leave it fourcc = cv2.VideoWriter_fourcc('m', 'p', '4', 'v'), then it works.

@mshabunin
Copy link
Contributor

The documentation link referred to trunk (OpenCV 3.0) documentation, but cv2.cv module is used only in OpenCV 2.4.

@vijaypanchal
Copy link

select timeout error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants