-
Notifications
You must be signed in to change notification settings - Fork 358
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
cv2.imshow freezes after av is imported #1050
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
1 similar comment
This comment was marked as off-topic.
This comment was marked as off-topic.
So the solution was to upgrade to pyav 10? |
Looks like a re-occurrence of #978 . Is this still current with PyAV 10? |
With Python 3.9.14 on Ubuntu 20.04 and av==10.0.0 I still get this issue. EDIT: Without building from source. |
As a temporary fix I found that calling import numpy as np
import cv2
cv2.imshow('ffmpeg fix', np.array([1], dtype=np.uint8))
cv2.destroyAllWindows()
import av
red = np.ones((256, 256, 3)) * np.array([0, 0, 255])
cv2.imshow("red", red.astype(np.uint8))
cv2.waitKey(0)
cv2.destroyAllWindows() |
I can verify this issue still happens with opencv-python 4.7.0.72 and av 10.0.0 |
I am facing the issue in raspberry pi 4. What is the fix? |
I can't repro. It's probably that I'm using MacOS. |
Still can't repo. closing |
Overview
My setup is a docker container with Ubuntu 22.04 and python 3.10 and av installed through pip as a dependency of aiortc.
The python scripts freeze on the cv2.imshow line after av is imported. There is no opencv window either.
If I don't import av it works.
Expected behavior
The pip installed version of av should not cause any issues for opencv.
Actual behavior
cv2.imshow does not work after av is imported
Traceback:
There is no error print or traceback, and I was not able to find any info additional info through the VSCode debugger.
Investigation
I tried building/installing v10.0.0 of PyAV from the source, which fixed the issue.
Reproduction
Versions
The text was updated successfully, but these errors were encountered: