Send Motion-user mailing list submissions to motion-user@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/motion-user or, via email, send a message with subject or body 'help' to motion-user-requ...@lists.sourceforge.net You can reach the person managing the list at motion-user-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than "Re: Contents of Motion-user digest..." Today's Topics: 1. Re: Grabbing a single frame (Eric Mansfield) 2. Re: Grabbing a single frame (tosiara) ---------------------------------------------------------------------- Message: 1 Date: Fri, 16 Nov 2018 20:01:13 -0700 From: Eric Mansfield <ericman...@gmail.com> To: motion-user@lists.sourceforge.net Subject: Re: [Motion-user] Grabbing a single frame Message-ID: <CAG5KSp5Ey=DoJ=o6lqudl2esnuzenmukzh2jmko0y7mogsm...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Gotcha. Unfortunately I don't know of a URL that returns a snapshot, but there *is* a URL that instructs motion to save a snapshot to the hard drive. From the browser you could make a request to take the snapshot, then make a second request (you might have to use cache busting) to retrieve the saved image. The first answer in the link below shows how to do it on the command line, but I think you could make a similar request directly from the browser: https://raspberrypi.stackexchange.com/questions/28234/take-snap-from-raspberry-pi-using-motion On Fri, Nov 16, 2018 at 7:46 PM David Powell <da...@depowell.com> wrote: > Thanks, but this setup is already becoming a beast with many arms, I don't > really want to add a whole 'nother infrastructure like Node.js. I have > Motion running on a Pi with 3 network cameras (more to be added later), > mySQL, Apache2, and a lot of my own custom Java and HTML code to handle the > presentation. It gives a summary page of the last two weeks for each > camera, which is clickable by day to show snapshots for that day. All of > the snapshots are also clickable to see the movie that goes with the > snapshot. Hovering over any snapshot with your mouse pops up a tooltip > showing the time, date, and length of the movie in seconds. > > I could show a live stream from all cameras on the summary page, but I > can't afford the bandwidth and it's not logically necessary. I'd rather > show a snapshot of each one and update them every few seconds with > javascript. Each snapshot is clickable, showing the live stream in a pop-up > page when clicked. > > Apparently it's possible to get a live stream from Motion also on port > 8081, no matter what port you have configured as the base port. The URL is > something like *http://motion-server:8081/ > <http://motion-server:8081/>1/stream* for camera #*1*. I can't find > anything about this in the documentation; I found it by examining the new > configuration console (ver. 4.1.1). I'm wondering if there is (or could > be!) a similar URL to fetch a snapshot. That would be perfect! > > As it is, the simple *nph-mjgrab* program would be all I need, if I could > get it to work. It just hangs when executed, both manually and via Apache2. > I have to kill the process ID to get rid of it. I'll probably try to debug > it, but C is not my strongest language. If I can't figure it out, maybe > I'll add some Java code to my existing program to give me the snapshot > functionality. > > David > > > On 11/16/18 5:59 PM, Eric Mansfield wrote: > > I searched and could not find a way to do this from within motion, but I'm > not an expert. Since I am using a node.js environment, I eventually came > across the mjpeg-camera library ( > https://www.npmjs.com/package/mjpeg-camera) which can capture a single > jpeg image from a mjpeg stream. You could use the library's stand-alone > server or integrate it into a simple node.js express server, for example. > Perhaps not as quick and easy to setup as you hoped, but it has worked for > me. > > Eric > > On Fri, Nov 16, 2018 at 2:05 PM David Powell <da...@depowell.com> wrote: > >> Hi everyone. I have a need to be able to grab a single frame from a >> specific camera stream and display it in the browser. Many moons ago I >> used a program that Kenneth Laversen wrote called *nph-mjgrab*. It >> worked great and was simple to set up and use. >> >> Several years went by and I lost interest in the whole camera setup, but >> now I am back into it and need this functionality again. I found the >> *nph-mjgrab* program on the old *motion* web site but I can't for the >> life of me get it to work. Does anyone else use this? Does the current >> *motion* still support it? Is there a better way to grab a single frame >> from a camera stream? >> >> Thanks, David >> _______________________________________________ >> Motion-user mailing list >> Motion-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/motion-user >> https://motion-project.github.io/ >> >> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user > > > > _______________________________________________ > Motion-user mailing > listMotion-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/motion-userhttps://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user > > _______________________________________________ > Motion-user mailing list > Motion-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/motion-user > https://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 2 Date: Sat, 17 Nov 2018 09:09:30 +0200 From: tosiara <tosi...@gmail.com> To: Motion discussion list <motion-user@lists.sourceforge.net> Subject: Re: [Motion-user] Grabbing a single frame Message-ID: <cachtdwt+v3mowsu7g_7vy_6waq9bfhuw5nwfg5fu2sfjgso...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" To get a single snapshot from motion use: http://motion:8081/1/current On Sat, Nov 17, 2018 at 5:02 AM Eric Mansfield <ericman...@gmail.com> wrote: > Gotcha. Unfortunately I don't know of a URL that returns a snapshot, but > there *is* a URL that instructs motion to save a snapshot to the hard > drive. From the browser you could make a request to take the snapshot, then > make a second request (you might have to use cache busting) to retrieve the > saved image. > > The first answer in the link below shows how to do it on the command line, > but I think you could make a similar request directly from the browser: > > https://raspberrypi.stackexchange.com/questions/28234/take-snap-from-raspberry-pi-using-motion > > > On Fri, Nov 16, 2018 at 7:46 PM David Powell <da...@depowell.com> wrote: > >> Thanks, but this setup is already becoming a beast with many arms, I >> don't really want to add a whole 'nother infrastructure like Node.js. I >> have Motion running on a Pi with 3 network cameras (more to be added >> later), mySQL, Apache2, and a lot of my own custom Java and HTML code to >> handle the presentation. It gives a summary page of the last two weeks for >> each camera, which is clickable by day to show snapshots for that day. All >> of the snapshots are also clickable to see the movie that goes with the >> snapshot. Hovering over any snapshot with your mouse pops up a tooltip >> showing the time, date, and length of the movie in seconds. >> >> I could show a live stream from all cameras on the summary page, but I >> can't afford the bandwidth and it's not logically necessary. I'd rather >> show a snapshot of each one and update them every few seconds with >> javascript. Each snapshot is clickable, showing the live stream in a pop-up >> page when clicked. >> >> Apparently it's possible to get a live stream from Motion also on port >> 8081, no matter what port you have configured as the base port. The URL is >> something like *http://motion-server:8081/ >> <http://motion-server:8081/>1/stream* for camera #*1*. I can't find >> anything about this in the documentation; I found it by examining the new >> configuration console (ver. 4.1.1). I'm wondering if there is (or could >> be!) a similar URL to fetch a snapshot. That would be perfect! >> >> As it is, the simple *nph-mjgrab* program would be all I need, if I >> could get it to work. It just hangs when executed, both manually and via >> Apache2. I have to kill the process ID to get rid of it. I'll probably try >> to debug it, but C is not my strongest language. If I can't figure it out, >> maybe I'll add some Java code to my existing program to give me the >> snapshot functionality. >> >> David >> >> >> On 11/16/18 5:59 PM, Eric Mansfield wrote: >> >> I searched and could not find a way to do this from within motion, but >> I'm not an expert. Since I am using a node.js environment, I eventually >> came across the mjpeg-camera library ( >> https://www.npmjs.com/package/mjpeg-camera) which can capture a single >> jpeg image from a mjpeg stream. You could use the library's stand-alone >> server or integrate it into a simple node.js express server, for example. >> Perhaps not as quick and easy to setup as you hoped, but it has worked for >> me. >> >> Eric >> >> On Fri, Nov 16, 2018 at 2:05 PM David Powell <da...@depowell.com> wrote: >> >>> Hi everyone. I have a need to be able to grab a single frame from a >>> specific camera stream and display it in the browser. Many moons ago I >>> used a program that Kenneth Laversen wrote called *nph-mjgrab*. It >>> worked great and was simple to set up and use. >>> >>> Several years went by and I lost interest in the whole camera setup, but >>> now I am back into it and need this functionality again. I found the >>> *nph-mjgrab* program on the old *motion* web site but I can't for the >>> life of me get it to work. Does anyone else use this? Does the current >>> *motion* still support it? Is there a better way to grab a single >>> frame from a camera stream? >>> >>> Thanks, David >>> _______________________________________________ >>> Motion-user mailing list >>> Motion-user@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/motion-user >>> https://motion-project.github.io/ >>> >>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user >> >> >> >> _______________________________________________ >> Motion-user mailing >> listMotion-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/motion-userhttps://motion-project.github.io/ >> >> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user >> >> _______________________________________________ >> Motion-user mailing list >> Motion-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/motion-user >> https://motion-project.github.io/ >> >> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user > > _______________________________________________ > Motion-user mailing list > Motion-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/motion-user > https://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ ------------------------------ Subject: Digest Footer _______________________________________________ Motion-user mailing list Motion-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/motion-user ------------------------------ End of Motion-user Digest, Vol 149, Issue 19 ********************************************