Unofficial GoPro API Library for Python - connect to GoPro via WiFi.

Overview

GoPro API for Python

GitHub issues Github All Releases PyPi Version

Unofficial GoPro API Library for Python - connect to GoPro cameras via WiFi.

Compatibility:

  • HERO3
  • HERO3+
  • HERO4 (including HERO Session)
  • HERO+
  • HERO5 (including HERO5 Session)
  • HERO6
  • Fusion 1
  • HERO7 (Black)
  • HERO8 Black
  • MAX
  • HERO9 Black

Installation

From PyPi:

pip install goprocam

Git (unstable):

git clone http://github.com/konradit/gopro-py-api
cd gopro-py-api
python setup.py install

Tested on Python 3.6.0 -- works on Linux and Windows and Mac

Quick start:

Connect your camera to your computer via WiFi (WiFi on the camera must be on!)

from goprocam import GoProCamera, constants

goproCamera = GoProCamera.GoPro()

goproCamera.shoot_video(10)

Examples:

See examples for examples on how to use this API.

Documentation:

Documentation is available: docs

Video screencap:

Comments
  • Gopro Fusion compatibility

    Gopro Fusion compatibility

    Hi Konrad,

    Thanks for this lib. I was wondering if there is any plan to support the new gopro fusion. So far from my test you can connect and take_photo(). I have found most of the settings of the camera are still compatible such as Protune, EV change, Raw, photo/video mode etc... Only new settings such as resolution, ISO got new parameters that are not listed in the library.

    However since the fusion is a dual camera I can get or download only the back camera image. l'url return only the back camera file.

    Thanks

    H

    opened by hbardak 43
  • Media download says Not supported while recording or processing media.

    Media download says Not supported while recording or processing media.

    I am using gopro Hero 4 silver. Everytime I connect and capture it works. But when I try downloadLastMedia() option or downloadMedia() it shows "Not supported while recording or processing media."

    The self.isRecording() functions returns 1. What mode should I keep my camera to download the media files?

    opened by sankhakarfa 27
  • Problem with GoProHero3+

    Problem with GoProHero3+

    Hi been trying to solve this for a couple of days - HERO3+Silver - wonder if you have any ideas

    gpCam.overview() File "/usr/local/lib/python3.5/dist-packages/goprocam-3.0.3-py3.5.egg/goprocam/GoProCamera.py", line 1437, in overview self.getStatus(constants.Hero3Status.Mode))) File "/usr/local/lib/python3.5/dist-packages/goprocam-3.0.3-py3.5.egg/goprocam/GoProCamera.py", line 239, in getStatus data = self.getStatusRaw() File "/usr/local/lib/python3.5/dist-packages/goprocam-3.0.3-py3.5.egg/goprocam/GoProCamera.py", line 263, in getStatusRaw return self._request("camera/sx?t=" + self.getPassword()) File "/usr/local/lib/python3.5/dist-packages/goprocam-3.0.3-py3.5.egg/goprocam/GoProCamera.py", line 112, in _request return urllib.request.urlopen(uri, timeout=_timeout, context=_context).read().decode("utf-8") UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 11: invalid start byte

    opened by harwood-yoha 20
  • Initial setup issue (linux/python problem)

    Initial setup issue (linux/python problem)

    Following the README in gopro-py-api: I am up to the step which requires the command: from goprocam import GoProCamera, constants

    I believe this should be easy to troubleshoot, but my minimal experience with Linux and Python both is causing me trouble. I have already successfully installed everything instructed at the beginning of the document. Anytime I attempt the command, it seems to cause many errors and I'm not sure what's happening. Right now, my process is:

    pi@LoRaGateway:~ $ cd gopro-py-api pi@LoRaGateway:~/gopro-py-api $ python Python 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516] on linux2 Type "help", "copyright", "credits" or "license" for more information.

    from goprocam import GoProCamera, constants Traceback (most recent call last): File "", line 1, in File "goprocam/init.py", line 1, in from goprocam import GoProCamera File "goprocam/GoProCamera.py", line 3, in import urllib.request ImportError: No module named request

    Any help would be appreciated, I'm pretty positive the issue is simply stemming from my lack of know-how in linux and/or python.

    opened by chessnecessary 20
  • import goprocam error

    import goprocam error

    ImportError: No Module named request

    Can you please help with this error. I do not understand what is wrong.

    I also did: pip install request, but that didn't solve the problem.

    opened by gbaweja 10
  • Project deployment issue

    Project deployment issue

    Hi there! I wanted to deploy the code on Heroku with Flask server but it returns Application error. Please check the code and help me out on it. Please let me know if any detail is required I would be available.

    opened by Awais9 9
  • GoPro 5 cannot stream to VLC or OpenCV

    GoPro 5 cannot stream to VLC or OpenCV

    Hello:

    First, thanks for all of your work on this api -- it rocks!

    I am having issues streaming from a GoPro 5 to OpenCV and VLC. I first run the gopro_keepalive.py script and then I run the gopro_opencv.py script (and get an error that when Googled tells me that OpenCV did not receive a video stream), or VLC (which doesn't display anything, and upon stopping VLC, get an error that according to a Google search signifies that VLC did not receive a video stream).

    I have attached two screen shots that show the keepalive script running in one window, and opencv and/or VLC in the other. Any insight or advice you have on what I could be doing wrong is greatly appreciated!

    Thanks! Kerri vlc-nostream opencv-vlc-nostream-error

    opened by kerrias 8
  • GoPro 6 can get informations but cannot stream to VLC.

    GoPro 6 can get informations but cannot stream to VLC.

    Hello @KonradIT , Thank you for this amazing API.

    I tried it on Windows 7, i can get the camera connected and get the overview infos, but when it came to streaming it fails. I'm on the firmware 1.60.00, using pythonV3.7.0, and last ffmpegV4 64-bit (i also tried ffmpegV4 32bit just in case), and finally VLC-v3.03 to capture the stream using udp://localhost:5000.

    Here's my code for quick testing :

    from goprocam import GoProCamera
    # from goprocam import constants
    
    gpCam = GoProCamera.GoPro()
    # gpCam.pair(usepin=False)  # I use this as said to pair for the first time.
    
    print(gpCam.overview())  # I get the camera infos here but isRecording == Recording even if it's not !!!
    
    gpCam.stream("udp://localhost:5000")  # I tried to switch order with gpCam.livestream("start") just in case but nothing
    gpCam.livestream("start")
    
    while True:  # just for quick testing
        print()
    

    And here's the output :

    ffmpeg version N-91378-g3f953379e1 Copyright (c) 2000-2018 the FFmpeg developers
      built with gcc 7.3.0 (GCC)
      configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
      libavutil      56. 18.102 / 56. 18.102
      libavcodec     58. 20.104 / 58. 20.104
      libavformat    58. 17.101 / 58. 17.101
      libavdevice    58.  4.101 / 58.  4.101
      libavfilter     7. 25.100 /  7. 25.100
      libswscale      5.  2.100 /  5.  2.100
      libswresample   3.  2.100 /  3.  2.100
      libpostproc    55.  2.100 / 55.  2.100
    [h264 @ 00997680] non-existing PPS 0 referenced
        Last message repeated 1 times
    [h264 @ 00997680] decode_slice_header error
    [h264 @ 00997680] no frame!
    [h264 @ 00997680] non-existing PPS 0 referenced
        Last message repeated 1 times
    [h264 @ 00997680] decode_slice_header error
    [h264 @ 00997680] no frame!
    [h264 @ 00997680] non-existing PPS 0 referenced
        Last message repeated 1 times
    [h264 @ 00997680] decode_slice_header error
    [h264 @ 00997680] no frame!
    [h264 @ 00997680] non-existing PPS 0 referenced
        Last message repeated 1 times
    [h264 @ 00997680] decode_slice_header error
    [h264 @ 00997680] no frame!
    [h264 @ 00997680] non-existing PPS 0 referenced
        Last message repeated 1 times
    [h264 @ 00997680] decode_slice_header error
    [h264 @ 00997680] no frame!
    [h264 @ 00997680] non-existing PPS 0 referenced
        Last message repeated 1 times
    [h264 @ 00997680] decode_slice_header error
    [h264 @ 00997680] no frame!
    [h264 @ 00997680] non-existing PPS 0 referenced
        Last message repeated 1 times
    [h264 @ 00997680] decode_slice_header error
    [h264 @ 00997680] no frame!
    [h264 @ 00997680] non-existing PPS 0 referenced
        Last message repeated 1 times
    [h264 @ 00997680] decode_slice_header error
    [h264 @ 00997680] no frame!
    [mpegts @ 00982900] Could not find codec parameters for stream 2 (Unknown: none ([128][0][0][0] / 0x0080)): unknown codec
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    Input #0, mpegts, from 'udp://10.5.5.9:8554':
      Duration: N/A, start: 0.066733, bitrate: N/A
      Program 1 
        Stream #0:0[0x1011]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709, progressive), 848x480 [SAR 1:1 DAR 53:30], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
        Stream #0:1[0x1100]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 193 kb/s
        Stream #0:2[0x200]: Unknown: none ([128][0][0][0] / 0x0080)
    Please use -b:a or -b:v, -b is ambiguous
    Stream mapping:
      Stream #0:0 -> #0:0 (h264 (native) -> mpeg2video (native))
      Stream #0:1 -> #0:1 (aac (native) -> mp2 (native))
    Press [q] to stop, [?] for help
    [h264 @ 00a33280] concealing 1127 DC, 1127 AC, 1127 MV errors in P frame
    [swscaler @ 08b63e00] deprecated pixel format used, make sure you did set range correctly
    Output #0, mpegts, to 'udp://localhost:5000':
      Metadata:
        encoder         : Lavf58.17.101
        Stream #0:0: Video: mpeg2video (Main), yuv420p, 848x480 [SAR 1:1 DAR 53:30], q=2-31, 800 kb/s, 30 fps, 90k tbn, 30 tbc
        Metadata:
          encoder         : Lavc58.20.104 mpeg2video
        Side data:
          cpb: bitrate max/min/avg: 0/0/800000 buffer size: 0 vbv_delay: -1
        Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
        Metadata:
          encoder         : Lavc58.20.104 mp2
    [h264 @ 05f86c00] concealing 1142 DC, 1142 AC, 1142 MV errors in P frame
    [h264 @ 00a33a40] cabac decode of qscale diff failed at 51 8
    [h264 @ 00a33a40] error while decoding MB 51 8, bytestream 2671
    [h264 @ 00a33a40] concealing 1164 DC, 1164 AC, 1164 MV errors in P frame
    [h264 @ 00a33280] concealing 504 DC, 504 AC, 504 MV errors in P frame
    [h264 @ 00a33280] concealing 278 DC, 278 AC, 278 MV errors in P frame
    [h264 @ 00a40000] concealing 129 DC, 129 AC, 129 MV errors in P frame
    [h264 @ 00a33640] error while decoding MB 23 5, bytestream -33
    [h264 @ 00a33640] concealing 1351 DC, 1351 AC, 1351 MV errors in I frame
    [h264 @ 00a33640] cabac decode of qscale diff failed at 0 23
    [h264 @ 00a33640] error while decoding MB 0 23, bytestream 500
    [h264 @ 00a33640] concealing 420 DC, 420 AC, 420 MV errors in P frame
    [h264 @ 00a33640] cabac decode of qscale diff failed at 20 24
    [h264 @ 00a33640] error while decoding MB 20 24, bytestream 302
    [h264 @ 00a33640] concealing 347 DC, 347 AC, 347 MV errors in P frame
    [h264 @ 00a33280] cabac decode of qscale diff failed at 47 14
    [h264 @ 00a33280] error while decoding MB 47 14, bytestream 1797
    [h264 @ 00a33280] concealing 850 DC, 850 AC, 850 MV errors in P frame
    [h264 @ 00a33280] cabac decode of qscale diff failed at 41 22
    [h264 @ 00a33280] error while decoding MB 41 22, bytestream 580
    [h264 @ 00a33280] concealing 432 DC, 432 AC, 432 MV errors in P frame
    [h264 @ 00a33280] concealing 1162 DC, 1162 AC, 1162 MV errors in P frame
    [h264 @ 00a33280] cabac decode of qscale diff failed at 10 18
    [h264 @ 00a33280] error while decoding MB 10 18, bytestream 1542
    [h264 @ 00a33280] concealing 675 DC, 675 AC, 675 MV errors in P frame
    [h264 @ 00a33280] concealing 1140 DC, 1140 AC, 1140 MV errors in P frame
    [h264 @ 00a40000] cabac decode of qscale diff failed at 20 6
    [h264 @ 00a40000] error while decoding MB 20 6, bytestream 2778
    [h264 @ 00a40000] concealing 1301 DC, 1301 AC, 1301 MV errors in P frame
    [h264 @ 00a40000] concealing 1162 DC, 1162 AC, 1162 MV errors in P frame
    [h264 @ 00a40000] concealing 890 DC, 890 AC, 890 MV errors in P frame
    [h264 @ 00a40000] concealing 471 DC, 471 AC, 471 MV errors in P frame
    [h264 @ 00a33a40] cabac decode of qscale diff failed at 22 20
    [h264 @ 00a33a40] error while decoding MB 22 20, bytestream 1036
    [h264 @ 00a33a40] concealing 557 DC, 557 AC, 557 MV errors in P frame
    [h264 @ 05f86c00] concealing 178 DC, 178 AC, 178 MV errors in P frame
    [h264 @ 05f86c00] cabac decode of qscale diff failed at 20 20
    [h264 @ 05f86c00] error while decoding MB 20 20, bytestream 1802
    [h264 @ 05f86c00] concealing 559 DC, 559 AC, 559 MV errors in P frame
    [h264 @ 05f86c00] cabac decode of qscale diff failed at 36 25
    [h264 @ 05f86c00] error while decoding MB 36 25, bytestream 714
    [h264 @ 05f86c00] concealing 278 DC, 278 AC, 278 MV errors in P frame
    [h264 @ 05f86c00] concealing 1240 DC, 1240 AC, 1240 MV errors in P frame
    [h264 @ 05f86c00] concealing 676 DC, 676 AC, 676 MV errors in P frame
    [h264 @ 00a33a40] concealing 108 DC, 108 AC, 108 MV errors in P frame
    [h264 @ 05f86c00] error while decoding MB 52 28, bytestream -5
    [h264 @ 05f86c00] concealing 103 DC, 103 AC, 103 MV errors in P frame
    [h264 @ 05f86c00] concealing 881 DC, 881 AC, 881 MV errors in P frame
    [h264 @ 00a33a40] cabac decode of qscale diff failed at 25 6
    [h264 @ 00a33a40] error while decoding MB 25 6, bytestream 3839
    [h264 @ 00a33a40] concealing 1296 DC, 1296 AC, 1296 MV errors in P frame
    [h264 @ 00a33a40] concealing 1017 DC, 1017 AC, 1017 MV errors in P frame
    [h264 @ 00a33a40] concealing 1284 DC, 1284 AC, 1284 MV errors in P frame
    [h264 @ 00a33280] concealing 812 DC, 812 AC, 812 MV errors in P frame
    [h264 @ 00a40000] concealing 570 DC, 570 AC, 570 MV errors in P frame
    [h264 @ 00a33280] concealing 1233 DC, 1233 AC, 1233 MV errors in P frame
    [h264 @ 00a33280] concealing 622 DC, 622 AC, 622 MV errors in P frame
    [h264 @ 00a33280] cabac decode of qscale diff failed at 7 21
    [h264 @ 00a33280] error while decoding MB 7 21, bytestream 39601
    [h264 @ 00a33280] concealing 519 DC, 519 AC, 519 MV errors in P frame
    [h264 @ 00a33640] cabac decode of qscale diff failed at 6 10
    [h264 @ 00a33640] error while decoding MB 6 10, bytestream 19291
    [h264 @ 00a33640] concealing 1103 DC, 1103 AC, 1103 MV errors in P frame
    [h264 @ 00a33640] concealing 1273 DC, 1273 AC, 1273 MV errors in P frame
    [h264 @ 00a33640] concealing 1232 DC, 1232 AC, 1232 MV errors in P frame
    [h264 @ 00a33640] concealing 1257 DC, 1257 AC, 1257 MV errors in P frame
    [h264 @ 00a33640] concealing 1008 DC, 1008 AC, 1008 MV errors in P frame
    [h264 @ 00a33280] concealing 164 DC, 164 AC, 164 MV errors in P frame
    [h264 @ 00a40000] concealing 1159 DC, 1159 AC, 1159 MV errors in P frame
    [h264 @ 00a40000] concealing 1135 DC, 1135 AC, 1135 MV errors in P frame
    [h264 @ 00a40000] concealing 1092 DC, 1092 AC, 1092 MV errors in P frame
    [h264 @ 00a40000] cabac decode of qscale diff failed at 0 16
    [h264 @ 00a40000] error while decoding MB 0 16, bytestream 1526
    [h264 @ 00a40000] concealing 791 DC, 791 AC, 791 MV errors in P frame
    [h264 @ 05f86c00] cabac decode of qscale diff failed at 6 7
    [h264 @ 05f86c00] error while decoding MB 6 7, bytestream 3098
    [h264 @ 05f86c00] concealing 1262 DC, 1262 AC, 1262 MV errors in P frame
    [h264 @ 05f86c00] concealing 1045 DC, 1045 AC, 1045 MV errors in P frame
    

    And sometimes is starts with :

    [mpegts @ 0000000000502d40] PES packet size mismatch
        Last message repeated 1 times
    [mpegts @ 0000000000502d40] Could not find codec parameters for stream 2 (Unknown: none ([128][0][0][0] / 0x0080)): unknown codec
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    

    Do i need to upgrade to the last firmware 2.01 ? i hope not, it's a disaster ^^" Can you help with this one please ?

    Thank you so much for keeping this a live. Karam.

    opened by neokyuubi 7
  • Hero 10 webcam python script

    Hero 10 webcam python script

    Hallo I´m working on a script and want to read the hero 10 webcam video, but I do not want to show it with vlc player like it´s implementet, I want to use cv2

    But I can´t get it working. The connection works I connect to the camera the hero 10 shows that webcam is aktiv, but I do not get a stream.

    I did the same over wifi, therfore I get the stream but it was to laggy

    Can you help me?

    import cv2
    from time import time
    import socket
    from goprocam import GoProCamera, constants
    import queue
    import threading
    
    gpCam = GoProCamera.GoPro(ip_address="172.22.141.51")
    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    t=time()
    gpCam.livestream("start")
    gpCam.video_settings(res='1080p', fps='30')
    
    q=queue.Queue()
    
    def Receive():
        print("start Reveive")
        cap = cv2.VideoCapture("udp://172.22.141.51:8554", cv2.CAP_FFMPEG)
        while True:
            ret, frame = cap.read()
            if not ret or frame is None:
                print('video is all read')
                break
            q.put(frame)
        
        cap.release()
        cv2.destroyAllWindows()
    
    
    def Display():
        print("Start Displaying")
        t=time()
        while True:
            if q.empty() !=True:
                frame=q.get()
                cv2.imshow("GoPro OpenCV", frame)
            if cv2.waitKey(1) & 0xFF == ord('q'):
                    break
            if q.empty() != True:
                frame = q.get()
                # Save the picture 
                cv2.imshow("GoPro OpenCV", frame)
                # cv2.imshow(save_name, frame)
                if cv2.waitKey(1) & 0xFF == ord('q'):
                    break
                if time() - t >= 2.5:
                    sock.sendto("_GPHD_:0:0:2:0.000000\n".encode(), ("172.22.141.51", 8554))
                    t=time()
    
    
    if __name__=='__main__':
        p1 = threading.Thread(target=Receive)
        p2 = threading.Thread(target=Display)
        p1.start()
        p2.start()
    
    opened by druckgott 6
  • Added webcam features

    Added webcam features

    Thanks to @gurgelx for his webcam project.

    Added:

    • gpWebcam call driver
    • helper method getWebcamIP
    • Calls startWebcam, stopWebcam, webcamFOV and getWebcamPreview (launches VLC)
    • renewWebcamIP (renews IP address)
    opened by KonradIT 6
  • gpCam.pair AttributeError: 'module' object has no attribute '_create_unverified_context'

    gpCam.pair AttributeError: 'module' object has no attribute '_create_unverified_context'

    Thank you for sharing this API I'm using goprocam (1.9.6) on python 3 with gopro hero 4 session. Unfortunately my terminal looks like this: pi@noobs190:~ $ python3 Python 3.4.2 (default, Oct 19 2014, 13:31:11) [GCC 4.9.1] on linux Type "help", "copyright", "credits" or "license" for more information.

    from goprocam import GoProCamera from goprocam import constants gpCam = GoProCamera.GoPro(constants.gpcontrol) Waking up... Camera successfully connected! Connected to 10.5.5.9 gpCam.pair() Make sure your GoPro camera is in pairing mode! Go to settings > Wifi > PAIR > GoProApp to start pairing. Then connect to it, the ssid name should be GOPRO-XXXX/GPXXXXX/GOPRO-BP-XXXX and the password is goprohero Enter pairing code: 4680 Traceback (most recent call last): File "", line 1, in File "/home/pi/.local/lib/python3.4/site-packages/goprocam/GoProCamera.py", line 362, in pair context = ssl._create_unverified_context() AttributeError: 'module' object has no attribute '_create_unverified_context'

    opened by Berryfier 6
  • GoPro HERO 10 power_off() and power_on()

    GoPro HERO 10 power_off() and power_on()

    Hi everyone, I'm studying this amazing library.

    I've a GoPro HERO 10 that I want to control with the USB cable. I tried to take a picture and it seems to work.

    Then I wanted to try the "turn off - turn on" behavior but the power_on()method does not work. it says "Waking..." but nothing happens

    How it supposed to work?

    Thanks in advance

    opened by Sladerix 1
  • Gopro Hero 11 support

    Gopro Hero 11 support

    Dear all I was using the library for a while with my GPH10. Recently I received my new GPH11 and unfortunately the gopro-py-api does not work anymore, like with GPH10. Does someone know what the difference in the firmware is? I would appreciate, if someone could help getting the gopro-py-api for Gopro Hero 11 compatible.

    Thanks for your help Regards Bartelime

    opened by Bartelime 3
  • ERROR: HTTP Error 500: Internal Server Error when trying to download images

    ERROR: HTTP Error 500: Internal Server Error when trying to download images

    Describe the bug Error 500 when downloading images from a Gopro Hero 4.

    To Reproduce Steps to reproduce the behavior:

    1. Use the script provided in examples: https://github.com/KonradIT/gopro-py-api/blob/master/examples/dump_sdcard.py
    2. Error 500 will appear

    Expected behavior Files to be downloaded correctly without error.

    Screenshots

    $ python gopro-download-all.py
    HERO4 Silver
    HD4.01.05.00.00
    Camera successfully connected!
    filename: GOPR0006.JPG
    ERROR: HTTP Error 500: Internal Server Error
    filename: GOPR0007.JPG
    ERROR: HTTP Error 500: Internal Server Error
    filename: GOPR0008.JPG
    ERROR: HTTP Error 500: Internal Server Error
    

    Desktop (please complete the following information):

    • OS: Raspbian
    • goprocam 4.2.0
    • Python 3.9.2

    Additional context

    • Tried to browse URL using lynx. List is served with HTTP Status 200, but got 500 when trying to download.
    • Images are 3MB
    opened by tvial-tagheuer 0
  • GoPro Hero 9 connected via USB - take_photo() not returning

    GoPro Hero 9 connected via USB - take_photo() not returning

    @KonradIT

    I was following a discussion from https://github.com/gopro/OpenGoPro/discussions/146. I connect my GoPro Hero 9 (firmware v1.21) to my MacBook Pro via USB. I am running code you provided AlanEbell in PyCharm with a little modification to account for the UUID (code is provided below). When I run the program, the code takes a photo and saves it onto the SD card in the GoPro but it does not download the photo onto my laptop and does not stop until I stop the program. When I tried gopro.shoot_video(10) the command would start taking a video but it would go over the 10 second duration until I manually stop the recording on the GoPro and the code. When I debug the issue I find out that the program is stuck at the command gopro.take_photo() or gopro.shoot_video() where the command is not being completed and that the command is going into an infinite loop at GoProCamera.py line 587 to 589 (for gopro.take_photo()) where ready = "" stating that it is still busy.

    When I run the same code in Windows 10 (again in PyCharm), instead of getting an infinite loop I get an error message stating Connectionreseterror: [winerror 10054] an existing connection was forcibly closed by the remote host

    What is weird is before I downgraded the firmware to v1.21, I ran the program and I was not able to take a photo or video but the program would be able to download the last saved photo/video from the SD card.

    from goprocam import GoProCamera, constants
    import netifaces as ni
    
    interface_port = 0
    ifaces = ni.interfaces()
    for iface in ifaces:
        try:
            ip = ni.ifaddresses(iface)[ni.AF_INET][0]["addr"]
            if ip.startswith("172."):
                print(f"IP: {ip} from Interface {iface}")
                interface_port = iface
        except:
            pass
    
    
    def record_video(interface: str) -> None:
        gopro = GoProCamera.GoPro(ip_address=GoProCamera.GoPro.getWebcamIP(
            interface), camera=constants.gpcontrol, webcam_device=interface, api_type=constants.ApiServerType.OPENGOPRO)
        try:
            r = gopro.setWiredControl(constants.on)
            gopro.checkResponse(r)
        except:
            pass  # sometimes throws 500 server error when camera is already on wired control mode
    
        print("Taking Photo")
        r = gopro.take_photo(1) # Error creating infinite while loop in GoProCamera.py line 587 to 589
        print(r)
        print("Photo Taken")
        gopro.downloadLastMedia()
        r = gopro.delete(constants.Delete.LAST)
        gopro.checkResponse(r)
        exit()
    
    
    record_video(interface_port)
    

    MacOS Monterey 12.5.1 Windows 10 PyCharm GoPro Hero 9 v1.21

    opened by Peter-S-G 1
  • GoPro MAX Metadata during Livestream

    GoPro MAX Metadata during Livestream

    Hi,

    does the GoPro MAX deliver metadata during livestreaming camera.livestream("start")? My goal is to read GPS and Gyroscope metadata of every x-th frame

    Thanks

    opened by Tr4in 0
  • Connect ubuntu and gopro10 with USB

    Connect ubuntu and gopro10 with USB

    Hello! I want to use USB to control the camera I also see the following solutions https://github.com/gopro/OpenGoPro/discussions/146

    According to its steps, I can now use the win10 to control the camera But when using ubuntu again I encountered the same mistake as 146 Don't know how to set the Linux kernel device identifier

    Run ls /dev/* Results of the command dev/libmtp-1-2.1

    I wonder if this problem has been successfully solved in the end? (discussions/146)

    We are looking forward to your reply Thank you very much

    opened by yangshubin27400430 1
Releases(v4.1.0)
Owner
Konrad Iturbe
Dedicated to modifying commercial-grade drones, cameras and other ARM-based devices.
Konrad Iturbe
The official Python client library for the Kite Connect trading APIs

The Kite Connect API Python client - v3 The official Python client for communicating with the Kite Connect API. Kite Connect is a set of REST-like API

Zerodha Technology 756 Jan 6, 2023
Demo to explain how to use AWS Chalice to connect to twitter API and change profile picture at scheduled times.

chalice-twitter-demo Demo to explain how to use AWS Chalice to connect to twitter API and change profile picture at scheduled times. Video Demo Click

Ahmed Mohamed 4 Dec 13, 2021
WatonAPI is an API used to connect to spigot servers with the WatonPlugin to communicate.

WatonAPI is an API used to connect to spigot servers with the WatonPlugin to communicate. You can send messages to the server and read messages, making it useful for cross-chat programs.

Waton 1 Nov 22, 2021
Unofficial YooMoney API python library

API Yoomoney - unofficial python library This is an unofficial YooMoney API python library. Summary Introduction Features Installation Quick start Acc

Aleksey Korshuk 136 Dec 30, 2022
An API wrapper for Henrik's Unofficial VALORANT API

ValorantAPI.py An API wrapper for Henrik's Unofficial VALORANT API Warning!! This project is still in beta and only contains barely anything yet. If y

Jakkaphat Chalermphanaphan 0 Feb 4, 2022
This package accesses nitrotype's official api along with its unofficial user api

NitrotypePy This package accesses nitrotype's official api along with its unofficial user api. Currently still in development. Install To install, run

The Moon That Rises 2 Sep 4, 2022
The unofficial Amazon search CLI & Python API

amzSear The unofficial Amazon Product CLI & API. Easily search the amazon product directory from the command line without the need for an Amazon API k

Asher Silvers 95 Nov 11, 2022
🔍 Google Search unofficial API for Python with no external dependencies

Python Google Search API Unofficial Google Search API for Python. It uses web scraping in the background and is compatible with both Python 2 and 3. W

Avi Aryan 204 Dec 28, 2022
Unofficial Python wrapper for official Hacker News API

haxor Unofficial Python wrapper for official Hacker News API. Installation pip install haxor Usage Import and initialization: from hackernews import H

null 147 Sep 18, 2022
Unofficial Medium Python Flask API and SDK

PyMedium - Unofficial Medium API PyMedium is an unofficial Medium API written in python flask. It provides developers to access to user, post list and

Engine Bai 157 Nov 11, 2022
(unofficial) Googletrans: Free and Unlimited Google translate API for Python. Translates totally free of charge.

Googletrans Googletrans is a free and unlimited python library that implemented Google Translate API. This uses the Google Translate Ajax API to make

Suhun Han 3.2k Jan 4, 2023
Unofficial Python API client for Notion.so

notion-py Unofficial Python 3 client for Notion.so API v3. Object-oriented interface (mapping database tables to Python classes/attributes) Automatic

Jamie Alexandre 3.9k Jan 3, 2023
An Unofficial TikTok API Wrapper In Python

This is an unofficial api wrapper for TikTok.com in python. With this api you are able to call most trending and fetch specific user information as well as much more.

David Teather 2.9k Jan 8, 2023
Unofficial python api for MicroBT Whatsminer ASICs

whatsminer-api Unofficial python api for MicroBT Whatsminer ASICs Code adapted from a python file found in the Whatsminer Telegram group that is credi

Satoshi Anonymoto 16 Dec 23, 2022
TeslaPy - A Python implementation based on unofficial documentation of the client side interface to the Tesla Motors Owner API

TeslaPy - A Python implementation based on unofficial documentation of the client side interface to the Tesla Motors Owner API, which provides functiona

Tim Dorssers 233 Dec 30, 2022
Unofficial instagram API, give you access to ALL instagram features (like, follow, upload photo and video and etc)! Write on python.

Instagram-API-python Unofficial Instagram API to give you access to ALL Instagram features (like, follow, upload photo and video, etc)! Written in Pyt

Vladimir Bezrukov 1 Nov 19, 2021
An unofficial Python wrapper for the 'Binance exchange REST API'

Welcome to binex_f v0.1.0 many interfaces are heavily used by myself in product environment, the websocket is reliable (re)connected. Latest version:

DeepLn 2 Jan 5, 2022
You can connect with Sanila Ranatunga using this bot😉😉

Sanila-Ranatunga-s-Assistant-Bot You can connect with Sanila Ranatunga using this bot ?? ?? Reach me on Telegram Sanila's Assistant Bot What is Telegr

Sanila Ranatunga 5 Feb 1, 2022
Telegram Bot to Connect Strangers

Telegram Bot to Connect Strangers How to Run Set your telegram bot token as environment variable TELEGRAM_BOT_TOKEN: export TELEGRAM_BOT_TOKEN=<your_t

PyTopia 12 Dec 24, 2022