Open mattivi opened 9 years ago
Another tip: make sure the directory you're writing to exists. VideoWriter
will not create it, but it will not fail.
I am facing this issue in 2022. Correct framerate, resolution, etc. And the capture is released.
If you trying to output H264 this may help https://github.com/opencv/opencv-python/issues/207
I came to the same problem and I successed only after replacing '/' with '//'.
@Hashemian01 worked for me thankyou!
OpenCV is not writing to output video files with cv2.VideoWriter.write. I only get an empty video file (8 KB) and no error messages. Where is the problem? Thanks a lot! I am running 2.7.8 |Anaconda 2.1.0 (x86_64)| (default, Aug 21 2014, 15:21:46) [GCC 4.2.1 (Apple Inc. build 5577)] opencv 2.4.8 np17py27_2
Here is a sample test code that write an image to a video output file: