Skip to content

Use a GoPro as a remote webcam using Python

New Course Coming Soon:

Get Really Good at Git

I have a GoPro Hero 7 White and I recently discovered I can use it as are remote webcam using a Python package called GoPro API for Python, available at

First install the package using pip3 install goprocam then enable the WiFi connection on the GoPro.

This makes the GoPro start a WiFi network. Connect to that network from the computer.

Now you’re ready to write your Python program to do whatever you want with the webcam.

Import GoProCamera and constants from goprocam:

from goprocam import GoProCamera, constants

Then call the GoProCamera.GoPro() method to get a camera object:

gopro = GoProCamera.GoPro(constants.gpcontrol)

Get an overview of the camera status using


In my case I got this printed out:

camera overview
current mode: Photo
current submode: Burst
current video resolution: out of scope
current video framerate: 240
pictures taken: 0
videos taken:  0
videos left: 02:10:44
pictures left: 11257
battery left: Halfway
space left in sd card: 58.04GB
camera SSID: HERO7 White
Is Recording: Not recording - standby
Clients connected: 2
camera model: HERO7 White
firmware version: H18.
serial number: C3343323864041

Now you can use a variety of methods that make the GoPro take actions.

You can take a photo immediately:


You can take a photo after 2 seconds:


You can shoot a 10-seconds video:


Or just start recording, with no preset end time, using


You can download the last picture or video taken using


You can also set a name for the file:


Tip: I ran into a bug that prevented me to download the picture when I called downloadLastMedia(). I was getting errors that said “Not supported while recording or processing media”. I had to call gopro.getStatusRaw() before calling downloadLastMedia() to fix it.

There are many useful methods like

You can find many examples here and more documentation here.

The camera is available on IP, with the MAC address AA:BB:CC:DD:EE:FF.

Are you intimidated by Git? Can’t figure out merge vs rebase? Are you afraid of screwing up something any time you have to do something in Git? Do you rely on ChatGPT or random people’s answer on StackOverflow to fix your problems? Your coworkers are tired of explaining Git to you all the time? Git is something we all need to use, but few of us really master it. I created this course to improve your Git (and GitHub) knowledge at a radical level. A course that helps you feel less frustrated with Git. Launching May 21, 2024. Join the waiting list!
→ Get my Python Handbook
→ Get my Python Handbook

Here is how can I help you: