gocv
gocv copied to clipboard
Opening an RTSP stream fails when using gocv/opencv docker image for arm64
I have been using the Dockerfile on gocv/opencv for amd64 for a while to read from an RTSP stream and it has worked totally fine. I am now trying to use the arm64 image and it fails to open the RTSP stream successfully.
Description
Steps to Reproduce
- Run the gocv/opencv docker image on an arm device with
docker run -it --rm gocv/opencv:4.7.0 bash
- Add these files to a directory such as /code
main.go:
package main
import (
"fmt"
"gocv.io/x/gocv"
)
func main() {
fmt.Printf("connecting...\n")
webcam, err := gocv.OpenVideoCapture("rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4")
if err != nil {
fmt.Printf("connect fail: %s\n", err)
}
fmt.Printf("connected successfully!\n")
}
go.mod:
module main
go 1.20
require gocv.io/x/gocv v0.32.1
- Run
go mod tidy
to download dependencies - Run the code with the following command to get OpenCV debug logs
OPENCV_LOG_LEVEL=DEBUG go run main.go
Your Environment
- Operating System and version: Linux aarch64 device (Jetson AGX Orin Dev kit)
- OpenCV version used: 4.7.0
- How did you install OpenCV? Docker conatiner
- GoCV version used: 4.7.0
- Go version: 1.20
- Did you run the
env.sh
orenv.cmd
script before trying togo run
orgo build
? N/A
Other
arm output:
[DEBUG:[email protected]] global videoio_registry.cpp:206 VideoBackendRegistry VIDEOIO: Builtin backends(8): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); V4L2(970); CV_IMAGES(960); CV_MJPEG(950); UEYE(940); OBSENSOR(930)
[DEBUG:[email protected]] global videoio_registry.cpp:230 VideoBackendRegistry VIDEOIO: Available backends(8): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); V4L2(970); CV_IMAGES(960); CV_MJPEG(950); UEYE(940); OBSENSOR(930)
[ INFO:[email protected]] global videoio_registry.cpp:232 VideoBackendRegistry VIDEOIO: Enabled backends(8, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); V4L2(970); CV_IMAGES(960); CV_MJPEG(950); UEYE(940); OBSENSOR(930)
[ INFO:[email protected]] global backend_plugin.cpp:369 getPluginCandidates VideoIO plugin (FFMPEG): glob is 'libopencv_videoio_ffmpeg*.so', 1 location(s)
[ INFO:[email protected]] global backend_plugin.cpp:379 getPluginCandidates - /usr/local/lib: 0
[ INFO:[email protected]] global backend_plugin.cpp:383 getPluginCandidates Found 0 plugin(s) for FFMPEG
[ INFO:[email protected]] global backend_plugin.cpp:369 getPluginCandidates VideoIO plugin (GSTREAMER): glob is 'libopencv_videoio_gstreamer*.so', 1 location(s)
[ INFO:[email protected]] global backend_plugin.cpp:379 getPluginCandidates - /usr/local/lib: 0
[ INFO:[email protected]] global backend_plugin.cpp:383 getPluginCandidates Found 0 plugin(s) for GSTREAMER
[ INFO:[email protected]] global backend_plugin.cpp:369 getPluginCandidates VideoIO plugin (INTEL_MFX): glob is 'libopencv_videoio_intel_mfx*.so', 1 location(s)
[ INFO:[email protected]] global backend_plugin.cpp:379 getPluginCandidates - /usr/local/lib: 0
[ INFO:[email protected]] global backend_plugin.cpp:383 getPluginCandidates Found 0 plugin(s) for INTEL_MFX
[DEBUG:[email protected]] global cap_v4l.cpp:990 open VIDEOIO(V4L2:rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4): opening...
[DEBUG:[email protected]] global cap_v4l.cpp:1006 open VIDEOIO(V4L2:rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4): deviceHandle=-1
[ INFO:[email protected]] global cap_images.cpp:282 icvExtractPattern Pattern: rtsp://wowzaec2demo.streamlock.net/vod/mp%01d:BigBuckBunny_115k.mp4 @ 4
connect fail: Error opening file: rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4
amd output:
[DEBUG:[email protected]] global videoio_registry.cpp:206 VideoBackendRegistry VIDEOIO: Builtin backends(9): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); V4L2(970); CV_IMAGES(960); CV_MJPEG(950); FIREWIRE(940); UEYE(930); OBSENSOR(920)
[DEBUG:[email protected]] global videoio_registry.cpp:230 VideoBackendRegistry VIDEOIO: Available backends(9): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); V4L2(970); CV_IMAGES(960); CV_MJPEG(950); FIREWIRE(940); UEYE(930); OBSENSOR(920)
[ INFO:[email protected]] global videoio_registry.cpp:232 VideoBackendRegistry VIDEOIO: Enabled backends(9, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); V4L2(970); CV_IMAGES(960); CV_MJPEG(950); FIREWIRE(940); UEYE(930); OBSENSOR(920)
[DEBUG:[email protected]] global cap_ffmpeg_impl.hpp:1168 open FFMPEG: stream[1] is video stream with codecID=27 width=240 height=160
[DEBUG:[email protected]] global cap_ffmpeg_hw.hpp:934 HWAccelIterator FFMPEG: allowed acceleration types (none): ''
connected successfully!