Depoyed to ppa as 3.2.12-4ppa01~precise

This commit is contained in:
Mr Dave
2014-09-06 17:22:29 -07:00
parent 9b42f85c04
commit 4579bbb726
18 changed files with 48439 additions and 753 deletions

View File

@@ -1,6 +1,8 @@
SVN trunk Summary of Changes
Features
*
* Revised debian packaging files
* Implement new sequence for this file (CHANGELOG) newest to oldest.
*
* Features
* Insert Blanking frames http://www.lavrsen.dk/twiki/bin/view/Motion/FeatureRequest2007x12x16x132522 (Dag Erlandsson)
* IPV6 for http-control and webcam stream not netcam yet http://www.lavrsen.dk/twiki/bin/view/Motion/IPv6
(Jeroen Massar & Angel Carpintero)
@@ -88,8 +90,9 @@ Features
* Implement requirement of modulo 16 to avoid seg fault when opening stream
* Add debian build files from trusty(14.04)
* Revise default values for motion.conf
* Revise CHANGELOG to conform with debian format
Bugfixes
* Bugfixes
* Avoid segfault detecting strerror_r() version GNU or SUSv3. (Angel Carpintero)
* Fix Segfault on reload or quit for vloopback (maybe other v4l1 devices too) (Peter Holik)
http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2009x06x17x090603

134
debian/changelog vendored
View File

