Motion Stream Authentication Patch
Description of Patch
This patch add authentication support to the "Live Stream Server" function.
It contains two authentication methods 'Basic Authentication' and 'Digest Authentication'.
# Set the authentication method (default: 0)
# 0 = disabled
# 1 = Basic authentication
# 2 = MD5 digest (the safer authentication)
# Authentication for the http based control. Syntax username:password
# Default: not defined (Disabled)
; stream_authentication username:password
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 motion_stream_auth.patch)
patch < motion_stream_auth.patch
Then re-build Motion and test the patch.
Change History of Patch
Thanks Michael, I'll give a try.
- 15 Nov 2009
Included in trunk r472.
- 23 Nov 2009
Is it implemented in Version 3.2.12? I``s seems to be but not working.
- 18 Oct 2011
Included in GIT and SVN trunk.
- 31 Oct 2011
I have ran apt-get install motion and i still dont have the new feature
- 10 Apr 2013
Hi, Kinda new here. How do you download the patch and how do you re-build motion?
- 17 Apr 2013
You don't need the path, just download the latest verision: http://www.lavrsen.dk/sources/motion-daily//motion-20120605-224837.tar.gz
and run "./configure" and then "make" to get the latest version of motion with authentication for streams. Just tried it out on Raspberry Pi and works great. BTW, you will want to add this to track.c: #include <linux/videodev2.h> to get past a compilation problem on Raspberry.
- 09 May 2013
, it's taken me ages to get motion set up and working. if i download the latest version above and ./configure and make as you say, will it just neatly update the version i am running leaving me to just re-edit the motion.conf or do i have to remove the current version? thanks d
- 31 May 2013
Also interested in adding a password for the webcam stream. And I'm also confused on what exactly I need to do with the patch file to get it incorporated into motion.
I'm one of the newbies. Does this sound right?
1) Download the tar.gz file.
2) Move the tar.gz file into /etc/motion/ directory, where the motion.conf file is?
3) "cd" into /etc/motion/ directory.
4) run "./configure" and "make"??? This part doesn't seem to work for me.
By the way, I'm running ArchLinux
- 10 Jun 2013
I have also the same problem. Already installed motion in arch linux using pacman (did not download tarball and compile)
How do I get the patch? Don't want to uninstall and compile from scratch..
- 04 Nov 2013
where is the patch file ?? if i use apt-get install motion, how to patch? cause when i make the source it always eroor!
- 21 Feb 2014
It's included in GIT version ,
git clone https://github.com/sackmotion/motion
cd motion ; autoconf ; ./configure ; make
cp motion-dist,conf motion.conf ( edit what you need )
- 28 Feb 2014
i still do not understand. please help. I have a raspberry with raspbian and motion installed. All work very well also web streaming. Please if you can explain step by step for a noob. Thanks a lot.
- 15 Sep 2014
why isn't this patch included in the regular version of motion? What is Motion Snapshot? and is there plans to include this patch in the regular version?
- 14 Oct 2014
i want to use Digest Authentication.
can i make password file by htdigest command of apache2?
where do i should save the password file?
- 08 Jan 2015
way and once ive copied the files from my old config folder to the new one and edited to suite the new version, the web stream didnt work at all. pulled my hair out last night with it
ended up removing and and going back to the version from apt-get install motion
- 21 Jan 2015
Hi, could be used more than just one login to view stream?
I was playing with stream_authentication username:password, but didn't succeed.
- 21 Jan 2015
HI, I have submitted a test patch (against snapshot) for logging Stream Server IP/auth connections, as we can now put stream server directly on a public interface:
- 16 Aug 2015
i have changed the following configurations to achieve authentication
# Username and password for network camera (only if required). Default: not defined
# Syntax is user:password
# The setting for keep-alive of network socket, should improve performance on compatible net cameras.
# 1.0: The historical implementation using HTTP/1.0, closing the socket after each http request.
# keep_alive: Use HTTP/1.0 requests with keep alive header to reuse the same connection.
# 1.1: Use HTTP/1.1 requests that support keep alive as default.
# Default: 1.0
server is not prompting for authentication for the stream. however authentication is working for http based control.
- 25 Nov 2015