-
Notifications
You must be signed in to change notification settings - Fork 48
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
What does the following error message mean? #176
Comments
It's an error similar to this one. Be careful about image depth (RGB or grayscale) and the type of video codec you use. Try different options. |
@shrubb I tried using XVID, MPEG, H264. All don't work. Image depth is rgb. If i can do imwrite why i cant do videowriter.write? |
Because OpenCV works this way -- every function has constraints on the types of input matrices (images). Image depth can't be RGB. This is the channel layout. Depth is the number of bits per pixel. As far as I remember, VideoWriter typically requires 8 bit per channel pixel. So it should work with ByteTensors. |
https://stackoverflow.com/questions/38880740/python-opencv-cv2-videowriter-error |
OpenCV Error: Assertion failed (image->depth == 8) in writeFrame, file /home/yxchng/OpenCV/modules/videoio/src/cap_ffmpeg.cpp, line 272
I follow the VideoWriter example but I couldnt save a video. Instead I got the above error.
The text was updated successfully, but these errors were encountered: