KonradIT / gopro-py-api

Unofficial GoPro API Library for Python - connect to GoPro via WiFi.
MIT License
1.4k stars 211 forks source link

Error using opencv to display stream #195

Open migueltorresvalls opened 2 years ago

migueltorresvalls commented 2 years ago

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 commented 2 years ago

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

image

sakthivelj commented 1 year ago

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

migueltorresvalls commented 1 year ago

No, if you find any solution please let me know

El dom, 13 nov 2022 a las 15:02, sakthivel @.***>) escribió:

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

— Reply to this email directly, view it on GitHub https://github.com/KonradIT/gopro-py-api/issues/195#issuecomment-1312738470, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXIU4IR3BUS5MTXJYPCIWMTWIDYF5ANCNFSM5ZQZSSFQ . You are receiving this because you authored the thread.Message ID: @.***>

sakthivelj commented 1 year ago

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