<p>For camera 0, if the hostname of your Octopi is <code>octopi.local</code> the default stream URI is <code>http://octopi.local:8081/</code>  (or whatever address your Octopi has). If you use a higher-number camera, use <code>8081+cam number</code> as the port.</p>
<p>The snapshot uri for camera 0 is <code>http://octopi.local:8081/0/current</code></p>
<p>If you use camera numbered higher, use whatever camera number you use in place of this <code>0</code> in the URL. It's especially tricky because literally every &quot;special&quot; URI of this format sits on 8080, the control port. This one is attached to the port of the first camera stream, regardless of which camera number you want.</p>
<p><a href="https://i.sstatic.net/m7hYd.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/m7hYd.jpg" alt="screenshot of Octopi webcam settings" /></a></p>

CC BY-SA 4.0
2023-02-06T15:52:54.663Z
2023-08-08T09:54:22.210Z
2023-08-08T09:54:22.210Z
SF.
<p>I spent way too much time trying to get webcam working with Octoprint. Since my webcam is not supported by <code>mjpegstream</code> and similar streamers, I had to use <a href="https://motion-project.github.io/" rel="nofollow noreferrer">Motion</a>. Finding the URL for the video stream was quite fast, but it seems no-one in the world except for the Motion's author themselves knows the URL for the stills for timelapse.</p>
<p>All the attempts in several places of the net canter around trying to connect to <code>http://octopi.local:8080/0/action/snapshot</code> which correctly produces a still jpg of the camera, places it in <code>/var/lib/motion</code> and returns a confirmation that the image was produced to web UI, with no image itself in sight. There are workarounds - python scripts, cgi for webserver, and so on. No-one seems to have found Motion's URL that would return a still jpg.</p>

<octoprint>
How to set up Octoprint with Motion as camera streaming service?
SF.
# How to set up Octoprint with Motion as camera streaming service?

(Asked by: username_0 on 2023-02-06)

I spent way too much time trying to get webcam working with Octoprint. Since my webcam is not supported by `mjpegstream` and similar streamers, I had to use [Motion](https://motion-project.github.io/). Finding the URL for the video stream was quite fast, but it seems no-one in the world except for the Motion's author themselves knows the URL for the stills for timelapse.

All the attempts in several places of the net canter around trying to connect to `http://octopi.local:8080/0/action/snapshot` which correctly produces a still jpg of the camera, places it in `/var/lib/motion` and returns a confirmation that the image was produced to web UI, with no image itself in sight. There are workarounds - python scripts, cgi for webserver, and so on. No-one seems to have found Motion's URL that would return a still jpg.

**Tags:** octoprint


---

## 1 answers

### Answer by username_0 on 2023-02-06. Score: 1 | Accepted answer

For camera 0, if the hostname of your Octopi is `octopi.local` the default stream URI is `http://octopi.local:8081/` (or whatever address your Octopi has). If you use a higher-number camera, use `8081+cam number` as the port.

The snapshot uri for camera 0 is `http://octopi.local:8081/0/current`

If you use camera numbered higher, use whatever camera number you use in place of this `0` in the URL. It's especially tricky because literally every "special" URI of this format sits on 8080, the control port. This one is attached to the port of the first camera stream, regardless of which camera number you want.

[![screenshot of Octopi webcam settings](https://i.sstatic.net/m7hYd.jpg)](https://i.sstatic.net/m7hYd.jpg)


---

