From 90763ba9439a71bab0df3dc1f369cd50f0f331ca Mon Sep 17 00:00:00 2001 From: Mr-DaveDev Date: Sun, 19 Aug 2018 20:03:17 -0600 Subject: [PATCH] Add static file processing via netcam_url 1. Add static movie processing via netcam_url 2. Remove file netcam_url which only processed single image 3. Remove experimental protocol of mjpg --- motion.c | 1 + motion_config.html | 32 ++--- netcam.c | 12 +- netcam.h | 2 - netcam_http.c | 349 --------------------------------------------- netcam_http.h | 32 ----- netcam_rtsp.c | 81 ++++++++--- netcam_rtsp.h | 1 + 8 files changed, 83 insertions(+), 427 deletions(-) diff --git a/motion.c b/motion.c index 42184ac7..282649eb 100644 --- a/motion.c +++ b/motion.c @@ -739,6 +739,7 @@ static int init_camera_type(struct context *cnt){ if (cnt->conf.netcam_url) { if ((strncmp(cnt->conf.netcam_url,"mjpeg",5) == 0) || (strncmp(cnt->conf.netcam_url,"v4l2" ,4) == 0) || + (strncmp(cnt->conf.netcam_url,"file" ,4) == 0) || (strncmp(cnt->conf.netcam_url,"rtmp" ,4) == 0) || (strncmp(cnt->conf.netcam_url,"rtsp" ,4) == 0)) { cnt->camera_type = CAMERA_TYPE_RTSP; diff --git a/motion_config.html b/motion_config.html index 97ec8d7e..5e595c85 100644 --- a/motion_config.html +++ b/motion_config.html @@ -182,8 +182,14 @@

- Static files can also be processed with a bit of additional setup via a v4l2loopback device. - Install the loopback software as described in the + Static files can also be processed by Motion in one of two ways. The first method + is by using the netcam_url option and using a prefix of file:\\. With + this method, Motion will process the file at the speed specified by + framerate. This allows the user to either speed up or slow down the video + processing to suit the particular need. +

+ The second option for processing a static file requires a bit of additional setup and uses a + v4l2loopback device. To set this up, first install the loopback software as described in the Output - Pipe Options section of this guide to create a /dev/videoX device and then use software such as ffmpeg to stream the static file into the v4l2 device. e.g. @@ -2732,15 +2738,6 @@

- mjpg:// - -

- rtsp://