openh264 icon indicating copy to clipboard operation
openh264 copied to clipboard

How to use openh264-1.8.0-win64.dll with Python scripts compiled by nuikta

Open kimura00123 opened this issue 3 years ago • 1 comments

Windows 10 Python 3.6.8 nuikta 0.7.1 -------(web_camera.py)----------------------------------------------- VideoWriter_fourcc('a','v','c','1') movie = cv2.VideoWriter('movefile.mp4', fourcc, 30, (640, 480), True)

In the python script (web_camera.py), we are using the opencv library to encode an image from a web-camera into a video file using H.264, compress it and save it as a video file. openh264-1.8.0-win64.dll file is saved in the same folder as web_camera.py.

However, when I compile this web_camera.py with nuikta as an onefile and turn it into an exe file and run it, the video file is saved without being encoded in H.264.

nuitka --mingw64 --follow-imports --onefile web_camaera.py --plugin-enable=numpy --enable-plugin=tk-inter --include-data-file=openh264-1.8.0-win64.dll=openh264-1.8.0-win64.dll

Do you have a solution for this?

kimura00123 avatar Mar 02 '22 04:03 kimura00123

Are you sure that you are using openh264 in a correct way with opencv?

huili2 avatar Dec 12 '22 02:12 huili2