`VideoCapture.Open()` is significantly slower on x64 as compared to x86.
See original GitHub issueSummary of your issue
VideoCapture.Open()
is significantly slower on x64 as compared to x86.
x64: 5 to 10 seconds
x86: 1 to 2 seconds
I noticed this issue was raised but there wasn’t a solution.
Environment
OpenCvSharp-4.5.3-20210821 .NET Framework 4.7.2 Windows 10 64-bit
What did you do when you faced the problem?
I ran the sample project provided (Added a x64 configuration).
- \Sample-4.5.3-20210821\VideoCaptureForm
Example code:
paste your core code
Output:
paste your output
What did you intend to be?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
OpenCV real time streaming video capture is slow. How to ...
A simple solution is decrease the resolution of videos before of reading. Another solution is create an second thread to only video acquisition....
Read more >Does 32bits Windows run slower on a 64bit CPU?
No, and it will run faster than an Windows x64 bit OS. Mostly all CPUs released in the past few years are 64...
Read more >Slow frame read from webcam - C++
Hi, As per the title, I'm seeing very slow frame reads from webcam. At a resolution at which it can output 120FPS, I'm...
Read more >[RELEASED] OpenCV for Unity
Compatible with multiple platforms, allowing for app development on major platforms. iOS & Android & Windows10 UWP support.
Read more >Is there something wrong with this PC, besides the obvious?
I've contacted cleverbridge about this already. It's an E6400 with some Windows 7 64-bit goofiness for an OS. There's a free version of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It seems to be this issue opencv/opencv#17687 Adding
Environment.SetEnvironmentVariable("OPENCV_VIDEOIO_MSMF_ENABLE_HW_TRANSFORMS", "0");
will fix it. UsingVideoCapturesAPIs.DSHOW
also works but it gave me a much choppier streamWhat Capture API do you use? You haven’t posted any sample code to reproduce. But i also noticed that - when getting webcam streams -
camera.Set(OpenCvSharp.VideoCaptureProperties.FourCC, OpenCvSharp.VideoWriter.FourCC("MJPG"))
andVideoCaptureAPIs.MSMF
takes a very long time to load (10 seconds) compared toVideoCapturesAPIs.DSHOW
which loads instantly. Set the Capture API manually, instead ofVideoCaptureAPIs.ANY
. This will also remove weird webcam artifacts!