Giter Club home page Giter Club logo

motion's People

Contributors

aklomp avatar bsb002-flash-tester avatar ccrisan avatar dfries avatar dgomes avatar ffontaine avatar genius3000 avatar hansmi avatar infinity0 avatar inodlite avatar iskunk avatar jackxbritton avatar jasaw avatar jdodgen avatar jogu avatar momo-i2 avatar mr-dave avatar mr-davedev avatar mterzo avatar pascal-fb-martin avatar perelandric avatar popoviciri avatar radekhvizdos avatar rgaufman avatar sackmotion avatar siriuth avatar slokhorst avatar sthen avatar telemaxx avatar tosiara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

motion's Issues

Separate options for timelapse and movies

Currently single option used for both timlepase and movies format: ffmpeg_video_codec
Is it possible to record timelapse and movie in separate formats? Let say, timlepase in SWF (MPEG2) and movies in MPEG4?

Optimization for mjpegtoyuv420p function

This patch proposed by @aklomp at #42 (comment)

int mjpegtoyuv420p(unsigned char *map, unsigned char *cap_map, int width, int height, unsigned int size)
{
    int ret = decode_jpeg_raw(cap_map, size, 0, 420, width, height,
                map,
                map + (width * height),
                map + (width * height) + (width * height) / 4);

    if (ret == 1) {
        MOTION_LOG(CRT, TYPE_VIDEO, NO_ERRNO, "%s: Corrupt image ... continue");
        ret = 2;
    }
    return ret;
}

This is currently being tested on ARM device. So far it seems to save 5-10% of CPU

Permissions on created files

The default install for debian systems sets the permissions for created files such that normal users can not view or delete files. Resolution of this issue is anticipated to be completed within the Mr-Dave/debian-motion repository but is reported here for transparency and tracking of all issues.

Motion overwrites timelapse file after restart

Reported on mail group thread. And I have reproduced it locally
Step to reproduce:

  1. Enable timelapse and let it run for some time
  2. Restart motion
  3. timelapse file got overwritten and is 0 byte

Log:

[1] [NTC] [EVT] event_newfile: File of type 32 saved to: /home/ubuntu/cam0/20140930-timelapse.mpg

SizeOf Changes

Determine desired resolution to incorporate Sizeof changes from new maintainer. Keeping author attributions and commit messages.

Options

  1. Official git merge
  2. Wait for pull request from original developer.
  3. Manually create patch files with identical commit messages and specify correct author.

Configure.ac clean up

Clean up the now unnecessary FFMEG/LIBAV flags set within configure script. Also remove the netcam_rtsp.c components of configure since this module is now always part of the build and has pre-processor directives to determine whether FFMPEG/LIBAV is present.

Variable FPS bug

(cross post from mail list)

Hi,

I have seen this bug for quite long time, but now finally created
proof of concept.

The issue is how motion deals with variable frame rate. Depending on
the amount of light a web cam changes FPS: more light - more frames
per second.

When real frame rate increases - motion generates "slow" movie. For
example, motion started movie as 7 fps, but then camera started
sending 30 fps - you will have "slowmotion" effect.

When real frame rate decreases - motion starts filling "pauses" into
movie: copying last second's frame N-times.

