jschmid1 / gopro_as_webcam_on_linux

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

No streaming ... #59

Closed redskate closed 9 months ago

redskate commented 9 months ago

Hi Joschua and viiiiiiilelen Dank for your nice idea!

The shell script says it recognizes a gopro camera and grabs an IP out of it. Then it start the camera mode. Unfortunately none of the expressions you provide in green (for ffmpeg and vlc) shows a working stream. ffmpeg blocks (does not stream) and VLC does not start any rendering.

On which infrastructure and which gopro camera did you test it?

My infrastructure: a miniPC with 6.2.0-37-generic #38~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 2 18:01:13 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

VLC and v4l2loopback-dkms are also installed, as you recommend - besides obviously ffmpeg. Note: my ffmpeg is separately happily streaming an attached second camera Logitech pro into an RTMP server. My test with your script are standalone - for the sake of simplicity, no other ffmpeg action is running.

No firewall is active and if yes, allowed 8554 as you show. Port 8554 is free and can be used in both directions.

Any idea where to go from here? Thanks a lot in advance! Of course I can provide if necessary the output but it is equal to some other issues.

redskate commented 9 months ago

PS: the port 8554 seems to be closed on any of the gopro IPs your script found out:

nc -v 172.29.174.51 8554 nc: connect to 172.29.174.51 port 8554 (tcp) failed: Connection refused

nc -v 172.29.174.53 8554 nc: connect to 172.29.174.53 port 8554 (tcp) failed: Connection refused

nc -v 0.0.0.0 8554 nc: connect to 0.0.0.0 port 8554 (tcp) failed: Connection refused

However, this IP (172.29.174.51) however delivers on port 80 (http) the API of the camera. E.G. http://172.29.174.51/gp/gpMediaList delivers the list of the registered movie (names). Cf also https://github.com/KonradIT/goprowifihack/blob/master/HERO9/README.md for more info.

There I found out the start/stop streaming are accomplished by the following commands: http://172.29.174.51/gp/gpControl/execute?p1=gpStream&c1=start http://172.29.174.51/gp/gpControl/execute?p1=gpStream&c1=stop both deliver a status=0 (OK) after the call.

redskate commented 9 months ago

I upgraded the camera firmware from 2.0 to 2.5 and now

http://172.29.174.51/gp/gpWebcam/START?res=1080p

puts the camera in webcam mode and a streaming is possible.