@@ -1,3 +1,137 @@
motion (3.2.12-4ppa01~precise) precise; urgency=low
* Nonmaintainer upload
* Due to conficts, removed patches (Mr Dave)
* Revise motion.postinst to put motion.conf at 0644 instead of 0640(Mr Dave)
* Many many changes from github repos of many many developers since 3.2.12 was released.
*
* Features
* Insert Blanking frames http://www.lavrsen.dk/twiki/bin/view/Motion/FeatureRequest2007x12x16x132522 (Dag Erlandsson)
* IPV6 for http-control and webcam stream not netcam yet http://www.lavrsen.dk/twiki/bin/view/Motion/IPv6
(Jeroen Massar & Angel Carpintero)
* Experimental approach for MJPEG streams (Motion JPEG) for network cameras
http://www.lavrsen.dk/twiki/bin/view/Motion/LinksysWVC200SupportPatch ( ... )
* Add draw a RED box around the movement as default (Joerg Weber)
* Add write/read nonblock functions in webhttpd( timeout on read/write). (Angel Carpintero)
* More changes in option names from http://www.lavrsen.dk/twiki/bin/view/Motion/IntuitiveOptionNamesDiscussion
(Angel Carpintero)
* motion_locate new parameter names : red , center , redcross instead of only on, off. (Angel Carpintero)
* External pipe to allow external video encoders
http://www.lavrsen.dk/twiki/bin/view/Motion/DarkwindHackeronMotionPatching (Bill Payne, Angel Carpintero)
* Split locate_motion into separate 'mode' and 'style' option to allow all
possible combinations. (Joerg Weber)
* Implement 'gapless' event mode to allow for recording of movies without 'holes'. (Joerg Weber)
* Limit detection rate to 3fps at framerates above 5fps, to reduce CPU load. (Joerg Weber)
* Fix warning for syslog() , Added support for some new bayer palettes introduced in kernel 2.6.27.
http://www.lavrsen.dk/twiki/bin/view/Motion/FeatureRequest2008x10x15x130110
Increased buffer in ffmpeg to allow encoding at 1600x1200 (Angel Carpintero)
* Sqlite3 support http://www.lavrsen.dk/twiki/bin/view/Motion/SQLite3Patch (Giacomo Graziosi)
* New RPM SPEC file and startup scripts compliant with Fedora 10 guidelines and above (Steven Moix)
* Increase write buffer size for writing image files and ffmpegs
http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionWriteBuffersPatch (Craig West)
* Fixed mask overlay in setup mode is now green instead of white (Joerg Weber)
* Add new config option 'ipv6_enabled' to enable/disable IPV6 (Angel Carpintero)
* Remove VIDIOC_S_JPEGCOMP support is deprecated. (Angel Carpintero)
* Use static memory allocation in ffmpeg_deinterlace() (Peter Holik)
http://www.lavrsen.dk/foswiki/bin/view/Motion/FfmpegDeinterlaceStatic
* Atom optimizacion in configure.in (Peter Holik)
http://www.lavrsen.dk/foswiki/bin/view/Motion/AtomOptimizations
* Allow to change Standard method ( PAL / NECAM / SECAM ) (Angel Carpintero)
* Add authentication methods 'Basic Authentication' and 'Digest Authentication'
to the "Live Stream Server". (Michael Finsterbusch)
http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionStreamAuthPatch
* Implemented new logging system
http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionLog (Angel Carpintero)
* Added a macro MOTION_LOG , no need to add __FUNCTION__ anymore. (Angel Carpintero)
* Added EXIF feature for jpeg images , http://www.lavrsen.dk/foswiki/bin/view/Motion/ExifTaggingPatch (Wim Lewis)
* Improve detection of av_register_protocol() for ffmpeg (Angel Carpintero).
* Added support for libjpeg-turbo
http://www.lavrsen.dk/foswiki/bin/view/Motion/FeatureRequest2010x04x14x082244 (Angel Carpintero)
* Added new log type COR , to filter messages from CORE. (Angel Carpintero)
* Added a new starting option -m to disable motion detection. (Angel Carpintero)
* Allow image dimension not 4:3 changing a check of modulo 16 by modulo 8. (Jeroen Massar)
* Added codec Ogg/Theora as new output format for regular movies.
http://www.lavrsen.dk/foswiki/bin/view/Motion/OggTimelapse (Michael Luich)
* Added support for ffmpeg 0.11 new API.
* Added RSTP support for netcam ( merge https://github.com/hyperbolic2346/motion )
* Merge tosiara/rtsp branch (commit 46cfcf31d, 2014/05/21) (Mr-Dave)
* 3fps bugfix from SVN rev559 (tosiara, Joerg Weber)
* Buffer overflow vulnerabilities (hyperbolic2346)
* Redundand -- boundary prefix (torao)
* Removed compiler warnings: (Mr-Dave)
logger.c,jpegutils.c,netcam_ftp.c,track.c,
picture.c,webhttpd.c,stream.c,ffmpeg.c
* Bug fix as part of warnings in webhttpd.c fixed(Mr-Dave)
* Removed compiler warning regarding ffmpeg being newer than 0.4 version(Mr-Dave)
* New configure script and identification of ffmpeg version and additional libs. (Mr-Dave)
* Resolve additional compiler warnings in ffmpeg (Mr-Dave)
* Revised INSTALL with samples(Mr-Dave)
* Revisions for RTSP and code standard.(Mr-Dave)
* Plugged most memory leaks in RTSP. (Mr-Dave)
* Undo changes caused by code editor and other unnecessary changes (Mr-Dave)
* Moved call to netcam_shutdown_rtsp into netcam_cleanup where it belongs. (Mr-Dave)
* Regession fix for memory leaks and reconnection (Mr-Dave)
* Eliminated requirement to manually build FFMPEG for RTSP support. (Mr-Dave)
* Revised RTSP to support version 53 of libavformat (Mr-Dave)
* Revised FFMPEG.c to eliminate warnings and functions no longer supported by Libav/FFMPEG(Mr-Dave)
* Revised INSTALL to have sample PI configure option.(Mr-Dave)
* Revised configure.ac to generate compiler flag AVFMT_V53.(Mr-Dave)
* Revised INSTALL to indicate standard APT packages for RTSP (Mr-Dave)
* Revised configure.ac to recognize libavformat version 54 RTSP (Mr-Dave)
* Clean up the messaging for RTSP.
* Additional validations for RTSP connection and corrected free sequences
* Removed seg fault on failure to open first image, comments, isolation of RTSP
* Add AC_GNU_SOURCE macro to check for GNU C Library, fix compile when no FFMpeg.
* Implement inits of AV functions from bcl fork
* Add gray image upon disconnection
* Added tcp/udp transport config option from hyperbolic2346(commit 423ef7bb3)
* Revised comments to be in line with application standard.
* Restructure rtsp to handle rescaling and non YUV420 format, rotate, MJPEG input format
* Revise version.sh to put out the git commit.
* Rollback revision to allow for a formal pull request.
* Reimplement changes not to be included in pull request from tosiara commit 9ebee031
* Implement requirement of modulo 16 to avoid seg fault when opening stream
* Add debian build files from trusty(14.04)
* Revise default values for motion.conf
* Revise CHANGELOG to conform with debian format
* Bugfixes
* Avoid segfault detecting strerror_r() version GNU or SUSv3. (Angel Carpintero)
* Fix Segfault on reload or quit for vloopback (maybe other v4l1 devices too) (Peter Holik)
http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2009x06x17x090603
* Allow compile with NetBSD and make LP64 compliant video_freebsd.c (Andreas Wrede)
* Avoid compile vloopback in BSD (Angel Carpintero)
* V4L2 fourcc GRBG not supported, updated default value for v4l2_palette 17. (Isaac Richter)
http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2009x10x29x222753
* Exit when image dimension are not modulo 16. (Angel Carpintero)
* Avoid logs flooding using some options of netcam_keepalive and try to discard images with
weird header Content-Lenght 0. (Angel Carpintero)
* Only use post capture when we setup to record videos with external pipe or ffmpeg. (Angel Carpintero)
* Fix introduced bug for Content-Lenght = 0 in svn r476. (Angel Carpintero)
* Avoid segfault when motion cannot create a logfile. (Angel Carpintero)
* No mysql_close
http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2010x11x22x033859
* No PQfinish() (Angel Carpintero)
* Input for webcams has to be set to -1
http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2011x01x21x162309
* Added a conditional check for avformat_alloc_context , av_avformat_alloc_context to fix
http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2011x10x05x071936 (Angel Carpintero)
* Fix issue with JPEG , adding dinfo.do_fancy_upsampling = FALSE;
http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2011x08x20x194659
* Made micro-lightswitch optional (see lightwitch option in motion.conf)
* Fixed help text for options event_gap and area_detect
* Fixed motion.conf-dist , adding text according with config options.
* Fixed a bug in post_capture. It was missed under certain conditions.
* Fixed configure for SDL.
* Replace malloc() by calloc(). (Jeroen Massar)
* Free file descriptor buffers on exit.
* Avoid segfault when text_left or text_right uses non supported chars.
* Fixed leak in vloopback.
* Fixed a build of motion for some kernel version with not good videodev.h
* Netcam Modulo 8
-- Mr Dave <motionmrdave@gmail.com> Sat, 06 Sep 2014 14:26:03 -0700
motion (3.2.12-4) unstable; urgency=medium
* New maintainer.

2
debian/control vendored
View File

@@ -3,7 +3,7 @@ Section: graphics
Priority: optional
Maintainer: Ximin Luo <infinity0@pwned.gg>
HomePage: http://motion.sf.net
Build-Depends: debhelper (>= 6), dpkg-dev (>= 1.16), dh-autoreconf, libjpeg-dev, zlib1g-dev, libavcodec-dev, libavformat-dev, libpq-dev, libmysqlclient-dev (>= 5.5.17-4), libv4l-dev
Build-Depends: debhelper (>= 6), dpkg-dev (>= 1.16), dh-autoreconf, libjpeg-dev, zlib1g-dev, libavcodec-dev, libavformat-dev, libpq-dev, libmysqlclient-dev (>= 5.5.17-4), libv4l-dev, libswscale-dev
Standards-Version: 3.9.2
Package: motion

354
debian/motion.conf vendored
View File

@@ -1,6 +1,6 @@
# Rename this distribution example file to motion.conf
#
# This config file was generated by motion 3.2.9
# This config file was generated by motion 3.2.12-4ppa01
############################################################
@@ -11,7 +11,7 @@
daemon off
# File to store the process ID, also called pid file. (default: not defined)
process_id_file /var/run/motion.pid
process_id_file /var/run/motion/motion.pid
############################################################
# Basic Setup Mode
@@ -20,6 +20,16 @@ process_id_file /var/run/motion.pid
# Start in Setup-Mode, daemon disabled. (default: off)
setup_mode off
# Use a file to save logs messages, if not defined stderr and syslog is used. (default: not defined)
;logfile /tmp/motion.log
# Level of log messages [1..9] (EMR, ALR, CRT, ERR, WRN, NTC, INF, DBG, ALL). (default: 6 / NTC)
log_level 6
# Filter to log messages by type (COR, STR, ENC, NET, DBL, EVT, TRK, VID, ALL). (default: ALL)
log_type all
###########################################################
# Capture device options
############################################################
@@ -28,13 +38,42 @@ setup_mode off
# for FreeBSD default is /dev/bktr0
videodevice /dev/video0
# v4l2_palette allows to choose preferable palette to be use by motion
# to capture from those supported by your videodevice. (default: 17)
# E.g. if your videodevice supports both V4L2_PIX_FMT_SBGGR8 and
# V4L2_PIX_FMT_MJPEG then motion will by default use V4L2_PIX_FMT_MJPEG.
# Setting v4l2_palette to 2 forces motion to use V4L2_PIX_FMT_SBGGR8
# instead.
#
# Values :
# V4L2_PIX_FMT_SN9C10X : 0 'S910'
# V4L2_PIX_FMT_SBGGR16 : 1 'BYR2'
# V4L2_PIX_FMT_SBGGR8 : 2 'BA81'
# V4L2_PIX_FMT_SPCA561 : 3 'S561'
# V4L2_PIX_FMT_SGBRG8 : 4 'GBRG'
# V4L2_PIX_FMT_SGRBG8 : 5 'GRBG'
# V4L2_PIX_FMT_PAC207 : 6 'P207'
# V4L2_PIX_FMT_PJPG : 7 'PJPG'
# V4L2_PIX_FMT_MJPEG : 8 'MJPEG'
# V4L2_PIX_FMT_JPEG : 9 'JPEG'
# V4L2_PIX_FMT_RGB24 : 10 'RGB3'
# V4L2_PIX_FMT_SPCA501 : 11 'S501'
# V4L2_PIX_FMT_SPCA505 : 12 'S505'
# V4L2_PIX_FMT_SPCA508 : 13 'S508'
# V4L2_PIX_FMT_UYVY : 14 'UYVY'
# V4L2_PIX_FMT_YUYV : 15 'YUYV'
# V4L2_PIX_FMT_YUV422P : 16 '422P'
# V4L2_PIX_FMT_YUV420 : 17 'YU12'
#
v4l2_palette 17
# Tuner device to be used for capturing using tuner as source (default /dev/tuner0)
# This is ONLY used for FreeBSD. Leave it commented out for Linux
; tunerdevice /dev/tuner0
# The video input to be used (default: 8)
# Should normally be set to 1 for video/TV cards, and 8 for USB cameras
input 8
# The video input to be used (default: -1)
# Should normally be set to 0 or 1 for video/TV cards, and -1 for USB cameras
input -1
# The video norm to use (only for video capture and TV tuner cards)
# Values: 0 (PAL), 1 (NTSC), 2 (SECAM), 3 (PAL NC no colour). Default: 0 (PAL)
@@ -44,7 +83,7 @@ norm 0
frequency 0
# Rotate image this number of degrees. The rotation affects all saved images as
# well as mpeg movies. Valid values: 0 (default = no rotation), 90, 180 and 270.
# well as movies. Valid values: 0 (default = no rotation), 90, 180 and 270.
rotate 0
# Image width (pixels). Valid range: Camera dependent, default: 352
@@ -62,7 +101,7 @@ framerate 2
# This option is used when you want to capture images at a rate lower than 2 per second.
minimum_frame_time 0
# URL to use if you are using a network camera, size will be autodetected (incl http:// ftp:// or file:///)
# URL to use if you are using a network camera, size will be autodetected (incl http:// ftp:// mjpg:// rtsp:// mjpeg:// or file:///)
# Must be a URL that returns single jpeg pictures or a raw mjpeg stream. Default: Not defined
; netcam_url value
@@ -70,10 +109,25 @@ minimum_frame_time 0
# Syntax is user:password
; netcam_userpass value
# The setting for keep-alive of network socket, should improve performance on compatible net cameras.
# off: The historical implementation using HTTP/1.0, closing the socket after each http request.
# force: Use HTTP/1.0 requests with keep alive header to reuse the same connection.
# on: Use HTTP/1.1 requests that support keep alive as default.
# Default: off
netcam_keepalive off
# URL to use for a netcam proxy server, if required, e.g. "http://myproxy".
# If a port number other than 80 is needed, use "http://myproxy:1234".
# Default: not defined
; netcam_proxy value
; netcam_proxy value
# Set less strict jpeg checks for network cameras with a poor/buggy firmware.
# Default: off
netcam_tolerant_check off
# RTSP connection uses TCP to communicate to the camera. Can prevent image corruption.
# Default: on
rtsp_uses_tcp on
# Let motion regulate the brightness of a video device (default: off).
# The auto_brightness feature uses the brightness option as its target value.
@@ -131,15 +185,18 @@ noise_level 32
# Automatically tune the noise threshold (default: on)
noise_tune on
# Enables motion to adjust its detection/noise level for very dark frames
# Don't use this with noise_tune on. (default: off)
night_compensate off
# Despeckle motion image using (e)rode or (d)ilate or (l)abel (Default: not defined)
# Recommended value is EedDl. Any combination (and number of) of E, e, d, and D is valid.
# (l)abeling must only be used once and the 'l' must be the last letter.
# Comment out to disable
despeckle EedDl
despeckle_filter EedDl
# Detect motion in predefined areas (1 - 9). Areas are numbered like that: 1 2 3
# A script (on_area_detected) is started immediately when motion is 4 5 6
# detected in one of the given areas, but only once during an event. 7 8 9
# One or more areas can be specified with this option. Take care: This option
# does NOT restrict detection to these areas! (Default: not defined)
; area_detect value
# PGM file to use as a sensitivity mask.
# Full path name to. (Default: not defined)
@@ -162,28 +219,26 @@ minimum_motion_frames 1
# was detected that will be output at motion detection.
# Recommended range: 0 to 5 (default: 0)
# Do not use large values! Large values will cause Motion to skip video frames and
# cause unsmooth mpegs. To smooth mpegs use larger values of post_capture instead.
# cause unsmooth movies. To smooth movies use larger values of post_capture instead.
pre_capture 0
# Number of frames to capture after motion is no longer detected (default: 0)
post_capture 0
# Gap is the seconds of no motion detection that triggers the end of an event
# Event Gap is the seconds of no motion detection that triggers the end of an event.
# An event is defined as a series of motion images taken within a short timeframe.
# Recommended value is 60 seconds (Default). The value 0 is allowed and disables
# events causing all Motion to be written to one single mpeg file and no pre_capture.
gap 60
# Recommended value is 60 seconds (Default). The value -1 is allowed and disables
# events causing all Motion to be written to one single movie file and no pre_capture.
# If set to 0, motion is running in gapless mode. Movies don't have gaps anymore. An
# event ends right after no more motion is detected and post_capture is over.
event_gap 60
# Maximum length in seconds of an mpeg movie
# When value is exceeded a new mpeg file is created. (Default: 0 = infinite)
max_mpeg_time 0
# Number of frames per second to capture when not detecting
# motion (saves CPU load) (Default: 0 = disabled)
low_cpu 0
# Maximum length in seconds of a movie
# When value is exceeded a new movie file is created. (Default: 0 = infinite)
max_movie_time 0
# Always save images even if there was no motion (default: off)
output_all off
emulate_motion off
############################################################
@@ -191,37 +246,38 @@ output_all off
############################################################
# Output 'normal' pictures when motion is detected (default: on)
# Valid values: on, off, first, best
# Valid values: on, off, first, best, center
# When set to 'first', only the first picture of an event is saved.
# Picture with most motion of an event is saved when set to 'best'.
# Picture with motion nearest center of picture is saved when set to 'center'.
# Can be used as preview shot for the corresponding movie.
output_normal on
output_pictures on
# Output pictures with only the pixels moving object (ghost images) (default: off)
output_motion off
output_debug_pictures off
# The quality (in percent) to be used by the jpeg compression (default: 75)
quality 75
# Output ppm images instead of jpeg (default: off)
ppm off
# Type of output images
# Valid values: jpeg, ppm (default: jpeg)
picture_type jpeg
############################################################
# FFMPEG related options
# Film (mpeg) file output, and deinterlacing of the video input
# Film (movies) file output, and deinterlacing of the video input
# The options movie_filename and timelapse_filename are also used
# by the ffmpeg feature
############################################################
# Use ffmpeg to encode mpeg movies in realtime (default: off)
ffmpeg_cap_new on
# Use ffmpeg to encode movies in realtime (default: off)
ffmpeg_output_movies on
# Use ffmpeg to make movies with only the pixels moving
# object (ghost images) (default: off)
ffmpeg_cap_motion off
ffmpeg_output_debug_movies off
# Use ffmpeg to encode a timelapse movie
# Use ffmpeg to encode a timelapse movie
# Default value 0 = off - else save frame every Nth second
ffmpeg_timelapse 0
@@ -243,19 +299,43 @@ ffmpeg_variable_bitrate 0
# Timelapse mpegs are always made in mpeg1 format independent from this option.
# Supported formats are: mpeg1 (ffmpeg-0.4.8 only), mpeg4 (default), and msmpeg4.
# mpeg1 - gives you files with extension .mpg
# mpeg4 or msmpeg4 - give you files with extension .avi
# mpeg4 or msmpeg4 - gives you files with extension .avi
# msmpeg4 is recommended for use with Windows Media Player because
# it requires no installation of codec on the Windows client.
# swf - gives you a flash film with extension .swf
# flv - gives you a flash video with extension .flv
# ffv1 - FF video codec 1 for Lossless Encoding ( experimental )
ffmpeg_video_codec swf
# mov - QuickTime ( testing )
# ogg - Ogg/Theora ( testing )
ffmpeg_video_codec mpeg4
# Use ffmpeg to deinterlace video. Necessary if you use an analog camera
# and see horizontal combing on moving objects in video or pictures.
# (default: off)
ffmpeg_deinterlace off
############################################################
# SDL Window
############################################################
# Number of motion thread to show in SDL Window (default: 0 = disabled)
#sdl_threadnr 0
############################################################
# External pipe to video encoder
# Replacement for FFMPEG builtin encoder for ffmpeg_output_movies only.
# The options movie_filename and timelapse_filename are also used
# by the ffmpeg feature
#############################################################
# Bool to enable or disable extpipe (default: off)
use_extpipe off
# External program (full path and opts) to pipe raw video to
# Generally, use '-' for STDIN...
;extpipe mencoder -demuxer rawvideo -rawvideo w=320:h=240:i420 -ovc x264 -x264encopts bframes=4:frameref=1:subq=1:scenecut=-1:nob_adapt:threads=1:keyint=1000:8x8dct:vbv_bufsize=4000:crf=24:partitions=i8x8,i4x4:vbv_maxrate=800:no-chroma-me -vf denoise3d=16:12:48:4,pp=lb -of avi -o %f.avi - -fps %fps
############################################################
# Snapshots (Traditional Periodic Webcam File Output)
@@ -279,9 +359,17 @@ snapshot_interval 0
############################################################
# Locate and draw a box around the moving object.
# Valid values: on, off and preview (default: off)
# Valid values: on, off, preview (default: off)
# Set to 'preview' will only draw a box in preview_shot pictures.
locate off
locate_motion_mode off
# Set the look and style of the locate box if enabled.
# Valid values: box, redbox, cross, redcross (default: box)
# Set to 'box' will draw the traditional box.
# Set to 'redbox' will draw a red box.
# Set to 'cross' will draw a little cross to mark center.
# Set to 'redcross' will draw a little red cross to mark center.
locate_motion_style box
# Draws the timestamp using same options as C function strftime(3)
# Default: %Y-%m-%d\n%T = date in ISO format and time in 24 hour clock
@@ -310,9 +398,14 @@ text_event %Y%m%d%H%M%S
text_double off
# Text to include in a JPEG EXIF comment
# May be any text, including conversion specifiers.
# The EXIF timestamp is included independent of this text.
;exif_text %i%J/%K%L
############################################################
# Target Directories and filenames For Images And Films
# For the options snapshot_, jpeg_, mpeg_ and timelapse_filename
# For the options snapshot_, picture_, movie_ and timelapse_filename
# you can use conversion specifiers
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second,
@@ -344,9 +437,9 @@ snapshot_filename %v-%Y%m%d%H%M%S-snapshot
# File extension .jpg or .ppm is automatically added so do not include this
# Set to 'preview' together with best-preview feature enables special naming
# convention for preview shots. See motion guide for details
jpeg_filename %v-%Y%m%d%H%M%S-%q
picture_filename %v-%Y%m%d%H%M%S-%q
# File path for motion triggered ffmpeg films (mpeg) relative to target_dir
# File path for motion triggered ffmpeg films (movies) relative to target_dir
# Default: %v-%Y%m%d%H%M%S
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H%M%S
@@ -354,38 +447,53 @@ jpeg_filename %v-%Y%m%d%H%M%S-%q
# This option was previously called ffmpeg_filename
movie_filename %v-%Y%m%d%H%M%S
# File path for timelapse mpegs relative to target_dir
# File path for timelapse movies relative to target_dir
# Default: %Y%m%d-timelapse
# Default value is near equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d-timelapse
# File extension .mpg is automatically added so do not include this
timelapse_filename %Y%m%d-timelapse
############################################################
# Global Network Options
############################################################
# Enable or disable IPV6 for http control and stream (default: off )
ipv6_enabled off
############################################################
# Live Webcam Server
# Live Stream Server
############################################################
# The mini-http server listens to this port for requests (default: 0 = disabled)
webcam_port 8081
stream_port 8081
# Quality of the jpeg images produced (default: 50)
webcam_quality 50
# Quality of the jpeg (in percent) images produced (default: 50)
stream_quality 50
# Output frames at 1 fps when no motion is detected and increase to the
# rate given by webcam_maxrate when motion is detected (default: off)
webcam_motion off
# rate given by stream_maxrate when motion is detected (default: off)
stream_motion off
# Maximum framerate for webcam streams (default: 1)
webcam_maxrate 1
# Maximum framerate for stream streams (default: 1)
stream_maxrate 1
# Restrict webcam connections to localhost only (default: on)
webcam_localhost on
# Restrict stream connections to localhost only (default: on)
stream_localhost on
# Limits the number of images per connection (default: 0 = unlimited)
# Number can be defined by multiplying actual webcam rate by desired number of seconds
# Actual webcam rate is the smallest of the numbers framerate and webcam_maxrate
webcam_limit 0
# Number can be defined by multiplying actual stream rate by desired number of seconds
# Actual stream rate is the smallest of the numbers framerate and stream_maxrate
stream_limit 0
# Set the authentication method (default: 0)
# 0 = disabled
# 1 = Basic authentication
# 2 = MD5 digest (the safer authentication)
stream_auth_method 0
# Authentication for the stream. Syntax username:password
# Default: not defined (Disabled)
; stream_authentication username:password
############################################################
@@ -393,24 +501,24 @@ webcam_limit 0
############################################################
# TCP/IP port for the http server to listen on (default: 0 = disabled)
control_port 8080
webcontrol_port 8080
# Restrict control connections to localhost only (default: on)
control_localhost on
webcontrol_localhost on
# Output for http server, select off to choose raw text plain (default: on)
control_html_output on
webcontrol_html_output on
# Authentication for the http based control. Syntax username:password
# Default: not defined (Disabled)
; control_authentication username:password
; webcontrol_authentication username:password
############################################################
# Tracking (Pan/Tilt)
############################################################
#############################################################
# Type of tracker (0=none (default), 1=stepper, 2=iomojo, 3=pwc, 4=generic, 5=uvcvideo)
# Type of tracker (0=none (default), 1=stepper, 2=iomojo, 3=pwc, 4=generic, 5=uvcvideo, 6=servo)
# The generic type enables the definition of motion center and motion size to
# be used with the conversion specifiers for options like on_motion_detected
track_type 0
@@ -419,19 +527,37 @@ track_type 0
track_auto off
# Serial port of motor (default: none)
; track_port value
;track_port /dev/ttyS0
# Motor number for x-axis (default: -1)
track_motorx -1
# Motor number for x-axis (default: 0)
;track_motorx 0
# Motor number for y-axis (default: -1)
track_motory -1
# Set motorx reverse (default: 0)
;track_motorx_reverse 0
# Motor number for y-axis (default: 0)
;track_motory 1
# Set motory reverse (default: 0)
;track_motory_reverse 0
# Maximum value on x-axis (default: 0)
track_maxx 0
;track_maxx 200
# Minimum value on x-axis (default: 0)
;track_minx 50
# Maximum value on y-axis (default: 0)
track_maxy 0
;track_maxy 200
# Minimum value on y-axis (default: 0)
;track_miny 50
# Center value on x-axis (default: 0)
;track_homex 128
# Center value on y-axis (default: 0)
;track_homey 128
# ID of an iomojo camera if used (default: 0)
track_iomojo_id 0
@@ -479,11 +605,11 @@ track_stepsize 40
quiet on
# Command to be executed when an event starts. (default: none)
# An event starts at first motion detected after a period of no motion defined by gap
# An event starts at first motion detected after a period of no motion defined by event_gap
; on_event_start value
# Command to be executed when an event ends after a period of no motion
# (default: none). The period of no motion is defined by option gap.
# (default: none). The period of no motion is defined by option event_gap.
; on_event_end value
# Command to be executed when a picture (.ppm|.jpg) is saved (default: none)
@@ -493,6 +619,10 @@ quiet on
# Command to be executed when a motion frame is detected (default: none)
; on_motion_detected value
# Command to be executed when motion in a predefined area is detected
# Check option 'area_detect'. (default: none)
; on_area_detected value
# Command to be executed when a movie file (.mpg|.avi) is created. (default: none)
# To give the filename as an argument to a command append it with %f
; on_movie_start value
@@ -501,23 +631,28 @@ quiet on
# To give the filename as an argument to a command append it with %f
; on_movie_end value
# Command to be executed when a camera can't be opened or if it is lost
# NOTE: There is situations when motion don't detect a lost camera!
# It depends on the driver, some drivers dosn't detect a lost camera at all
# Some hangs the motion thread. Some even hangs the PC! (default: none)
; on_camera_lost value
############################################################
# Common Options For MySQL and PostgreSQL database features.
# Options require the MySQL/PostgreSQL options to be active also.
############################################################
#####################################################################
# Common Options for database features.
# Options require database options to be active also.
#####################################################################
# Log to the database when creating motion triggered image file (default: on)
sql_log_image on
# Log to the database when creating motion triggered picture file (default: on)
; sql_log_picture on
# Log to the database when creating a snapshot image file (default: on)
sql_log_snapshot on
; sql_log_snapshot on
# Log to the database when creating motion triggered mpeg file (default: off)
sql_log_mpeg off
# Log to the database when creating motion triggered movie file (default: off)
; sql_log_movie off
# Log to the database when creating timelapse mpeg file (default: off)
sql_log_timelapse off
# Log to the database when creating timelapse movies file (default: off)
; sql_log_timelapse off
# SQL query string that is sent to the database
# Use same conversion specifiers has for text features
@@ -525,45 +660,48 @@ sql_log_timelapse off
# %n = the number representing the file_type
# %f = filename with full path
# Default value:
# Create tables :
##
# Mysql
# CREATE TABLE security (camera int, filename char(80) not null, frame int, file_type int, time_stamp timestamp(14), event_time_stamp timestamp(14));
#
# Postgresql
# CREATE TABLE security (camera int, filename char(80) not null, frame int, file_type int, time_stamp timestamp without time zone, event_time_stamp timestamp without time zone);
#
# insert into security(camera, filename, frame, file_type, time_stamp, text_event) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')
sql_query insert into security(camera, filename, frame, file_type, time_stamp, event_time_stamp) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')
; sql_query insert into security(camera, filename, frame, file_type, time_stamp, event_time_stamp) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')
############################################################
# Database Options For MySQL
# Database Options
############################################################
# Mysql database to log to (default: not defined)
; mysql_db value
# database type : mysql, postgresql, sqlite3 (default : not defined)
; database_type value
# database to log to (default: not defined)
; database_dbname value
# The host on which the database is located (default: localhost)
; mysql_host value
; database_host value
# User account name for MySQL database (default: not defined)
; mysql_user value
# User account name for database (default: not defined)
; database_user value
# User password for MySQL database (default: not defined)
; mysql_password value
# User password for database (default: not defined)
; database_password value
# Port on which the database is located
# mysql 3306 , postgresql 5432 (default: not defined)
; database_port value
############################################################
# Database Options For PostgreSQL
# Database Options For SQLite3
############################################################
# PostgreSQL database to log to (default: not defined)
; pgsql_db value
# SQLite3 database (file path) (default: not defined)
; sqlite3_db value
# The host on which the database is located (default: localhost)
; pgsql_host value
# User account name for PostgreSQL database (default: not defined)
; pgsql_user value
# User password for PostgreSQL database (default: not defined)
; pgsql_password value
# Port on which the PostgreSQL database is located (default: 5432)
; pgsql_port 5432
############################################################
@@ -590,7 +728,7 @@ sql_query insert into security(camera, filename, frame, file_type, time_stamp, e
# thread file for each camera. E.g. 2 cameras requires 3 files:
# This motion.conf file AND thread1.conf and thread2.conf.
# Only put the options that are unique to each camera in the
# thread config files.
# thread config files.
; thread /usr/local/etc/thread1.conf
; thread /usr/local/etc/thread2.conf
; thread /usr/local/etc/thread3.conf

View File

@@ -31,7 +31,7 @@ add_group_if_missing
add_user_if_missing
# Fix motion.conf permission
chmod 0640 /etc/motion/motion.conf
chmod 0644 /etc/motion/motion.conf
chgrp motion /etc/motion/motion.conf

View File

@@ -40,7 +40,7 @@ add_user_if_missing
create_pid_dir
# Fix motion.conf permission
chmod 0640 /etc/motion/motion.conf
chmod 0644 /etc/motion/motion.conf
chgrp motion /etc/motion/motion.conf

View File

@@ -1,27 +0,0 @@
Index: motion-3.2.12/video.h
===================================================================
--- motion-3.2.12.orig/video.h 2011-08-23 15:42:35.564656448 -0430
+++ motion-3.2.12/video.h 2011-08-23 15:43:10.860657024 -0430
@@ -12,7 +12,7 @@
#define _LINUX_TIME_H 1
#ifndef WITHOUT_V4L
-#include <linux/videodev.h>
+#include <libv4l1-videodev.h>
#include <sys/mman.h>
#include "pwc-ioctl.h"
#endif
Index: motion-3.2.12/motion.h
===================================================================
--- motion-3.2.12.orig/motion.h 2011-08-23 15:44:46.108655912 -0430
+++ motion-3.2.12/motion.h 2011-08-23 15:45:21.240655678 -0430
@@ -40,7 +40,8 @@
#define _LINUX_TIME_H 1
#if !defined(WITHOUT_V4L) && !defined(BSD)
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
+#include <libv4l1-videodev.h>
#endif
#include <pthread.h>

View File

@@ -1,95 +0,0 @@
Description: Fix FFmpeg guess_format() deprecation warning
Author: Angel Carpintero <motiondevelop@gmail.com>
Origin: Upstream, https://github.com/sackmotion/motion/commit/527377#svn517
Last-Update: 2012-02-12
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -36,6 +36,11 @@
# endif /* __GNUC__ */
#endif /* LIBAVCODEC_BUILD > 4680 */
+#if defined LIBAVFORMAT_VERSION_MAJOR && defined LIBAVFORMAT_VERSION_MINOR
+#if LIBAVFORMAT_VERSION_MAJOR < 53 && LIBAVFORMAT_VERSION_MINOR < 45
+ #define GUESS_NO_DEPRECATED
+#endif
+#endif
#if LIBAVFORMAT_BUILD >= 4616
/* The API for av_write_frame changed with FFmpeg version 0.4.9pre1.
@@ -258,7 +263,11 @@
/* We use "mpeg1video" for raw mpeg1 format. Using "mpeg" would
* result in a muxed output file, which isn't appropriate here.
*/
- of = guess_format("mpeg1video", NULL, NULL);
+#ifdef GUESS_NO_DEPRECATED
+ of = guess_format("mpeg1video", NULL, NULL);
+#else
+ of = av_guess_format("mpeg1video", NULL, NULL);
+#endif
if (of) {
/* But we want the trailer to be correctly written. */
of->write_trailer = mpeg1_write_trailer;
@@ -270,24 +279,44 @@
#endif
} else if (strcmp(codec, "mpeg4") == 0) {
ext = ".avi";
- of = guess_format("avi", NULL, NULL);
+#ifdef GUESS_NO_DEPRECATED
+ of = guess_format("mpeg1video", NULL, NULL);
+#else
+ of = av_guess_format("avi", NULL, NULL);
+#endif
} else if (strcmp(codec, "msmpeg4") == 0) {
ext = ".avi";
- of = guess_format("avi", NULL, NULL);
+#ifdef GUESS_NO_DEPRECATED
+ of = guess_format("mpeg1video", NULL, NULL);
+#else
+ of = av_guess_format("avi", NULL, NULL);
+#endif
if (of) {
/* Manually override the codec id. */
of->video_codec = CODEC_ID_MSMPEG4V2;
}
} else if (strcmp(codec, "swf") == 0) {
ext = ".swf";
- of = guess_format("swf", NULL, NULL);
+#ifdef GUESS_NO_DEPRECATED
+ of = guess_format("mpeg1video", NULL, NULL);
+#else
+ of = av_guess_format("swf", NULL, NULL);
+#endif
} else if (strcmp(codec, "flv") == 0) {
ext = ".flv";
- of = guess_format("flv", NULL, NULL);
+#ifdef GUESS_NO_DEPRECATED
+ of = guess_format("mpeg1video", NULL, NULL);
+#else
+ of = av_guess_format("flv", NULL, NULL);
+#endif
of->video_codec = CODEC_ID_FLV1;
} else if (strcmp(codec, "ffv1") == 0) {
ext = ".avi";
- of = guess_format("avi", NULL, NULL);
+#ifdef GUESS_NO_DEPRECATED
+ of = guess_format("mpeg1video", NULL, NULL);
+#else
+ of = av_guess_format("avi", NULL, NULL);
+#endif
if (of) {
/* Use the FFMPEG Lossless Video codec (experimental!).
Requires strict_std_compliance to be <= -2 */
@@ -295,7 +324,11 @@
}
} else if (strcmp(codec, "mov") == 0) {
ext = ".mov";
- of = guess_format("mov", NULL, NULL);
+#ifdef GUESS_NO_DEPRECATED
+ of = guess_format("mpeg1video", NULL, NULL);
+#else
+ of = av_guess_format("mov", NULL, NULL);
+#endif
} else {
motion_log(LOG_ERR, 0, "ffmpeg_video_codec option value %s is not supported", codec);
return NULL;

View File

@@ -1,141 +0,0 @@
Description: Improve detection of av_register_protocol() for ffmpeg.
Author: Angel Carpintero <motiondevelop@gmail.com>
Origin: Upstream, https://github.com/sackmotion/motion/commit/7aec4b#svn538
Last-Update: 2012-02-12
--- a/configure.in
+++ b/configure.in
@@ -316,7 +316,7 @@
#
else if test "${FFMPEG_DIR}" = "yes"; then
# AUTODETECT STATIC/SHARED LIB
- AC_MSG_CHECKING(for ffmpeg autodetecting)
+ AC_MSG_CHECKING(for ffmpeg autodetecting libraries)
if test -f /usr/lib64/libavcodec.a -o -f /usr/lib64/libavcodec.so && test -f /usr/lib64/libavformat.a -o -f /usr/lib64/libavformat.so ; then
AC_MSG_RESULT(found in /usr/lib64)
@@ -347,7 +347,7 @@
echo ""
fi
else
- AC_MSG_CHECKING(for ffmpeg in -> [${FFMPEG_DIR}] <-)
+ AC_MSG_CHECKING(for ffmpeg libraries in -> [${FFMPEG_DIR}] <-)
if test -f ${FFMPEG_DIR}/lib/libavcodec.a -o -f ${FFMPEG_DIR}/lib/libavcodec.so && test -f ${FFMPEG_DIR}/lib/libavformat.a -o -f ${FFMPEG_DIR}/lib/libavformat.so ; then
AC_MSG_RESULT(found)
FFMPEG_OK="found"
@@ -392,9 +392,11 @@
elif test -f ${FFMPEG_DIR}/include/libavformat/avformat.h; then
AC_MSG_RESULT(found ${FFMPEG_DIR}/include/libavformat/avformat.h)
FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include -DFFMPEG_NEW_INCLUDES"
+ AVFORMAT="-I${FFMPEG_DIR}/include/libavformat"
elif test -f ${FFMPEG_DIR}/include/ffmpeg/libavformat/avformat.h; then
AC_MSG_RESULT(found ${FFMPEG_DIR}/include/ffmpeg/libavformat/avformat.h)
FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include/ffmpeg -DFFMPEG_NEW_INCLUDES"
+ AVFORMAT="-I${FFMPEG_DIR}/include/ffmpeg/libavformat"
else
AC_MSG_RESULT(not found)
FFMPEG_OK="no_found"
@@ -423,9 +425,11 @@
AC_MSG_CHECKING([file_protocol is defined in ffmpeg ?])
saved_CFLAGS=$CFLAGS
saved_LIBS=$LIBS
- CFLAGS="${FFMPEG_CFLAGS}"
+
+
+ CFLAGS="${FFMPEG_CFLAGS} ${AVFORMAT}"
LIBS="$TEMP_LIBS"
-
+
AC_COMPILE_IFELSE(
[
#include <avformat.h>
@@ -442,7 +446,35 @@
]
)
CFLAGS=$saved_CFLAGS
- LIBS=$saved_LIBS
+ LIBS=$saved_LIBS
+
+ AC_MSG_CHECKING([av_register_protocol is defined in ffmpeg ?])
+ saved_CFLAGS=$CFLAGS
+ saved_LIBS=$LIBS
+ CFLAGS="${FFMPEG_CFLAGS} ${AVFORMAT}"
+ LIBS="$TEMP_LIBS"
+
+ AC_COMPILE_IFELSE(
+ [
+ #include <avformat.h>
+ URLProtocol test_file_protocol;
+ int main(void){
+ av_register_protocol(&test_file_protocol);
+ return 0;
+ }
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ TEMP_CFLAGS="${TEMP_CFLAGS} -DHAVE_FFMPEG_AV_REGISTER_PROTOCOL"
+ ],
+ [
+ AC_MSG_RESULT(no)
+ ]
+ )
+
+ CFLAGS=$saved_CFLAGS
+ LIBS=$saved_LIBS
+
fi
fi
fi
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -232,11 +232,11 @@
mpeg1_file_protocol.url_seek = file_protocol.url_seek;
mpeg1_file_protocol.url_close = file_protocol.url_close;
- /* Register the append file protocol. */
-#if LIBAVFORMAT_BUILD >= (52<<16 | 31<<8)
+/* Register the append file protocol. */
+#ifdef HAVE_FFMPEG_AV_REGISTER_PROTOCOL
av_register_protocol(&mpeg1_file_protocol);
#else
- register_protocol(&mpeg1_file_protocol);
+ av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol));
#endif
}
@@ -410,7 +410,11 @@
ffmpeg->c = c = AVSTREAM_CODEC_PTR(ffmpeg->video_st);
c->codec_id = ffmpeg->oc->oformat->video_codec;
+#if LIBAVCODEC_VERSION_MAJOR < 53
c->codec_type = CODEC_TYPE_VIDEO;
+#else
+ c->codec_type = AVMEDIA_TYPE_VIDEO;
+#endif
is_mpeg1 = c->codec_id == CODEC_ID_MPEG1VIDEO;
if (strcmp(ffmpeg_video_codec, "ffv1") == 0)
@@ -679,7 +683,11 @@
if (ffmpeg->oc->oformat->flags & AVFMT_RAWPICTURE) {
/* raw video case. The API will change slightly in the near future for that */
#ifdef FFMPEG_AVWRITEFRAME_NEWAPI
+#if LIBAVCODEC_VERSION_MAJOR < 53
pkt.flags |= PKT_FLAG_KEY;
+#else
+ pkt.flags |= AV_PKT_FLAG_KEY;
+#endif
pkt.data = (uint8_t *)pic;
pkt.size = sizeof(AVPicture);
ret = av_write_frame(ffmpeg->oc, &pkt);
@@ -700,7 +708,11 @@
#ifdef FFMPEG_AVWRITEFRAME_NEWAPI
pkt.pts = AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->pts;
if (AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->key_frame) {
+#if LIBAVCODEC_VERSION_MAJOR < 53
pkt.flags |= PKT_FLAG_KEY;
+#else
+ pkt.flags |= AV_PKT_FLAG_KEY;
+#endif
}
pkt.data = ffmpeg->video_outbuf;
pkt.size = out_size;

View File

@@ -1,35 +0,0 @@
Description: Fix avoid crash producing MPEG4 with newer FFmpeg.
Author: Angel Carpintero <motiondevelop@gmail.com>
Origin: Upstream, https://github.com/sackmotion/motion/commit/734155#svn539
Bug: http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2011x10x05x071936
Last-Update: 2012-02-12
--- a/configure.in
+++ b/configure.in
@@ -1099,6 +1099,10 @@
LIBS="${TEMP_LIBS}"
LDFLAGS="${TEMP_LDFLAGS}"
+
+AC_CHECK_FUNC(avformat_alloc_context, AC_DEFINE([have_avformat_alloc_context],1,[Define to 1 if you have avformat_alloc_context support]))
+AC_CHECK_FUNC(av_avformat_alloc_context, AC_DEFINE([have_av_avformat_alloc_context],1,[Define to 1 if you have av_avformat_alloc_context support]))
+
#
# Add the right exec path for rc scripts
#
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -373,7 +373,13 @@
snprintf(ffmpeg->codec, sizeof(ffmpeg->codec), "%s", ffmpeg_video_codec);
/* allocation the output media context */
+#ifdef have_avformat_alloc_context
+ ffmpeg->oc = avformat_alloc_context();
+#elif defined have_av_avformat_alloc_context
+ ffmpeg->oc = av_alloc_format_context();
+#else
ffmpeg->oc = av_mallocz(sizeof(AVFormatContext));
+#endif
if (!ffmpeg->oc) {
motion_log(LOG_ERR, 1, "Memory error while allocating output media context");

View File

@@ -1,68 +0,0 @@
Description: Improve av_register_protocol2()/av_register_protocol() detection
Author: Angel Carpintero <motiondevelop@gmail.com>
Origin: Upstream, https://github.com/sackmotion/motion/commit/5dd9ed#svn540#svn540
Last-Update: 2012-02-12
--- a/configure.in
+++ b/configure.in
@@ -448,33 +448,6 @@
CFLAGS=$saved_CFLAGS
LIBS=$saved_LIBS
- AC_MSG_CHECKING([av_register_protocol is defined in ffmpeg ?])
- saved_CFLAGS=$CFLAGS
- saved_LIBS=$LIBS
- CFLAGS="${FFMPEG_CFLAGS} ${AVFORMAT}"
- LIBS="$TEMP_LIBS"
-
- AC_COMPILE_IFELSE(
- [
- #include <avformat.h>
- URLProtocol test_file_protocol;
- int main(void){
- av_register_protocol(&test_file_protocol);
- return 0;
- }
- ],
- [
- AC_MSG_RESULT(yes)
- TEMP_CFLAGS="${TEMP_CFLAGS} -DHAVE_FFMPEG_AV_REGISTER_PROTOCOL"
- ],
- [
- AC_MSG_RESULT(no)
- ]
- )
-
- CFLAGS=$saved_CFLAGS
- LIBS=$saved_LIBS
-
fi
fi
fi
@@ -1102,6 +1075,9 @@
AC_CHECK_FUNC(avformat_alloc_context, AC_DEFINE([have_avformat_alloc_context],1,[Define to 1 if you have avformat_alloc_context support]))
AC_CHECK_FUNC(av_avformat_alloc_context, AC_DEFINE([have_av_avformat_alloc_context],1,[Define to 1 if you have av_avformat_alloc_context support]))
+AC_CHECK_FUNC(av_register_protocol2, AC_DEFINE([have_av_register_protocol2],1,[Define to 1 if you have av_register_protocol2 support]))
+AC_CHECK_FUNC(av_register_protocol, AC_DEFINE([have_av_register_protocol],1,[Define to 1 if you have av_register_protocol support]))
+
#
# Add the right exec path for rc scripts
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -233,10 +233,12 @@
mpeg1_file_protocol.url_close = file_protocol.url_close;
/* Register the append file protocol. */
-#ifdef HAVE_FFMPEG_AV_REGISTER_PROTOCOL
+#ifdef have_av_register_protocol2
+ av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol));
+#elif defined have_av_register_protocol
av_register_protocol(&mpeg1_file_protocol);
#else
- av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol));
+# warning av_register_protocolXXX missing
#endif
}

View File

View File

@@ -1,20 +0,0 @@
Description: Autodetect multiarch libavcodec path in autoconf.
Author: Stephen Kitt <steve@sk2.org>
Last-Update: 2012-02-12
--- a/configure.in
+++ b/configure.in
@@ -318,7 +318,12 @@
# AUTODETECT STATIC/SHARED LIB
AC_MSG_CHECKING(for ffmpeg autodetecting libraries)
- if test -f /usr/lib64/libavcodec.a -o -f /usr/lib64/libavcodec.so && test -f /usr/lib64/libavformat.a -o -f /usr/lib64/libavformat.so ; then
+ if test -f /usr/lib/$(dpkg-architecture -qDEB_BUILD_MULTIARCH)/libavcodec.so ; then
+ AC_MSG_RESULT(found in /usr/lib/$(dpkg-architecture -qDEB_BUILD_MULTIARCH))
+ FFMPEG_OK="found"
+ FFMPEG_LIB="/usr/lib/$(dpkg-architecture -qDEB_BUILD_MULTIARCH)"
+ FFMPEG_DIR="/usr"
+ elif test -f /usr/lib64/libavcodec.a -o -f /usr/lib64/libavcodec.so && test -f /usr/lib64/libavformat.a -o -f /usr/lib64/libavformat.so ; then
AC_MSG_RESULT(found in /usr/lib64)
FFMPEG_OK="found"
FFMPEG_LIB="/usr/lib64"

View File

@@ -1,76 +0,0 @@
Description: Copy old API items we still depend on
As per doc/APIchanges in libav/ffmpeg, URLContext/URLProtocol were dropped
from the public API of libavformat since 52.107.0. Pending a better solution
from motion upstream, we copy the definitions here.
Author: Ximin Luo <infinity0@pwned.gg>
Bug: https://github.com/sackmotion/motion/issues/15
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -15,6 +15,66 @@
#include "ffmpeg.h"
#include "motion.h"
+#if LIBAVFORMAT_BUILD >= AV_VERSION_INT(52,107,0)
+/*
+ * URLContext, URLProtocol have been removed from avio.h
+ *
+ */
+
+typedef struct URLContext {
+ const AVClass *av_class; /**< information for av_log(). Set by url_open(). */
+ struct URLProtocol *prot;
+ void *priv_data;
+ char *filename; /**< specified URL */
+ int flags;
+ int max_packet_size; /**< if non zero, the stream is packetized with this max packet size */
+ int is_streamed; /**< true if streamed (no seek possible), default = false */
+ int is_connected;
+ AVIOInterruptCB interrupt_callback;
+ int64_t rw_timeout; /**< maximum time to wait for (network) read/write operation completion, in mcs */
+} URLContext;
+
+typedef struct URLProtocol {
+ const char *name;
+ int (*url_open)( URLContext *h, const char *url, int flags);
+ /**
+ * This callback is to be used by protocols which open further nested
+ * protocols. options are then to be passed to ffurl_open()/ffurl_connect()
+ * for those nested protocols.
+ */
+ int (*url_open2)(URLContext *h, const char *url, int flags, AVDictionary **options);
+
+ /**
+ * Read data from the protocol.
+ * If data is immediately available (even less than size), EOF is
+ * reached or an error occurs (including EINTR), return immediately.
+ * Otherwise:
+ * In non-blocking mode, return AVERROR(EAGAIN) immediately.
+ * In blocking mode, wait for data/EOF/error with a short timeout (0.1s),
+ * and return AVERROR(EAGAIN) on timeout.
+ * Checking interrupt_callback, looping on EINTR and EAGAIN and until
+ * enough data has been read is left to the calling function; see
+ * retry_transfer_wrapper in avio.c.
+ */
+ int (*url_read)( URLContext *h, unsigned char *buf, int size);
+ int (*url_write)(URLContext *h, const unsigned char *buf, int size);
+ int64_t (*url_seek)( URLContext *h, int64_t pos, int whence);
+ int (*url_close)(URLContext *h);
+ struct URLProtocol *next;
+ int (*url_read_pause)(URLContext *h, int pause);
+ int64_t (*url_read_seek)(URLContext *h, int stream_index,
+ int64_t timestamp, int flags);
+ int (*url_get_file_handle)(URLContext *h);
+ int (*url_get_multi_file_handle)(URLContext *h, int **handles,
+ int *numhandles);
+ int (*url_shutdown)(URLContext *h, int flags);
+ int priv_data_size;
+ const AVClass *priv_data_class;
+ int flags;
+ int (*url_check)(URLContext *h, int mask);
+} URLProtocol;
+#endif
+
#if LIBAVCODEC_BUILD > 4680
/* FFmpeg after build 4680 doesn't have support for mpeg1 videos with
* non-standard framerates. Previous builds contained a broken hack

48045
debian/patches/github-changes vendored Normal file
View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1 @@
020101107~5273773.patch
020111022~58627b0.patch
020111022~734155f.patch
020111027~5dd9ed4.patch
01_videodev.h.diff
02_libav_multiarch.patch
use-new-api.patch
copy-old-api.patch
github-changes

View File

@@ -1,165 +0,0 @@
Description: Fix build for newer ffmpeg/libav API
Upgrade to the newer ffmpeg/libav API in current unstable Debian/DMO. This is
a cut-down version of https://github.com/sackmotion/motion/commit/0fb31d#diff-3
which is a more proper fix (it detects versions correctly) but it does not
apply to the orig tarball in Debian.
Author: Ximin Luo <infinity0@pwned.gg>
Forwarded: not-needed
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -89,9 +89,9 @@
filename = colon + 1;
- if (flags & URL_RDWR) {
+ if (flags & AVIO_FLAG_READ_WRITE) {
access_flags = O_CREAT | O_APPEND | O_RDWR;
- } else if (flags & URL_WRONLY) {
+ } else if (flags & AVIO_FLAG_WRITE) {
access_flags = O_CREAT | O_APPEND | O_WRONLY;
} else {
access_flags = O_RDONLY;
@@ -106,10 +106,10 @@
}
/* URLProtocol entry for the append file protocol, which we use for mpeg1 videos
- * in order to get append behavior with url_fopen.
+ * in order to get append behavior with avio_open.
*
* Libavformat uses protocols for achieving flexibility when handling files
- * and other resources. A call to url_fopen will eventually be redirected to
+ * and other resources. A call to avio_open will eventually be redirected to
* a protocol-specific open function.
*
* The remaining functions (for writing, seeking etc.) are set in ffmpeg_init.
@@ -139,9 +139,9 @@
av_strstart(filename, "file:", &filename);
- if (flags & URL_RDWR) {
+ if (flags & AVIO_FLAG_READ_WRITE) {
access_flags = O_CREAT | O_TRUNC | O_RDWR;
- } else if (flags & URL_WRONLY) {
+ } else if (flags & AVIO_FLAG_WRITE) {
access_flags = O_CREAT | O_TRUNC | O_WRONLY;
} else {
access_flags = O_RDONLY;
@@ -204,11 +204,11 @@
static int mpeg1_write_trailer(AVFormatContext *s)
{
#if LIBAVFORMAT_BUILD >= (52<<16)
- put_buffer(s->pb, mpeg1_trailer, 4);
- put_flush_packet(s->pb);
+ avio_write(s->pb, mpeg1_trailer, 4);
+ avio_flush(s->pb);
#else
- put_buffer(&s->pb, mpeg1_trailer, 4);
- put_flush_packet(&s->pb);
+ avio_write(&s->pb, mpeg1_trailer, 4);
+ avio_flush(&s->pb);
#endif /* LIBAVFORMAT_BUILD >= (52<<16) */
return 0; /* success */
@@ -403,9 +403,9 @@
ffmpeg->video_st = NULL;
if (ffmpeg->oc->oformat->video_codec != CODEC_ID_NONE) {
- ffmpeg->video_st = av_new_stream(ffmpeg->oc, 0);
+ ffmpeg->video_st = avformat_new_stream(ffmpeg->oc, 0);
if (!ffmpeg->video_st) {
- motion_log(LOG_ERR, 1, "av_new_stream - could not alloc stream");
+ motion_log(LOG_ERR, 1, "avformat_new_stream - could not alloc stream");
ffmpeg_cleanups(ffmpeg);
return NULL;
}
@@ -461,13 +461,6 @@
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
}
- /* set the output parameters (must be done even if no parameters). */
- if (av_set_parameters(ffmpeg->oc, NULL) < 0) {
- motion_log(LOG_ERR, 0, "ffmpeg av_set_parameters error: Invalid output format parameters");
- ffmpeg_cleanups(ffmpeg);
- return NULL;
- }
-
/* Dump the format settings. This shows how the various streams relate to each other */
//dump_format(ffmpeg->oc, 0, filename, 1);
@@ -488,7 +481,7 @@
pthread_mutex_lock(&global_lock);
/* open the codec */
- if (avcodec_open(c, codec) < 0) {
+ if (avcodec_open2(c, codec, NULL) < 0) {
/* Release the lock. */
pthread_mutex_unlock(&global_lock);
motion_log(LOG_ERR, 1, "avcodec_open - could not open codec");
@@ -535,7 +528,7 @@
char file_proto[256];
/* Use append file protocol for mpeg1, to get the append behavior from
- * url_fopen, but no protocol (=> default) for other codecs.
+ * avio_open, but no protocol (=> default) for other codecs.
*/
if (is_mpeg1)
snprintf(file_proto, sizeof(file_proto), APPEND_PROTO ":%s", filename);
@@ -543,7 +536,7 @@
snprintf(file_proto, sizeof(file_proto), "%s", filename);
- if (url_fopen(&ffmpeg->oc->pb, file_proto, URL_WRONLY) < 0) {
+ if (avio_open(&ffmpeg->oc->pb, file_proto, AVIO_FLAG_WRITE) < 0) {
/* path did not exist? */
if (errno == ENOENT) {
/* create path for file (don't use file_proto)... */
@@ -553,15 +546,15 @@
}
/* and retry opening the file (use file_proto) */
- if (url_fopen(&ffmpeg->oc->pb, file_proto, URL_WRONLY) < 0) {
- motion_log(LOG_ERR, 1, "url_fopen - error opening file %s",filename);
+ if (avio_open(&ffmpeg->oc->pb, file_proto, AVIO_FLAG_WRITE) < 0) {
+ motion_log(LOG_ERR, 1, "avio_open - error opening file %s",filename);
ffmpeg_cleanups(ffmpeg);
return NULL;
}
/* Permission denied */
} else if (errno == EACCES) {
motion_log(LOG_ERR, 1,
- "url_fopen - error opening file %s"
+ "avio_open - error opening file %s"
" ... check access rights to target directory", filename);
ffmpeg_cleanups(ffmpeg);
return NULL;
@@ -574,7 +567,7 @@
}
/* write the stream header, if any */
- av_write_header(ffmpeg->oc);
+ avformat_write_header(ffmpeg->oc, NULL);
return ffmpeg;
}
@@ -605,7 +598,7 @@
/*
if (!(ffmpeg->oc->oformat->flags & AVFMT_NOFILE)) {
// close the output file
- if (ffmpeg->oc->pb) url_fclose(&ffmpeg->oc->pb);
+ if (ffmpeg->oc->pb) avio_close(&ffmpeg->oc->pb);
}
*/
/* free the stream */
@@ -641,9 +634,9 @@
if (!(ffmpeg->oc->oformat->flags & AVFMT_NOFILE)) {
/* close the output file */
#if LIBAVFORMAT_BUILD >= (52<<16)
- url_fclose(ffmpeg->oc->pb);
+ avio_close(ffmpeg->oc->pb);
#else
- url_fclose(&ffmpeg->oc->pb);
+ avio_close(&ffmpeg->oc->pb);
#endif /* LIBAVFORMAT_BUILD >= (52<<16) */
}

View File

@@ -8,7 +8,7 @@
############################################################
# Start in daemon (background) mode and release terminal (default: off)
daemon on
daemon off
# File to store the process ID, also called pid file. (default: not defined)
process_id_file /var/run/motion/motion.pid
@@ -319,7 +319,7 @@ ffmpeg_deinterlace off
############################################################
# Number of motion thread to show in SDL Window (default: 0 = disabled)
sdl_threadnr 0
#sdl_threadnr 0
############################################################
# External pipe to video encoder
@@ -419,7 +419,7 @@ text_double off
# Target base directory for pictures and films
# Recommended to use absolute path. (Default: current working directory)
target_dir /usr/local/apache2/htdocs/cam1
target_dir /tmp/motion
# File path for snapshots (jpeg or ppm) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-snapshot