-
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix listMedia && add dowload today example
- Loading branch information
Showing
5 changed files
with
184 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,248 +1,194 @@ | ||
|
||
## Docs: | ||
|
||
`GoPro(camera='detect', ip_address='10.5.5.9', | ||
mac_address='AA:BB:CC:DD:EE:FF') ` | ||
|
||
|
||
` | ||
| Methods defined here: | ||
|
||
**IsRecording**(self) | ||
|
||
` Returns either 0 or 1 if the camera is recording or not.` | ||
* GoPro(camera='detect', ip_address='10.5.5.9', | ||
mac_address='AA:BB:CC:DD:EE:FF') | ||
|
||
### Methods defined here: | ||
|
||
**KeepAlive**(self) | ||
* **IsRecording**(self) | ||
* Returns either 0 or 1 if the camera is recording or not. | ||
|
||
` Sends keep alive packet` | ||
* **KeepAlive**(self) | ||
* Sends keep alive packet | ||
|
||
**__init__**(self, camera='detect', ip_address='10.5.5.9', | ||
* **__init__**(self, camera='detect', ip_address='10.5.5.9', | ||
mac_address='AA:BB:CC:DD:EE:FF') | ||
* Initialize self. See help(type(self)) for accurate signature. | ||
|
||
` Initialize self. See help(type(self)) for accurate signature.` | ||
|
||
**__str__**(self) | ||
|
||
` Return str(self).` | ||
|
||
**cancelClip**(self, video_id) | ||
|
||
` cancels clip conversion` | ||
|
||
**changeWiFiSettings**(self, ssid, password) | ||
|
||
` Changes ssid and passwod of Hero4 camera` | ||
|
||
**clipStatus**(self, status) | ||
|
||
` returns clip status` | ||
|
||
**delete**(self, option) | ||
|
||
` Deletes media. "last", "all" or an integer are accepted values for option` | ||
|
||
**deleteFile**(self, folder, file) | ||
|
||
` Deletes a file. Pass folder and file as parameters.` | ||
|
||
**downloadAll**(self, option='') | ||
|
||
` Download all media on camera` | ||
|
||
**downloadLastMedia**(self, path='', custom_filename='') | ||
|
||
` Downloads last media taken, set custom_filename to download to that filename` | ||
|
||
**downloadLowRes**(self, path='', custom_filename='') | ||
|
||
` Downloads the low-resolution video` | ||
|
||
**downloadMedia**(self, folder, file, custom_filename='') | ||
|
||
` Downloads specific folder and filename` | ||
|
||
**downloadMultiShot**(self, path='') | ||
|
||
` Downloads a multi-shot sequence.` | ||
|
||
**getClip**(self, file, resolution, frame_rate, start_ms, stop_ms) | ||
* **__str__**(self) | ||
* Return str(self). | ||
|
||
` Starts a clip conversion: | ||
file: folder + filename | ||
resolution: see constants.Clip | ||
frame_rate: see constants.Clip | ||
start_ms: start of the video in ms | ||
stop_ms: stop of the video in ms` | ||
* **cancelClip**(self, video_id) | ||
* cancels clip conversion | ||
|
||
**getClipURL**(self, status) | ||
* **changeWiFiSettings**(self, ssid, password) | ||
* Changes ssid and passwod of Hero4 camera | ||
|
||
` gets clip URL from status` | ||
* **clipStatus**(self, status) | ||
* returns clip status | ||
|
||
**getInfoFromURL**(self, url) | ||
* **delete**(self, option) | ||
* Deletes media. "last", "all" or an integer are accepted values for option | ||
|
||
` Gets information from Media URL.` | ||
* **deleteFile**(self, folder, file) | ||
* Deletes a file. Pass folder and file as parameters. | ||
|
||
**getMedia**(self) | ||
* **downloadAll**(self, option='') | ||
* Download all media on camera | ||
|
||
` Returns last media URL` | ||
* **downloadLastMedia**(self, path='', custom_filename='') | ||
* Downloads last media taken, set custom_filename to download to that filename | ||
|
||
**getMediaFusion**(self) | ||
* **downloadLowRes**(self, path='', custom_filename='') | ||
* Downloads the low-resolution video | ||
|
||
**getMediaInfo**(self, option) | ||
* **downloadMedia**(self, folder, file, custom_filename='') | ||
* Downloads specific folder and filename | ||
|
||
` Returns an array of the last media, both front and back URLs` | ||
* **downloadMultiShot**(self, path='') | ||
* Downloads a multi-shot sequence. | ||
|
||
**getPassword**(self) | ||
* **getClip**(self, file, resolution, frame_rate, start_ms, stop_ms) | ||
* Starts a clip conversion: | ||
* file: folder + filename | ||
* resolution: see constants.Clip | ||
* frame_rate: see constants.Clip | ||
* start_ms: start of the video in ms | ||
* stop_ms: stop of the video in ms | ||
|
||
` Gets password from Hero3, Hero3+ cameras` | ||
* **getClipURL**(self, status) | ||
* gets clip URL from status | ||
|
||
**getPhotoEXIF**(self, option='', folder='', file='') | ||
* **getInfoFromURL**(self, url) | ||
* Gets information from Media URL. | ||
|
||
` Gets Photo EXIF data, set folder and file parameters.` | ||
* **getMedia**(self) | ||
* Returns last media URL | ||
|
||
**getPhotoInfo**(self, option='', folder='', file='') | ||
* **getMediaFusion**(self) | ||
|
||
` Gets photo nformation, set folder and file parameters. | ||
option parameters: w/h/wdr/raw...` | ||
* **getMediaInfo**(self, option) | ||
* Returns an array of the last media, both front and back URLs | ||
|
||
**getStatus**(self, param, value='') | ||
* **getPassword**(self) | ||
* Gets password from Hero3, Hero3+ cameras | ||
|
||
` This returns a status message based on param (status/setting) and value (numeric)` | ||
* **getPhotoEXIF**(self, option='', folder='', file='') | ||
* Gets Photo EXIF data, set folder and file parameters. | ||
|
||
**getStatusRaw**(self) | ||
* **getPhotoInfo**(self, option='', folder='', file='') | ||
* Gets photo nformation, set folder and file parameters. | ||
* option parameters: w/h/wdr/raw... | ||
|
||
` Delivers raw status message` | ||
* **getStatus**(self, param, value='') | ||
* This returns a status message based on param (status/setting) and value (numeric) | ||
|
||
**getVideoInfo**(self, option='', folder='', file='') | ||
* **getStatusRaw**(self) | ||
* Delivers raw status message | ||
|
||
` Gets video information, set folder and file parameters. | ||
option parameters: dur/tag_count/tags/profile/w/h` | ||
* **getVideoInfo**(self, option='', folder='', file='') | ||
* Gets video information, set folder and file parameters. | ||
option parameters: dur/tag_count/tags/profile/w/h | ||
|
||
**gpControlCommand**(self, param) | ||
* **gpControlCommand**(self, param) | ||
* sends Parameter gpControl/command | ||
|
||
` sends Parameter gpControl/command` | ||
* **gpControlExecute**(self, param) | ||
* sends Parameter to gpControl/execute | ||
|
||
**gpControlExecute**(self, param) | ||
* **gpControlSet**(self, param, value) | ||
* sends Parameter and value to gpControl/setting | ||
|
||
` sends Parameter to gpControl/execute` | ||
* **hilight**(self) | ||
* Tags a hilight in the video | ||
|
||
**gpControlSet**(self, param, value) | ||
* **infoCamera**(self, option='') | ||
* Gets camera info, such as mac address and firmware version. See constants.Camera for possible options. | ||
|
||
` sends Parameter and value to gpControl/setting` | ||
|
||
**hilight**(self) | ||
|
||
` Tags a hilight in the video` | ||
|
||
**infoCamera**(self, option='') | ||
|
||
` Gets camera info, such as mac address and firmware version. See constants.Camera for possible options.` | ||
|
||
**listMedia**(self, format=False, media_array=False) | ||
|
||
` Lists media on SD card | ||
* **listMedia**(self, format=False, media_array=False) | ||
* Lists media on SD card | ||
format = (True/False) - Sets formatting | ||
media_array = (True/False) - returns an array` | ||
|
||
**livestream**(self, option) | ||
media_array = (True/False) - returns an array | ||
|
||
` start livestreaming | ||
option = "start"/"stop"` | ||
* **livestream**(self, option) | ||
* start livestreaming | ||
option = "start"/"stop" | ||
|
||
**locate**(self, param) | ||
* **locate**(self, param) | ||
* Starts or stops locating (beeps camera) | ||
|
||
` Starts or stops locating (beeps camera)` | ||
* **mode**(self, mode, submode='0') | ||
* Changes mode of the camera. See constants.Mode and constants.Mode.SubMode for sub-modes. | ||
|
||
**mode**(self, mode, submode='0') | ||
* **overview**(self) | ||
|
||
` Changes mode of the camera. See constants.Mode and constants.Mode.SubMode for sub-modes.` | ||
|
||
**overview**(self) | ||
|
||
**pair**(self, usepin=True) | ||
|
||
` This is a pairing procedure needed for HERO4 and HERO5 cameras. When those type GoPro camera are purchased the GoPro Mobile app needs an authentication code when pairing the camera to a mobile device for the first time. | ||
* **pair**(self, usepin=True) | ||
* This is a pairing procedure needed for HERO4 and HERO5 cameras. When those type GoPro camera are purchased the GoPro Mobile app needs an authentication code when pairing the camera to a mobile device for the first time. | ||
The code is useless afterwards. This function will pair your GoPro to the | ||
machine without the need of using the mobile app -- at all.` | ||
|
||
**parse_value**(self, param, value) | ||
|
||
**power_off**(self) | ||
|
||
` Sends power off command` | ||
|
||
**power_on**(self, _mac_address='') | ||
machine without the need of using the mobile app -- at all. | ||
|
||
` Sends power on command. Mac address might need to be defined` | ||
* **parse_value**(self, param, value) | ||
|
||
**power_on_auth**(self) | ||
* **power_off**(self) | ||
* Sends power off command | ||
|
||
` Sends power on command to Hero 3/3+ cameras` | ||
* **power_on**(self, _mac_address='') | ||
* Sends power on command. Mac address might need to be defined | ||
|
||
**prepare_gpcontrol**(self) | ||
* **power_on_auth**(self) | ||
* Sends power on command to Hero 3/3+ cameras | ||
|
||
**reset**(self, r) | ||
* **prepare_gpcontrol**(self) | ||
|
||
` Resets video/photo/multishot protune values` | ||
* **reset**(self, r) | ||
* Resets video/photo/multishot protune values | ||
|
||
**sendBacpac**(self, param, value) | ||
* **sendBacpac**(self, param, value) | ||
* sends Parameter and value to 10.5.5.9/camera/ | ||
|
||
` sends Parameter and value to 10.5.5.9/camera/` | ||
* **sendCamera**(self, param, value='') | ||
* sends Parameter and value to 10.5.5.9/camera/ | ||
|
||
**sendCamera**(self, param, value='') | ||
* **setZoom**(self, zoomLevel) | ||
* Sets camera zoom (Hero6/Hero7), zoomLevel is an integer | ||
|
||
` sends Parameter and value to 10.5.5.9/camera/` | ||
* **shoot_video**(self, duration=0) | ||
* Shoots a video, if duration is 0 it will not stop the video, set duration to an integer to set the video duration. | ||
|
||
**setZoom**(self, zoomLevel) | ||
* **shutter**(self, param) | ||
* Starts/stop video or timelapse recording, pass constants.start or constants.stop as value in param | ||
|
||
` Sets camera zoom (Hero6/Hero7), zoomLevel is an integer` | ||
|
||
**shoot_video**(self, duration=0) | ||
|
||
` Shoots a video, if duration is 0 it will not stop the video, set duration to an integer to set the video duration.` | ||
|
||
**shutter**(self, param) | ||
|
||
` Starts/stop video or timelapse recording, pass constants.start or constants.stop as value in param` | ||
|
||
**stream**(self, addr, quality='') | ||
|
||
` Starts a FFmpeg instance for streaming to an address | ||
* **stream**(self, addr, quality='') | ||
* Starts a FFmpeg instance for streaming to an address | ||
addr: Address to stream to | ||
quality: high/medium/low` | ||
|
||
**streamSettings**(self, bitrate, resolution) | ||
quality: high/medium/low | ||
|
||
` Sets stream settings` | ||
* **streamSettings**(self, bitrate, resolution) | ||
* Sets stream settings | ||
|
||
**syncTime**(self) | ||
* **syncTime**(self) | ||
* Sets time and date to computer's time and date | ||
|
||
` Sets time and date to computer's time and date` | ||
* **take_photo**(self, timer=1) | ||
* Takes a photo. Set timer to an integer to set a wait time | ||
|
||
**take_photo**(self, timer=1) | ||
* **video_settings**(self, res, fps='none') | ||
* Change video resolution and FPS | ||
See constants.Video.Resolution | ||
|
||
` Takes a photo. Set timer to an integer to set a wait time` | ||
|
||
**video_settings**(self, res, fps='none') | ||
|
||
` Change video resolution and FPS | ||
See constants.Video.Resolution` | ||
|
||
**whichCam**(self) | ||
|
||
` This returns what type of camera is currently connected. | ||
- gpcontrol: HERO4 Black and Silver, HERO5 Black and Session, HERO Session (formally known as HERO4 Session), HERO+ LCD, HERO+. | ||
- auth: HERO2 with WiFi BacPac, HERO3 Black/Silver/White, HERO3+ Black and Silver.` | ||
* **whichCam**(self) | ||
* This returns what type of camera is currently connected. | ||
- gpcontrol: HERO4 Black and Silver, HERO5 Black and Session, HERO Session (formally known as HERO4 Session), HERO+ LCD, HERO+. | ||
- auth: HERO2 with WiFi BacPac, HERO3 Black/Silver/White, HERO3+ Black and Silver. | ||
|
||
* * * | ||
|
||
Data descriptors defined here: | ||
|
||
**__dict__** | ||
|
||
` dictionary for instance variables (if defined)` | ||
|
||
**__weakref__** | ||
* **__dict__** | ||
* dictionary for instance variables (if defined) | ||
|
||
` list of weak references to the object (if defined)` | ||
* **__weakref__** | ||
* list of weak references to the object (if defined) | ||
|
Oops, something went wrong.