-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
Detailed description
There is no way to set the FFmpeg backend timeout (CAP_PROP_OPEN_TIMEOUT_MSEC ) in cv::cuda::VideoReader.
This would be useful when streaming from an RTSP source because if the source is unavalibale the timeout before control returns to the calling thread is substantial.
To include this functionality I am not sure if it would be better to add another aditional option to createVideoReader
CV_EXPORTS_W Ptr<VideoReader> createVideoReader(const String& filename, const bool rawMode = false, const int openTimeOutMs = 30000);
or pass in const std::vector<int>& params as used by VideoCapture::open
CV_EXPORTS_W Ptr<VideoReader> createVideoReader(const String& filename, const bool rawMode = false, const std::vector<int>& params = );
allowing other params to be easily added in the future?
Additionaly if a vector of params are used, the rawMode, flag could be removed? I know this would break the existing API , however it would be cleaner and the rawMode flag has only recently been introduced?
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
answers.opencv.org, Stack Overflow, etc and have not found solution - I updated to latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc