One last try:
Here are a few alternative ways to write the line of code you provided using OpenCV:
- Using the
cv2.CAP_FFMPEG instead of fourcc:
Copy code
video = cv2.VideoWriter(os.path.join(video_path,nom_video), cv2.CAP_FFMPEG, 25, (width, height), isColor = True)
- Using the
cv2.CAP_GSTREAMER instead of fourcc:
Copy code
video = cv2.VideoWriter(os.path.join(video_path,nom_video), cv2.CAP_GSTREAMER, 25, (width, height), isColor = True)
- Using the
cv2.CAP_AVFOUNDATION instead of fourcc on macOS:
Copy code
video = cv2.VideoWriter(os.path.join(video_path,nom_video), cv2.CAP_AVFOUNDATION, 25, (width, height), isColor = True)
- Using the
cv2.CAP_DSHOW instead of fourcc on Windows:
Copy code
video = cv2.VideoWriter(os.path.join(video_path,nom_video), cv2.CAP_DSHOW, 25, (width, height), isColor = True)
- Using the
cv2.CAP_MSMF instead of fourcc on Windows:
Copy code
video = cv2.VideoWriter(os.path.join(video_path,nom_video), cv2.CAP_MSMF, 25, (width, height), isColor = True)
Itās important to note that, depending on the
Donāt know if that will help and yes I know, it is not as easy to use this chat bot and then all problems are gone. It is only a try for finding some (new) ideas.