Motion - Netcam File URL Patch
You are here: Foswiki>Motion Web>NetcamFileURLPatch (07 May 2008, AngelCarpintero)Edit Attach

New feature on netcam_url option and enabling file:///... urls

Description of Patch

I developed a patch for motion project on svn trunk branch (next 3.2.8 release). This patch add new feature on

"netcam_url option" and it enables "file:///..." urls.

For me, it is interesting because it allows external non-standard process to get imatge and then motion grabs and processes image from local file.

Installation of Patch

Download the patch file. If it is packed as a gz or tar.gz unpack it first. Then copy it to the motion source directory and issue the command (assuming the patch file is called filename_of_patch_file.diff)

patch < patch_fileurl_netcam.diff

Then re-build Motion and test the patch.

Change History of Patch

  • 1.0 Initial revision

Discussion and Comments

I'll include in current trunk r179 .

-- AngelCarpintero - 23 Apr 2007

This patch needs more work , it's included in motion 3.2.9 but it's unusable yet .

-- AngelCarpintero - 19 Nov 2007

I did some fixes in svn , adding some log message and fix numeric debug_level values with defines.

How test it :

1-. Get an image (image.jpg)

2 -. Copy several times and change anything you want in those copies

3 -. Do a security copy : cp image.jpg image_orig.jpg

4 -. Run copy-loop.sh bash script

5 -. Set in motion.conf : netcam_url file:///home/user/image.jpg

6 -. Run motion and test this feature.

copy-loop.sh

#!/bin/bash

cp image_orig.jpg image_backup.jpg
cp image_backup.jpg image.jpg

while [ 1 ];
do
        cp image1.jpg image.jpg
        sleep 1
        cp image2.jpg image.jpg
        sleep 1
        cp image3.jpg image.jpg
        sleep 1
        cp image4.jpg image.jpg
        sleep 1
        cp image5.jpg image.jpg
        sleep 1
        cp image_backup.jpg image.jpg
        sleep 1
done

-- AngelCarpintero - 30 Dec 2007
Topic revision: r6 - 07 May 2008, AngelCarpintero
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.