Skip to content
This repository was archived by the owner on Mar 2, 2025. It is now read-only.

Error using opencv to display stream #195

Open
migueltorresvalls opened this issue Jun 22, 2022 · 4 comments
Open

Error using opencv to display stream #195

migueltorresvalls opened this issue Jun 22, 2022 · 4 comments

Comments

@migueltorresvalls
Copy link

Running gopro_keepalive.py and in another terminal gopro_opencv.py I keep getting the same error: cv2.error: OpenCV(4.5.2) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-vi271kac\opencv\modules\highgui\src\window.cpp:404: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'

When I run gopro_keepalive.py I get the following output: HERO5 Black
HD5.02.02.70.00
Camera successfully connected!
ffmpeg version 2022-06-20-git-56419428a8-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 11.3.0 (Rev1, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 57. 27.100 / 57. 27.100
libavcodec 59. 33.100 / 59. 33.100
libavformat 59. 25.100 / 59. 25.100
libavdevice 59. 6.100 / 59. 6.100
libavfilter 8. 41.100 / 8. 41.100
libswscale 6. 6.100 / 6. 6.100
libswresample 4. 6.100 / 4. 6.100
libpostproc 56. 5.100 / 56. 5.100

I´m on Windows 11 using anaconda python 3.8.3.

@migueltorresvalls
Copy link
Author

Hey, I tried it using Ubuntu 20.04 and python 3.9.12 and I keep getting the following error:

image

@sakthivelj
Copy link

I have tried raspberry pi 4b same issue. Did you find any solution for this?

@migueltorresvalls
Copy link
Author

migueltorresvalls commented Nov 14, 2022 via email

@sakthivelj
Copy link

sakthivelj commented Nov 20, 2022

Hi I found one more thing
curl http://172.xx.xxx.51/gp/gpWebcam/START

then

vlc -vvv --network-caching=300 --sout-x264-preset=ultrafast --sout-x264-tune=zerolatency --sout-x264-vbv-bufsize 0 --sout-transcode-threads 4 --no-audio udp://@:8554

When I use this method I am able get the live steam on VLC player.

Do you what is meaning of udp://@:8554, when I use @ instead of IP_ADDRESS is not streaming on VLC

Source: https://github.com/KonradIT/goprowifihack/blob/master/HERO9/GoPro-Connect.md

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants