mirror of
https://github.com/motioneye-project/motioneye.git
synced 2026-03-02 22:57:06 -05:00
Feature request: ability to take snapshots from webui #86
Labels
No labels
Android app
Arch Linux
CI/CD
CSS
FreeBSD
HTML/HTTP
Home Assistant addon
JavaScript
Python
Raspberry Pi
Stale No Activity 60 Days
bug
code format
dependencies
dev branch
docker
documentation
duplicate
enhancement
feature
help wanted
i18n/l10n
invalid
legacy motionEye
meta
motion
motionEyeOS
notourproblem
python update
question
question
security
troubleshooting
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/motioneye#86
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jamo on GitHub (Jan 6, 2016).
I regularly run into situations where I would like to get a snapshot of the camera image, now I just kill motion/motioneye and take the snapshot with raspistill...
There was some discussion about it in #41 but I didn't find an issue for the feature request.
Also it would be nice it the snapshot feature would be accessible via http/rest api.
@ccrisan commented on GitHub (Jan 6, 2016):
Yes, such a feature is planned, stay tuned!
@TimAEllis commented on GitHub (May 25, 2016):
Hey, just noticed this issue hasn't been touched in close to half a year. Any update on this feature request?
@gdecostanzo commented on GitHub (Jul 22, 2016):
Is there a way to save snapshot jpg from Snapshot URL in Bash ? thanks
@Samfox2 commented on GitHub (Nov 28, 2016):
curl -m 10 -o /tmp/snapshot.jpg http://192.168.x.xx:8765/picture/x/current
@chrisf4lc0n commented on GitHub (Dec 22, 2016):
@Samfox2 You have to have streaming enabled for that to work and the the URL has to be replaced with whatever is in the "Snapshot URL".
@Cooper-Dale commented on GitHub (Feb 3, 2017):
I have streaming enabled, but i got no image:
`
pi@raspberrypi3:~ $ curl -m 10 -v -o /tmp/aaa.jpg http://192.168.1.7:8765/picture/1/current/
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 192.168.1.7 (192.168.1.7) port 8765 (#0)
< HTTP/1.1 200 OK
< Content-Length: 0
< Set-Cookie: motion_detected_1=false; Path=/
< Set-Cookie: monitor_info_1=33%26deg%3B; Path=/
< Set-Cookie: capture_fps_1=0.0; Path=/
< Server: motionEye/0.35.1
< Etag: "da39a3ee5e6b4b0d3255bfef95601890afd80709"
< Date: Fri, 03 Feb 2017 20:49:21 GMT
< Content-Type: image/jpeg
<
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
`
@MrMontesa commented on GitHub (May 4, 2017):
Hey all,
I came accross the same thing as I want to curl a "live" snapshot by URL. I got the same auth error as @Cooper-Dale and tried curl's auth implementation with "curl -u user:pass", which doesnt work either.
When reading thought the issues here I came to know that Motioneye did not implement basic auth but rather a security token based auth. curl -H "Authorization: Token xxxxxxxxxxxxxx" might help her but not too sure. I would need some help on how the string needs to look like.
Else official "curl" support to download a snapshot would be appreciated.
Any questions, let me know. Thanks
@ccrisan commented on GitHub (May 4, 2017):
One could use the snapshot url that's available from the settings panel, in the video streaming section. It includes the required signature.
@MrMontesa commented on GitHub (May 7, 2017):
Thanks for info.
I might be missing something then. My "Video streaming" section is completly empty.
I'm running a Pi Zero W with noir 2 cam. Motion is installed from the default repos.
@ccrisan commented on GitHub (May 7, 2017):
Just enable Advanced Options.
@MrMontesa commented on GitHub (May 7, 2017):
Thanks for your swift reply. From a comment in #434 I assume the advanced options are only available in MotioneyeOS, right? I'm running the default raspbian.
Here's a screen from my settings pane.
@chrisf4lc0n commented on GitHub (May 7, 2017):
You have to flick the "Video Streaming" switch on and then you will see it.
@ccrisan commented on GitHub (May 7, 2017):
It's Advanced Settings in fact (mea cupla) and it's right there in your screenshot.
@MrMontesa commented on GitHub (May 8, 2017):
Argh, dump me. Could have seen the "Advanced settings" switch myself.
After enabling "video streaming" and grabbing the URL containing the token, I was able to curl images directly from another host in my LAN. Great stuff! Very neat way to integrate Motioneye into other systems.
Again, thanks much for this nice piece of software.
@zZzimi commented on GitHub (May 14, 2017):
Hi ccrisan!
Is there any solution to use different resolution at streaming and the snapshot? I want to use lower resolution if I do a stream and higher when I create a snapshot. Thanks your answer!
@ccrisan commented on GitHub (May 14, 2017):
@zZzimi unfortunately there's no such possibility. Currently motion only provides one stream.
@v1k-t0r commented on GitHub (Jul 13, 2017):
@MrMontesa Can you provide working example please
@MrMontesa commented on GitHub (Jul 14, 2017):
@vganyn
1st, you have to get your token. The explanation how to get it is above.
2nd you can create a URL like this:
http://$YOUR_IP:8765/picture/1/current/?_username=admin&_signature=$your_token_goes_here
3rd: process the URL with whatever tool you need (e.g. curl, etc)
@v1k-t0r commented on GitHub (Jul 14, 2017):
@MrMontesa I did 1st & 2nd. Problem with 3rd.(
@MrMontesa commented on GitHub (Jul 14, 2017):
This is not HTTP auth, so you can ignore the -H parameter of curl. Secondly, iirc the user is always admin.
This command works for me:
curl -o ./image.jpg 'http://192.168.23.17:8765/picture/1/current/?_username=admin&_signature=my_token'@v1k-t0r commented on GitHub (Jul 14, 2017):
@MrMontesa Work like a charm with my username. Thank you very much!
@MrMontesa commented on GitHub (Jul 21, 2017):
I have the problem that quite often curl exits with code 0 but did not download any image. In verbose mode it looks like this:
As you can see the Download counters are all 0. When trying multiple times in a row with the same command, curl is suddenly able to get the image. This looks like this:
The Download counters are properly filled with data and the image got downloaded.
Is it possible to increase logging on motioneye end to see whats going on?
Thanks
@Samfox2 commented on GitHub (Jul 21, 2017):
I have the same problem.
What I did (as a dirty workaround) was putting the curl command in a loop and exit the loop if a file was written.
@MrMontesa commented on GitHub (Jul 21, 2017):
Thanks for info and good to know that its not limited to my local system. And yeah, for testing I did the same. But I do rely on a 3rd party application (openhab2) which uses the java curl library where this cant be done. So I'm keen on getting behind this issue.
@MrMontesa commented on GitHub (Jul 24, 2017):
I did a lot of testing ending up in tcpdumps and came to know that motioneye does not seem to send the image but sends an HTTP response of 200 - OK.
Since this is a new story I created #601 in order to analyze and troubleshoot in more detail. Would love to see some traction in the new ticket.
@ccrisan commented on GitHub (Aug 5, 2017):
This should be fixed with 0.36.1. Also the next version will have manual snapshot support using a button on the camera frame (added with
github.com/ccrisan/motioneye@55035be462).@jshep321 commented on GitHub (Jan 23, 2020):
Hi all,
Thought I'd share the "remote" snapshot button I found!
Motion has the native ability to remotely trigger a snapshot. In Motioneye the control port for this is on 7999. The below curl command causes the "lastsnap.jpg" (and associated datestamped file) to be stored in the /var/lib/motioneye/Camera1 directory.
curl -s -o /dev/null http://127.0.0.1:7999/0/action/snapshot #this causes a snapshotThen I can copy/link to that using my bash program...
@kiteloopdesign commented on GitHub (Jan 16, 2022):
By the way, this one works for me, but implies ssh'ing into the Raspberry pi. Tried with my local IP instead of the loopback IP but that doesn't seem to work...
EDIT: ok this does the trick now
curl -o image.jpg http://192.168.1.58/picture/1/current/@kiteloopdesign commented on GitHub (Jan 16, 2022):
Finally found where this "button" is... Adding it here in case it can help someone
@starbasessd commented on GitHub (Jan 16, 2022):
@kiteloopdesign Or you can:

Settings, Still Images, Enable Manual Snapshots
and when you click in a frame, you get the camera button in the lower right of the picture: