jschmid1 / gopro_as_webcam_on_linux

Allows to use your GoPro camera as a webcam on linux
Apache License 2.0
518 stars 64 forks source link

Unable to use the gopro as a webcam even if it seems to be detected on my linux #7

Closed Emidomenge closed 2 years ago

Emidomenge commented 3 years ago

First of all, well done for this repo, this is awesome :)

I'm close to make things work on my computer but I'm still facing an issue.

So I followed readme steps: sudo su -c "bash <(wget -qO- https://cutt.ly/PjNkrzq)" root

then I installed the dependency: sudo apt install ffmpeg v4l2loopback-dkms

Plug the gopro on my computer

And run the command sudo gopro webcam On the GoPro screen, I can successfully see that it's in webcam mode.

Then I run vlc, which seems to detect the gopro but I have a black screen :(

I also tried a google meet, to see if it's showing the gopro but it is not detected.

Tell me if I can give any details to investigate my issue.

I'm using: Ubuntu 20.04.1 LTS GoPro 9, latest updated version GoPro (without battery) + Computer plugged with type C wire.

Here some logs:

sudo gopro webcam -p enx -n -a

Running GoPro Webcam Util for Linux [0.0.2]

       Launch Options     
==========================
 * Non-interactive:  1
 * Autostart:        1
 * Preview:          0
 * Device Pattern:   enx
==========================

v4l2loopback is loaded!
v4l2loopback was unloaded successfully.
v4l2loopback was successfully loaded.
Using provided device pattern enx

Discovered: enxfa046d4ab172.
Using enxfa046d4ab172 to discover the GOPRO_IP.
Found 172.21.112.54
To control the GoPro, we need to contact another interface (GOPRO_IP ending with .51).. Adapting internally..
Now using this GOPRO_IP internally: 172.21.112.51
 { "status": 2, "error": 0 }
Sucessfully started the GoPro Webcam mode. (The icon on the Camera should have changed)
Starting ffmpeg..
ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
bartfaimate commented 3 years ago

I'd join to Emilien. The repo is fantastic and seems the webcam mode is working, but not. I'm using Gopro Hero 8 with the latest update, battery inserted, USB-C connected. Ubuntu 20.04.2 LTS And got the same output as above.

Neither Cheese webcam utility see my camera nor Zoom.

jschmid1 commented 3 years ago

In some cases ffmpeg isn't starting properly. Judging by the output from the post this looks very much like it. I haven't figured out why that is and how to reliably circumvent this, but restarting the script until you see something after the

  libpostproc    55.  5.100 / 55.  5.100

for me it's something like: Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))

Synkstar commented 3 years ago

I had this issue and it turned out it was the firewall blocking it for me because it was on the public zone by default

NewoIsTaken commented 3 years ago

@Emidomenge and @bartfaimate, does it work when your firewall is off?