-
Notifications
You must be signed in to change notification settings - Fork 925
Closed
Description
The repo README states that the wheels of opencv-python
include an ffmpeg licensed under LGPL. This implies that the included ffmpeg will not be able to read H264 videos, since this would require ffmpeg to be distributed under GPL (x264).
However, after installing opencv-python-headless
version 4.3.0.38 from pip into a fresh python 3.8 environment, I am able to read video frames from an H264 encoded video:
>>> import cv2
>>> cap = cv2.VideoCapture("video.mp4") # H264 encoded video
>>> cap.isOpened()
True
>>> cap.getBackendName()
'FFMPEG'
>>> cap.read()
(True, array([[[33, 33, 33],
[33, 33, 33],
[33, 33, 33],
...
Verified this works on Mac and Linux (have not tried Windows). Note that I do not have the OpenH264 library installed separately.
Any ideas on this discrepancy? I would have expected the above snippet to fail, if the included ffmpeg is LGPL.
Metadata
Metadata
Assignees
Labels
No labels