
Show HN: Python library for GoPro cameras - konraditurbe
https://github.com/konradit/gopro-py-api
======
sorenjan
I don't think it's a great idea to name an unofficial project "GoPro-Py",
GoPro is a trademark.

Also, the code mixes notation. Most Python code use snake_case because it's
encouraged in PEP8, this code use both snake_case and camelCase
(take_photo(X), getStatusRaw()).

~~~
konraditurbe
Yes, I did mix cases, take_photo() and shoot_video() are quick access commands
that's why they're in different case. GitHub states it's an unofficial API in
the title as well.

~~~
dna_polymerase
> GitHub states it's an unofficial API in the title as well.

The ReadMe headline only says GoPro, nothing about unofficial. It looks like
it is official, especially with the product pics in the readme. I wouldn't be
surprised if GoPro will ask you to remove the repo, or rename it.

~~~
konraditurbe
First line after title: __Unofficial __GoPro API Library for Python - connect
to GoPro cameras via WiFi.

If it was official, the repo should be under @gopro not my username. I have
worked with GoPro cameras and published a lot on my GitHub and I had no
problems with them.

------
mkirklions
Guilty pleasure:

Knowing that 9 years ago I learned python as my first language despite at the
time, it wasnt taken very seriously outside single use and a beginner
language.

Maybe its just me, but I'm seeing the tech world settle down on a few
programming languages and standards. Python, Javascript, PHP, (from the other
topic RSS, JSON).

This is good for keeping things modular.

~~~
czechdeveloper
I see quite an opposite. There are new languages to replace some old, but old
stay. And one could say that JavaScript today is almost different language
than ES6 was.

By new coll languages I mean Go or Rust. Java and C# are still prominent in
business sphere. And I can see push of functional languages as well, such as
F#, but that is not so big pressure.

What I also see is big fracturing in ecosystems. When I started developing, I
used .NET. I could make WinForm application for Windows and WebForm for Web.

Now there is MVC, Razor Pages, Single page apps (where you have to choose from
many JavaScript frameworks). For Desktop app you can write WinForms, WPF, but
Electron with .Net seems to be also popular now.

It seems no two companies are using same stack anymore. For me it's becoming
quite overwhelming.

------
rgovostes
I found this the other day, wondering if my knockoff sports cam's protocol
(which I reverse engineered) was compatible with GoPro's. It seems that the
GoPro protocol is different, but my suspicion is that the protocol has
changed, and the SoC that my camera is using was compatible with an earlier
one.

~~~
konraditurbe
GoPro has their own API calls different from Amba A7 and other cheap cams
(they don't stream to rtsp). Which camera is it?

~~~
rgovostes
APEMAN A80 (or something like that). It uses a Novatek SoC, which I figured
was a clone of the Amba, which as I understand it GoPro _used_ to use, but no
longer does. Did I get it right? The device does have real-time streaming
capabilities that I used but I didn't investigate the protocol.

~~~
konraditurbe
Try using the standard ChinaPro RTSP URIs:

\- rtsp://192.168.42.1/live

\- rtsp://192.168.1.1:554/MJPG?W=720&H=400&Q=50&BR=5000000/track1

Their app is
[https://play.google.com/store/apps/details?id=com.zsbrother....](https://play.google.com/store/apps/details?id=com.zsbrother.wearcam.zsanycam&hl=en),
and I bet they left some port open other than 80/8080

GoPro hires developers who make their WiFi API from the ground up (they used
to stream using HLS, now they use UDP).

~~~
rgovostes
All of my device's services are on 192.168.1.254. The app CamKing which speaks
the protocol has a string in it that references rtsp:// but I've never tried.
I have a blog post on the device in the queue, waiting for a time-lapse video
to finish...

~~~
konraditurbe
did you end up posting the blog post?

------
matt_the_bass
We’ve been using this at work. It was a nice starting point for us. Thanks!

A couple of comments:

1\. We want to take a bunch of snapshots. We found that taking a picture also
saved it to sdcard. And the more pictures on the card, the slower it
performed. We ended up writing code to erase the picture we just took after
offloading it.

2\. We learned that we can’t connec the GoPro to computers USB for power while
running this as the camera changes to a different mode. However, a stand alone
usb charger worked well while using this. That might be nice to add to the
reader.

~~~
konraditurbe
For those interested in 1)

    
    
        gopro = GoProCamera.GoPro()
        gopro.take_photo()
        gopro.downloadLastMedia()
        gopro.delete("last")

~~~
matt_the_bass
Thanks for the reply! That’s basically what we did.

That might be a nice addition to the readme.

------
konraditurbe
Note; this is an unofficial GoPro API for Python, it's not supported by GoPro.

------
yanslookup
Does this mean I can use my gopro hero 3 as a wireless webcam? Awesome.

------
mulmen
I just got my first GoPro last week. This is perfect timing! I’m still
figuring out their ecosystem of apps but I’m sure I will encounter some
limitation that this project will help solve.

~~~
konraditurbe
cool! Let me know if you have any doubts.

------
uasnew
Is there a way to make a gopro act as a webcam in linux? (not with wifi,
preferably with usb 3?)

~~~
vetinari
GoPro streaming has too high latency, but if it is fine for you, the utility
in the linked repo can do udp streaming.

For low-latency streaming, a better bet would be HDMI capture card or dongle
and using HDMI-out on the GoPro.

