deniscarriere / gopro Goto Github PK
View Code? Open in Web Editor NEW:camera: GoPro Hero 4 - Python API
License: MIT License
:camera: GoPro Hero 4 - Python API
License: MIT License
Hello,
Thank you for your help. This libraries work with go pro 5.
Thank you
Need to know when the camera is Active or not
>>> import gopro
>>> camera = gopro.camera()
>>> camera.ok
True
>>> camera
<GoPro Camera [OK]>
# Or if not connected
>>> camera.ok
False
>>> camera
<GoPro Camera [Not Connected]>
>>> camera.current
{'photo':68, 'video':3}
...
>>> camera.current_photo
68
>>> camera.current_video
3
udp://:8554
Just trying out the library (today, at 2017-02-11, 17.29h). Thanks for sharing this! However, today loading the library failed with the following error:
File "./GoPro.py", line 180, in datetime
d = datetime.datetime(d[0] + 2000, d[1], d[2], d[3], d[4], d[5])
ValueError: hour must be in 0..23
Raw output from the GoPro: %11%02%0B%29%1D%30
Which translates to: [17, 2, 11, 41, 29, 48]
When I subtract 24 from 41 I find the correct value of 17.
This seems to happen when my GoPro is powered on for >24h (running from a wall adapter).
I don't have a key "12" in status.
status_screen = status_screen[self.status_raw.get('12')]
KeyError: None
output of the http://10.5.5.9/gp/gpControl/status/
{"status":{
"1":1,"2":2,"3":0,"4":0,"6":0,"8":0,"9":0,"10":0,"11":0,"13":0,"14":0,"15":0,"16":0,"17":1,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"26":0,"27":0,"28":2,"29":"","30":"","31":1,"32":0,"33":0,"34":2331,"35":3906,"36":0,"37":0,"38":0,"39":0,"40":"%0F%06%18%14%1F%17","41":0,"42":0,"43":0,"44":0,"45":0,"46":1,"47":1,"48":1,"49":0,"54":15508576,"55":1,"56":4,"57":856028,"58":0,"59":0},
"settings": {"1":0,"2":9,"3":5,"4":0,"5":0,"6":1,"7":1,"8":0,"9":0,"10":0,"11":0,"12":0,"13":1,"14":0,"15":4,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":4,"27":0,"28":0,"29":5,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":4,"40":0,"41":13,"42":8,"43":0,"44":8,"45":8,"46":0,"47":0,"48":0,"49":0,"50":1,"51":1,"52":1,"53":0,"54":0,"55":2,"56":0,"57":0,"58":1,"59":0,"60":8,"61":1,"62":700000,"63":1,"64":1,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":1}}
>>> camera.busy
True
>>> camera.busy
False
>>> if not camera.busy:
>>> camera.photo()
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.