-
Notifications
You must be signed in to change notification settings - Fork 54
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
854 * 480 resolution causes "pixel buffer size mismatch" on macOS #110
Comments
What is the width and height of that video? |
It is 854 * 480.
so it shouldn't matter, should it? |
Can you try with a different video that is 1280x720? |
@letmaik OMG you were right! The 1280x720 is correctly received in Zoom! What do I do wrong here:
and then just sending it:
NOTE:
NOTE 2:
but I don't see where I import numpy:
|
I can reproduce the problem. I tried to relax the condition below as I thought the buffer may be bigger sometimes and while that produces an image, it is distorted, so not the right fix: pyvirtualcam/pyvirtualcam/native_macos_obs/virtual_output.h Lines 239 to 243 in 44e8fa2
For now, I suggest to stick to the standard 1280x720 resolution and resize your frames in advance. Eventually this should be fixed but I don't have much experience with Macs, so hopefully someone else can help out. |
That's oddly reassuring that I'm not crazy or didn't do an obvious mistake. |
"Video width must be divisible by 8" is quite a few year old. But I'm pretty sure the green image is caused by OBS virtual camera plugin encoding the images to a video, and not related to pyvirtualcam. And as far as I understand the tests done on July 06: The user send frames with different sizes on purpose, and this was detected and reported as 'pixel buffer size mismatch'. -> This not related to the reported bug (green image) and proves that the buffer check works. @agilebean if you could clarify, please. And if you can record the green video with VLC (or any other tool) and report the used encoder it might help to reproduce the issue independent from OBS. e.g. with ffmpeg. |
@GermanWarez However, changing from the width and height attributes (854 * 480) to 1280 * 720 did the trick. Yet, this was the case when the OBS plugin still worked but it stopped working with the newer MacOS (I filed another issue but unfortunatelty hasn't been solved yet). |
Thanks for clarification. Then it's either a bug in cv2 producing different frames sizes (easy to log in python), or a bug in libyuv in virtual_output.h (that is used to convert the frame format).
I couldn't find any other python library using libyuv, and can't test pyvirtualcam on macOS 13. If you could log the frame sizes by cv2 in python, and try UYVU frames it would be possible to pinpoint the error either to cv2 or libyuv. Or both are affected...
ty |
Describe the bug
...
Running a python script sending frames from a video which has worked perfectly one year ago. The same script keeps on throwing the error
Notes:
To Reproduce
Trying to run from this repository the example script webcam_filter.py
The text was updated successfully, but these errors were encountered: