gopro_as_webcam_on_linux icon indicating copy to clipboard operation
gopro_as_webcam_on_linux copied to clipboard

Camara appears as in webcam but vlc and google meet dont see it?

Open howtoendit opened this issue 2 years ago • 2 comments

favio@favio-IdeaPad-3-14IIL05:~$ sudo gopro webcam [sudo] password for favio:
Running GoPro Webcam Util for Linux [0.0.3]

   Launch Options     

==========================

  • Non-interactive: 0
  • Autostart: 0
  • Preview: 0
  • Resolution: 1080p
  • FOV: linear ==========================

v4l2loopback is loaded! v4l2loopback was unloaded successfully. v4l2loopback was successfully loaded. Please plug in your GoPro and switch it on. If it booted successfully (Charger icon on screen), hit Return

Guessing the GoPro's device name... I can only make an uneducated guess wrt the name of the interface that the GoPro exposes. For me the name of the interface is 'enxf64854ee7472'. This script will try to discover the device that was added last, as you just plugged in the camera, hence the interface added last should be the one we're looking for.

Discovered: enx5ee6e706d905. Using enx5ee6e706d905 to discover the GOPRO_IP. Found 172.22.149.53 To control the GoPro, we need to contact another interface (GOPRO_IP ending with .51).. Adapting internally.. Now using this GOPRO_IP internally: 172.22.149.51 { "status": 2, "error": 0 } { "status": 1, "error": 0 } Sucessfully started the GoPro Webcam mode. (The icon on the Camera should have changed)

You should be ready to use your GoPro on your prefered videostreaming tool. Have Fun!

If you want to use the GoPro in your prefered Video conferencing software (browser and apps works alike) pipe the UDP stream to a video device (that was created already) with this command:

ffmpeg -nostdin -threads 1 -i 'udp://@0.0.0.0:8554?overrun_nonfatal=1&fifo_size=50000000' -f:v mpegts -fflags nobuffer -vf format=yuv420p -f v4l2 /dev/video42

To get a preview of the output in vlc you can run this command To test this try this command(vlc needs to be installed):

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 put the vlc command it never loads, and when i put the ffmpeg command it never shows up on google meet.. Screenshot_2022-06-16_10-57-49 . i have a gopro hero 8 with firmware updated and i dont know what im doing wrong...

howtoendit avatar Jun 16 '22 14:06 howtoendit

I'm running on Linux Mint 20.3 Una with Kernel linux 5.15.0-41-generic and I have exactly the same problem.

The sudo gopro webcam command does make the GoPro recognise that it's being used as a webcam, but neither VLC nor Cheese nor anything else can actually see a webcam device connected (no device found).

Also using a GoPro Hero8 which I updated using the SD card.

A forum suggested installing guvcview to see if it works. It prompts me to select a device, so I picked GoPro. And then the following displayed on console:

V4L2_CORE: Unable to find parent usb device.GUVCVIEW: version 2.0.6
GUVCVIEW: couldn't open /home/name/.config/guvcview2/video42 for read: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device
V4L2_CORE: Error opening device /dev/video42: video capture not supported.
GUVCVIEW (1): Guvcview error
	 no video device found

pnguyen9 avatar Jul 25 '22 15:07 pnguyen9

It turns out my problem came from the fact that I had Linux Mint's firewall enabled. Most likely, the computer tried to connect to the GoPro and the connection was refused.

Upon disabling the firewall and trying again, it works perfectly fine.

pnguyen9 avatar Aug 07 '22 20:08 pnguyen9