Please see examples: (download original MP4, don't use flash player)

"Slowmotion" - https://yadi.sk/i/hnsMAPhTeKpH9
"Lags" - https://yadi.sk/i/4cnHPQAyeKpKj

Config: http://pastebin.com/FUViNzQt
Uses extpipe x264 (compiled with gpac)
Compiled latest "master" branch of Mr-Dave - https://github.com/Mr-Dave/motion

To reproduce "slowmotion", close web camera lens using your finger -
it will drop to the lowest framerate. Start motion, wait for 10
seconds and start generating movements - motion will begin writing a
movie at 7 fps. Then use flashlight to bring more light into web cam
lens - camera starts giving maximum frame rate.

To reproduce "lags" do vice versa. Turn on flashlight, camera will
switch to highest frame rate. Start motion and generate movements -
motion starts movie at 30 fps. Now turn flashlight off - camera drops
frame rate to lover (15 in my case).

Any ideas how we could fix that?

Thanks

Detection of swscale headers

Would it be worth checking if swscale headers exist during config?
RTSP requires swscale and assumes it exists as soon as ffmpeg is detected. But may fail compiling if it is missing:

configure:5330: checking for ffmpeg autodetecting libraries
configure:5358: result: found in /usr/lib/i386-linux-gnu
configure:5417: checking for ffmpeg headers in /usr
configure:5443: result: found /usr/include/libavformat/avformat.h
configure:5487: checking file_protocol is defined in ffmpeg ?
configure:5507: gcc -c -I/usr/include -DFFMPEG_NEW_INCLUDES -I/usr/include/libavformat  conftest.c >&5

compilation fails:

Version: Unofficial-Git-d71cebf
Platform: Linux (if this is incorrect, please read README.FreeBSD)

Generating dependencies, please wait...
netcam_rtsp.h:10:32: fatal error: libswscale/swscale.h: No such file or directory
compilation terminated.
netcam_rtsp.h:10:32: fatal error: libswscale/swscale.h: No such file or directory
compilation terminated.
make: *** [.depend] Error 1

sudo apt-get install libswscale-dev would resolve the issue in this case

Configuration identification of FFMPEG vs Libav

The current variation of the configure script does not reliably identify the various versions of Libav vs FFmpeg for proper processing. If any reader of this knows of a 100% solid method of identifying via autotools which is installed on a users computer, please comment.

Increase timeout for RTSP connect

Tetsing the latest code and now can't establish connection to my VLC rtsp emulator - always times out:

[1] [NTC] [ALL] motion_init: Started motion-stream server in port 8083 auth Disabled
[1] [WRN] [ALL] motion_loop: Retrying until successful connection with camera
[1] [ALR] [NET] netcam_start: Network Camera thread starting... for url (rtsp://rtspsrv:1554/)
[1] [WRN] [NET] netcam_interrupt_rtsp: Reading picture timed out for rtsp://rtspsrv:1554/
[1] [WRN] [NET] netcam_interrupt_rtsp: Reading picture timed out for rtsp://rtspsrv:1554/
[1] [WRN] [NET] netcam_interrupt_rtsp: Reading picture timed out for rtsp://rtspsrv:1554/
[1] [ERR] [NET] netcam_connect_rtsp: Failed to read first image
[1] [WRN] [ALL] motion_loop: Retrying until successful connection with camera
[1] [ALR] [NET] netcam_start: Network Camera thread starting... for url (rtsp://rtspsrv:1554/)
[1] [WRN] [NET] netcam_interrupt_rtsp: Reading picture timed out for rtsp://rtspsrv:1554/
[1] [WRN] [NET] netcam_interrupt_rtsp: Reading picture timed out for rtsp://rtspsrv:1554/
[1] [WRN] [NET] netcam_interrupt_rtsp: Reading picture timed out for rtsp://rtspsrv:1554/
[1] [ERR] [NET] netcam_connect_rtsp: Failed to read first image
[1] [WRN] [ALL] motion_loop: Retrying until successful connection with camera
[1] [ALR] [NET] netcam_start: Network Camera thread starting... for url (rtsp://rtspsrv:1554/)
[1] [WRN] [NET] netcam_interrupt_rtsp: Reading picture timed out for rtsp://rtspsrv:1554/
[1] [WRN] [NET] netcam_interrupt_rtsp: Reading picture timed out for rtsp://rtspsrv:1554/
[1] [WRN] [NET] netcam_interrupt_rtsp: Reading picture timed out for rtsp://rtspsrv:1554/
[1] [ERR] [NET] netcam_connect_rtsp: Failed to read first image
[1] [NTC] [ALL] motion_loop: Video signal lost - Adding grey image
[1] [WRN] [ALL] motion_loop: Retrying until successful connection with camera
[1] [ALR] [NET] netcam_start: Network Camera thread starting... for url (rtsp://rtspsrv:1554/)
[1] [WRN] [NET] netcam_interrupt_rtsp: Reading picture timed out for rtsp://rtspsrv:1554/
[1] [WRN] [NET] netcam_interrupt_rtsp: Reading picture timed out for rtsp://rtspsrv:1554/
[1] [WRN] [NET] netcam_interrupt_rtsp: Reading picture timed out for rtsp://rtspsrv:1554/
[1] [ERR] [NET] netcam_connect_rtsp: Failed to read first image
[1] [WRN] [ALL] motion_loop: Retrying until successful connection with camera
[1] [ALR] [NET] netcam_start: Network Camera thread starting... for url (rtsp://rtspsrv:1554/)

Tried watching rtsp stream using client VLC - it waits some time, but then starts playing the stream. So looks like motion's timeout threshold is smaller.

Maybe its worth to introduce a variable timeout and probably control it from the config file?

FFmpeg.c

Legacy memory memory leak in ffmpeg.c when creating movies

[crash] motion free() invalid pointer

Steps to reproduce:

  1. bring RTSP camera offline
  2. start motion
  3. bring camera online
  4. motion crashes
[1] [NTC] [ALL] motion_init: Started motion-stream server in port 8081 auth Disabled
[1] [WRN] [ALL] motion_loop: Retrying until successful connection with camera
[1] [ALR] [NET] netcam_start: Network Camera thread starting... for url (rtsp://localhost:1554/)
[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Input/output error
[1] [WRN] [ALL] motion_loop: Retrying until successful connection with camera
[1] [ALR] [NET] netcam_start: Network Camera thread starting... for url (rtsp://localhost:1554/)
[1] [ALR] [NET] interrupt_cb: Timeout getting frame 11
[1] [ALR] [NET] interrupt_cb: Timeout getting frame 11
[1] [ALR] [NET] interrupt_cb: Timeout getting frame 11
[1] [ERR] [NET] netcam_read_rtsp_image: invalid frame! 0 : 
[1] [CRT] [NET] netcam_start: Failed trying to read first image - retval:-1
[1] [ALR] [NET] netcam_shutdown_rtsp: shutting down rtsp
*** Error in `./motion': free(): invalid pointer: 0xb41c3ee0 ***
======= Backtrace: =========
/lib/libc.so.6(+0x6dfd3)[0xb6438fd3]
/lib/libc.so.6(+0x7418a)[0xb643f18a]
/lib/libc.so.6(+0x74dcc)[0xb643fdcc]
/usr/lib/libavutil.so.52(av_freep+0x12)[0xb65b1292]
./motion[0x806ceaf]
./motion[0x806e545]
./motion[0x805b6a4]
./motion[0x8057cf6]
./motion[0x8050871]
/lib/libpthread.so.0(+0x707a)[0xb76e007a]
/lib/libc.so.6(clone+0x5e)[0xb64b980e]

Handling MJPEG with warnings

This was initially reported back in 2011:

http://www.lavrsen.dk/foswiki/bin/view/Motion/SupportQuestion2011x01x09x193606

The Logitech C910 camera simply does not work with motion in MJPEG format:

Corrupt JPEG data: 4 extraneous bytes before marker 0xd4
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
Corrupt JPEG data: 9 extraneous bytes before marker 0xd4
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
Corrupt JPEG data: 1 extraneous bytes before marker 0xd2
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
Corrupt JPEG data: 1 extraneous bytes before marker 0xd3
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
Corrupt JPEG data: 1 extraneous bytes before marker 0xd4
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
Corrupt JPEG data: 1 extraneous bytes before marker 0xd1
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
Corrupt JPEG data: 1 extraneous bytes before marker 0xd1
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
Corrupt JPEG data: 2 extraneous bytes before marker 0xd4
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
Corrupt JPEG data: 5 extraneous bytes before marker 0xd1
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
Corrupt JPEG data: 2 extraneous bytes before marker 0xd1
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
Corrupt JPEG data: 1 extraneous bytes before marker 0xd2
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue

To workaround the issue I changed this code:

diff --git a/video_common.c b/video_common.c
index 54569c6..f98154f 100644
--- a/video_common.c
+++ b/video_common.c
@@ -394,7 +394,7 @@ int mjpegtoyuv420p(unsigned char *map, unsigned char *cap_map, int width, int he

     if (ret == 1) {
         MOTION_LOG(CRT, TYPE_VIDEO, NO_ERRNO, "%s: Corrupt image ... continue");
-        ret = 2;
+        ret = 0;
     }
     return ret;
 }

Any other more sophisticated way to handle libjpeg warnings?

Mail list bump: http://sourceforge.net/p/motion/mailman/message/33700242/

Reduce error meesage rate to syslog on RTSP connection lost/restore

Tested tree 225804c

When RTSP stream disconnects (camera offline) following lines floods syslog:

[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Input/output error
[1] [ERR] [NET] netcam_handler_loop: Attempting to reconnect
[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Input/output error
[1] [ERR] [NET] netcam_handler_loop: Attempting to reconnect
[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Input/output error
[1] [ERR] [NET] netcam_handler_loop: Attempting to reconnect
[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Input/output error
[1] [ERR] [NET] netcam_handler_loop: Attempting to reconnect
[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Input/output error
[1] [ERR] [NET] netcam_handler_loop: Attempting to reconnect
[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Input/output error
[1] [ERR] [NET] netcam_handler_loop: Attempting to reconnect
[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Input/output error
[1] [ERR] [NET] netcam_handler_loop: Attempting to reconnect
[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Input/output error
[1] [ERR] [NET] netcam_handler_loop: Attempting to reconnect
[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Input/output error
[1] [ERR] [NET] netcam_handler_loop: Attempting to reconnect

When camera gets online motion restores connection. While connection restores there are also some errors logged

[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Invalid data found when processing input
[1] [ALR] [NET] rtsp_connect: Authentication?
[1] [ERR] [NET] netcam_handler_loop: Attempting to reconnect
[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Invalid data found when processing input
[1] [ALR] [NET] rtsp_connect: Authentication?
[1] [ERR] [NET] netcam_handler_loop: Attempting to reconnect
[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Invalid data found when processing input
[1] [ALR] [NET] rtsp_connect: Authentication?
[1] [ERR] [NET] netcam_handler_loop: Attempting to reconnect
[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Invalid data found when processing input
[1] [ALR] [NET] rtsp_connect: Authentication?
[1] [ERR] [NET] netcam_handler_loop: Attempting to reconnect
[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Invalid data found when processing input
[1] [ALR] [NET] rtsp_connect: Authentication?
[1] [ERR] [NET] netcam_handler_loop: Attempting to reconnect
[1] [ALR] [NET] rtsp_connect: unable to open input(rtsp://localhost:1554/): Invalid data found when processing input
[1] [ALR] [NET] rtsp_connect: Authentication?

Would be great to reduce the rate of similar messages logged

Direct dump of rtsp stream

Hi, it'd be nice to make the direct dump of rtsp stream possible to avoid unnecessary encoding. Ideally I'd like to specify one stream for motion detection (lower resolution) and another for recording (higher resolution).

Debian Patches

Patches from Debian source were not carried forward into PPA causing regresssion.

SWF may be not user friendly extension for timelapse which is just MPEG2 file

Is it possible to use SWF codec while file extension is .MPEG ?
Most browsers detect .swf extension and try to load flash player which will mostly fail. If the file is just MPEG2 would make sense to use video/mpeg mime type.

So I would suggest:

  1. make SWF default to protect against overwrite
  2. if codec is SWF, append extension ".mpeg"
  3. if other codec, append ".avi" or ".mpg" accordingly

Greyscale Format

Reported by Martin Beynon:

Greyscale pix format for webcams does not appear to be functional.

Error in netcam_setup_ftp

I've found an error in netcam_setup_ftp method (netcam.c) in this piece of code:

if (ftp_connect(netcam) < 0) {
ftp_free_context(netcam->ftp);
return -1;
}

The call to the ftp_free_context throw an "double free or corruption".
Thanks

User Messages

Text, content and notification levels used for RTSP messages need to be reviewed.

Lock mutex on open codec

The ffmpeg/libav open codec function is not thread safe and needs to be protected while opening.

Gray Image on Camera Disconnection

Upon disconnection, RTSP process keeps last picture. After timing out, it should go to the usual gray image until camera comes back online. Reported by Tosiara

Detect broken RTSP packets

Mostly when using UDP transport for RTSP there can happen packet drop which results in corrupted picture. See attached example
We need to detect corrupted frames and drop them (duplicate previous one) to protect against false motion detection. This works well with MJPEG stream (motion skips corrupted frames if libjpeg reports error)

282-20140703_08-39

Generate version string during ./configure

This is an enhancement idea
Would it be possible to make motion always generate version string (using provided version.sh) during "./configure"?

Currently it is either "trunkREVUNKNOWN" or the last one committed to git repo by sackmotion:

PACKAGE_VERSION='Git-28b7cb2a4297c78b9c08c9ce29a648aeb22120d0'

The positive effect would be that you don't need to worry about version string when you build another pulled commit. I tried to dig myself but I seem to lack some knowledge how that process works

Thanks

Gracefull restart of watchdog kills web_control thread and does not restart it

Mail list report: http://sourceforge.net/p/motion/mailman/message/33600794/

If watchdog triggers motion restart - web control thread exits and does not restart

Mar 14 18:37:03 server motion[5758]: [0] [ERR] [ALL] main: Thread 1 - Watchdog timeout, trying to do a graceful restart
Mar 14 18:37:04 server motion[5758]: [0] [NTC] [STR] httpd_run: motion-httpd - Finishing
Mar 14 18:37:04 server motion[5758]: [0] [NTC] [STR] httpd_run: motion-httpd Closing
Mar 14 18:37:04 server motion[5758]: [0] [NTC] [STR] motion_web_control: motion-httpd thread exit
Mar 14 18:37:36 server motion[5758]: [1] [NTC] [ALL] motion_loop: Thread exiting
Mar 14 18:37:36 server motion[5758]: [1] [NTC] [STR] stream_stop: Closing motion-stream listen socket & active motion-stream sockets
Mar 14 18:37:36 server motion[5758]: [1] [NTC] [STR] stream_stop: Closed motion-stream listen socket & active motion-stream sockets
Mar 14 18:37:37 server motion[5758]: [1] [NTC] [EVT] event_extpipe_end: CLOSING: extpipe file desc 8, error state 0
Mar 14 18:37:41 server motion[5758]: [1] [NTC] [EVT] event_extpipe_end: pclose return: -1
Mar 14 18:37:41 server motion[5758]: [1] [ALR] [NET] netcam_handler_loop: netcam camera handler: finish set, exiting
Mar 14 18:37:41 server motion[5758]: [0] [NTC] [ALL] main: Motion thread 1 restart
Mar 14 18:37:41 server motion[5758]: [1] [NTC] [ALL] motion_init: Thread 1 started , motion detection Enabled
Mar 14 18:37:41 server motion[5758]: [1] [ALR] [NET] netcam_start: Network Camera thread starting... for url (http://dcs-932l/mjpeg.cgi)
Mar 14 18:37:41 server motion[5758]: [1] [NTC] [NET] netcam_setup_html: connected, going on to read image.
Mar 14 18:37:41 server motion[5758]: [1] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 1 items
Mar 14 18:37:41 server motion[5758]: [1] [ALR] [NET] netcam_handler_loop: Camera handler thread [2] started
Mar 14 18:37:41 server motion[5758]: [1] [NTC] [STR] http_bindsock: motion-stream testing : IPV4 addr: 0.0.0.0 port: 8081
Mar 14 18:37:41 server motion[5758]: [1] [NTC] [STR] http_bindsock: motion-stream Bound : IPV4 addr: 0.0.0.0 port: 8081
Mar 14 18:37:41 server motion[5758]: [1] [NTC] [ALL] motion_init: Started motion-stream server in port 8081 auth Disabled

Only stream thread is restarted (port 8081)
This is probably because web_control thread creation is outside of the "restart" loop:

https://github.com/Mr-Dave/motion/blob/master/motion.c#L2727

Look few lines up

Security Fixes

Validate and incorporate as needed all security patches identified and corrected in the Hyperbolic fork.

Quality of captured movies.

Hi,
When capturing (recording) movies, the quality start out fine, but within 3-4 seconds the quality decreases down to unusable. It does not happen with the sackmotion/master branch. I've tested both rtsp and mjpeg streams. With debug in can see this, maybe related?

[1] [INF] [ENC] ffmpeg_avcodec_log: AVFrame.format is not set
 - flag 24
[1] [INF] [ENC] ffmpeg_avcodec_log: AVFrame.width or height is not set
 - flag 24
[1] [INF] [ENC] ffmpeg_avcodec_log: Statistics: 10 seeks, 31 writeouts
 - flag 48

Ideas?

vlc rtsp stream

Hi,
Just wondering if a rtsp stream from vlc is supposed to work in current master branch?

I'm streaming from an Raspberry Pi + camera module:
cvlc v4l2:///dev/video0 --v4l2-width 640 --v4l2-height 480 --v4l2-chroma h264 --sout '#rtp{dst=0.0.0.0,port=8081,sdp=rtsp://10.10.1.91:8081/stream.sdp}'

I can watch the stream in vlc, but motion gives me this error:
[1] [ERR] [NET] netcam_rtsp_open_context: unable to open input(rtsp://10.10.1.91:8081/stream.sdp): Protocol not supported

netcam_url requires trailing slash

Example of failing URL: http://server:8181
This is not obvious that netcam_url requires trailing slash. Firefox and VLC plays such streams without any issues.
So we should either automatically add missing trailing slash during parse or mention it in the conf template

[1] [ALR] [NET] netcam_start: Network Camera thread starting... for url (http://server:8181)
[1] [DBG] [NET] netcam_url_parse: Entry netcam_url_parse data http://server:8181
[1] [DBG] [NET] netcam_url_parse: Parse case 0 data http://server:8181
[1] [DBG] [NET] netcam_url_parse: Parse case 1 data http
[1] [DBG] [NET] netcam_url_parse: Parse case 6 data server
[1] [DBG] [NET] netcam_url_parse: Parse case 7 data :8181
[1] [DBG] [NET] netcam_url_parse: Parse case 8 data 8181
[1] [DBG] [NET] netcam_url_parse: Parse case 9 data
[1] [INF] [NET] netcam_start: Netcam_http parameter 'off' converts to flags: HTTP/1.0: 1 HTTP/1.1: 0 Keep-Alive OFF.
[1] [INF] [NET] netcam_start: now calling netcam_setup_html()
[1] [INF] [NET] netcam_http_build_url: Netcam has flags: HTTP/1.0: 1 HTTP/1.1: 0 Keep-Alive OFF.
[1] [INF] [NET] netcam_http_build_url: Camera connect string is ''GET  HTTP/1.0
Host: server
User-Agent: Motion-netcam/Unofficial-Git-003a666
Connection: close
Authorization: Basic *****

'' End of camera connect string.
[1] [INF] [NET] netcam_http_request: about to try to connect, time #0
[1] [INF] [NET] netcam_connect: disconnecting netcam since keep-alive not set.
[1] [INF] [NET] netcam_connect: with no keepalive, new socket created fd 10
[1] [INF] [NET] netcam_connect: re-using socket 10 since keepalive is set.
[1] [ERR] [NET] netcam_connect: connect returned error: Operation now in progress
[1] [INF] [NET] netcam_connect: disconnecting netcam (3)
[1] [ERR] [NET] Failed to open camera - check your config and that netcamera is online
[1] [ERR] [NET] netcam_http_request: Failed to read first camera header - giving up for now

Preprocessor conditionals in Config

The current structure does not read in certain parameters from the config file if certain components are not on the users system. This is not appropriate because a few of the options can be used even if those components are not installed. This issue/task will remove the preprocessor conditional reading of the config options and read them all. The full use of the particular option however will still be dependent upon the component being installed.

If compiled without ffmpeg - motion should not keep trying RTSP

If compiled without ffmpeg motion keeps trying to connect to RTSP forever:

[1] [WRN] [ALL] motion_loop: Retrying until successful connection with camera
[1] [ALR] [NET] netcam_start: Network Camera thread starting... for url (rtsp://localhost/123)
[1] [ERR] [NET] netcam_setup_rtsp: FFmpeg/Libav not found on computer.  No RTSP support
[1] [WRN] [ALL] motion_loop: Retrying until successful connection with camera
[1] [ALR] [NET] netcam_start: Network Camera thread starting... for url (rtsp://localhost/123)
[1] [ERR] [NET] netcam_setup_rtsp: FFmpeg/Libav not found on computer.  No RTSP support
[1] [WRN] [ALL] motion_loop: Retrying until successful connection with camera
[1] [ALR] [NET] netcam_start: Network Camera thread starting... for url (rtsp://localhost/123)
[1] [ERR] [NET] netcam_setup_rtsp: FFmpeg/Libav not found on computer.  No RTSP support

Probably this should be a fatal error and motion should notify and exit?

Libav 10 support for version 3.4

Consider including the Libav 10 patch from commit c37ac34 currently on the unstable branch into 3.4 branch. It is a low risk, high value change since Ubuntu 14.10 users will need it for Motion to function. This would be the last addition/change to 3.4. Other changes and fixes in that branch would be slated for a later version to allow for adequate testing. Inclusion of this commit in the 3.4 branch is at the discretion of the packager.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.