Received the following error while trying to use visualize_detections.py
[ WARN:0@1.776] global cap_ffmpeg_impl.hpp:1676 grabFrame packet read max attempts exceeded, if your video have multiple streams (video, audio) try to increase attempt limit by setting environment variable OPENCV_FFMPEG_READ_ATTEMPTS (current value is 4096)
This appears to be a known issue with opencv and multiple-stream videos. Best solution is to just strip the audio before trying to use it for visualize_detections.py. To strip the audio run the following CLI command on your left and right video files:
ffmpeg -i input_video.mp4 -an -vcodec copy output_video.mp4
You can also try just increasing the limit, but that was unsuccessful for me. To do that add the following code in the .py file above import cv2:
import os
os.environ["OPENCV_FFMPEG_READ_ATTEMPTS"] = "16384"
import cv2
@mohamedtahaguelzim do you generally prefer to have stuff like this posted to the forum here or posted as issues on the github? I have a swe background but am very much trying not to get sucked into contributing on another project
I’m happy to be a more technical tester though!