Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python SDK livestream demo defaults to invalid parameters which brick older cameras #563

Closed
LordXerus opened this issue Jul 4, 2024 · 3 comments · Fixed by #565
Closed
Assignees
Labels
bug Something isn't working demos Relating to demos

Comments

@LordXerus
Copy link

LordXerus commented Jul 4, 2024

First ensure you are using a camera that is currently supported by Open GoPro. Any other tickets will be rejected

GoPro Hero 10 Black is currently supported
Component
What is the bug in?

  • Demos (Python SDK)
  • Tutorials
  • Documentation
  • Specs (BLE, HTTP)

Describe the bug
When running the demo, the GoPro camera returns some unknown responses after connecting to the Wi-Fi hotspot. Then it times out on the Shutter Enable line of the code. The GoPro camera also stop responding to touch shortly after.

We were able to livestream to the same server via the RTMP option on the Quik App.

To Reproduce
Steps to reproduce the behavior:

  1. Open a suitable RTMP server. My laptop is running Arch Linux with an nginx server + nginx rtmp mod. VLC is used to playback the stream.
  2. We used a hotspot on an Android phone to connect the laptop and the gopro.
  3. Run the gopro-livestream demo with ssid, wifipass, and rtmp url. The rtmp url we used is rtmp://192.168.219.104/live. This setting works on the Quik app, but not in the demo. We are running the demo off the same laptop.
  4. Sometimes the demo cannot find the GoPro camera. In this case we swipe down > swipe left > Connections > Connect Device > GoPro Quik App.
  5. After the GoPro connects to the hotspot, it errors out on setting up the live stream.
  6. See error

Output of gopro-livestream ... | tee gopro-livestream-out.txt
gopro-livestream-out.txt

gopro_demo.log

Expected behavior
The live stream should start on our server, like how it does with the Quik app.

Screenshots
If applicable, add screenshots to help explain your problem.
Nothing visual. Mostly errors in the command line.

Hardware

  • Camera: GoPro Hero 10 Black
  • Desktop Laptop if applicable: Laptop with Arch Linux + Python 3.11 + Nginx
  • Smartphone if applicable (for Quik App): iPhone 13
  • Smartphone for hotspot: Google Pixel 7

Laptop runs Nginx + RTMP mod + VLC
Phone runs hotspot
Laptop w/ demo or iPhone w/ Quik app sends BLE to GoPro camera
GoPro camera streams back to Laptop via Android phone hotspot

Additional context
Add any other context about the problem here.

@LordXerus LordXerus added the bug Something isn't working label Jul 4, 2024
@github-actions github-actions bot added the triage Needs to be reviewed and assigned label Jul 4, 2024
@tcamise-gpsw tcamise-gpsw self-assigned this Jul 8, 2024
@tcamise-gpsw
Copy link
Collaborator

Hi. I'm able to replicate and see what the problem is.
The Python SDK is hardcoding the window_size and len arguments of the set_livestream_mode API if they are not set from the command line.
The demos are only tested against the latest camera which in this case can support window_size and lens parameters that are not supported on the Hero 10. And these nonsupported Hero 10 parameters are bricking the camera. This is a camera bug as it should handle bad parameters gracefully.
In any case, we can avoid this in the Python SDK by only sending valid parameters. For now I will just not send any parameter if not set from the CLI and move the responsibility to the user to choose correct parameters. I just tested this and the livestream demo is working. I'll push an update on the PR linked here.

@tcamise-gpsw tcamise-gpsw added demos Relating to demos and removed triage Needs to be reviewed and assigned labels Jul 8, 2024
@tcamise-gpsw tcamise-gpsw changed the title gopro-livestream demo not working. set shutter enable raises TimeoutError Python SDK livestream demo defaults to invalid parameters which brick older cameras Jul 8, 2024
@tcamise-gpsw tcamise-gpsw linked a pull request Jul 8, 2024 that will close this issue
@TarushShankar
Copy link

Hi @tcamise-gpsw and @LordXerus,

I noticed that the open go pro api package was last updated on April 23rd,2024. Can you push and upload the newest release on PyPI so that we can implement the demo livestream with the changed implementation?

Best

@tcamise-gpsw
Copy link
Collaborator

just pushed 0.16.2 which has the updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working demos Relating to demos
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants