-
-
Notifications
You must be signed in to change notification settings - Fork 55.6k
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
VideoWriter fails quietly for non-square videos #4655
Comments
Debian 8.5 Same issue. No solution in sight. |
As said in the other bug tracker, The real bug looks to be in the error handling, I think this issue should be closed. |
I believe I'm seeing this issue as well, but with a twist. I get successful videos for a time, then it suddenly spits out empty videos. OpenCV 2.4.9 on a raspberry pi Essentially I'm doing the following: fourcc = cv2.cv.CV_FOURCC('M','J','P','G')
h,w,c = self.frames[0].get('img').shape
writer = cv2.VideoWriter(
vidpath,
fourcc,
FPS,
(w,h)
)
for f in self.frames:
img = f.get('img')
writer.write(img)
writer.release()
writer = None self.frames is a list of VideoCapture'd frames. This works correctly for hours until it suddenly doesn't. |
Here's a standalone script that illustrates the issue:
After about 800 or so successful videos we then only get bad videos. Restarting the scripts starts the process over. This implies that something in the module itself goes awry over time. |
As have been stated by @pstch, when creating VideoWriter in Python one should pass frame dimensions in form |
Transferred from http://code.opencv.org/issues/3424
VideoWriter fails quietly for non-square videos
History
Talia Weiss on 2013-12-06 23:37
Nikita Manovich on 2013-12-10 11:20
Nikita Manovich on 2013-12-10 19:49
Talia Weiss on 2013-12-11 15:15
Talia Weiss on 2013-12-11 15:53
David Zwicker on 2014-08-02 04:45
Veikko Leppävuori on 2015-01-14 08:20
The text was updated successfully, but these errors were encountered: