New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenVideoCapture fails to load streams #445
Comments
Hi @TheTomer take a look at the capwindow example, which shows the bucolic webcam scene when streaming that URL:
Hope that helps! |
Hi deadprogram, that same script doesn't seem to work on my end, I'm getting this error:
|
Might be something to do with Windows? I'd check your Windows firewall settings possibly. It runs fine on my Linux install. I am running same OpenCV/GoCV version in my tests.
|
I don't think that's it, as I've allowed an exception for Go and Goland through the Windows Firewall but still getting nothing, while a matching script for Python's OpenCV works well. On a side note, this script works correctly when streaming the laptop's webcam. |
Not too sure as I do not use Windows regularly. Also, I only have Windows in a VM, so that also impacts a few things, but there is not any code that is OS specific in GoCV that is not in OpenCV itself. Are you using the same OpenCV installation for Python as you are for GoCV? If not, just wondering if any compilation flags are different. |
It's not the same installation, the one I use for Python was installed through Conda and it's version is 4.1.0. The compilation flags for GoCV were these:
I'm not sure about how to get that info for the conda package. |
I was just looking at this issue's comments again, and was thinking that adding the exception for Go and Goland to Windows Firewall might not be the correct needed setting. You might need to add the executable that you are building using GoCV/OpenCV not the Go compiler itself. |
@deadprogram I have also encountered this problem, in the win10 environment, it shows Error opening capture device: Error opening file,I don't know why. |
@deadprogram @TheTomer @TangShuancheng |
@deadprogram @TangShuancheng @TheTomer |
I ended up sticking with Python, so nothing too innovative on my end. |
Hi, I'm trying to stream an MJPEG video using GoCV, but opening the when I try to read the capture, it fails. I'm fairly new to Go so I'm probably doing something wrong here, but I'm trying to replicate a code that's working for me in Python with OpenCV.
`package main
import (
"fmt"
"gocv.io/x/gocv"
)
func main() {
}`
This ends up failing at the if command. What am I doing wrong here?
I'm using Go 1.12, GoCV 0.19.0 and OpenCV 4.0.1 on Windows 10.
The text was updated successfully, but these errors were encountered: