Send Motion-user mailing list submissions to motion-user@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/motion-user or, via email, send a message with subject or body 'help' to motion-user-requ...@lists.sourceforge.net You can reach the person managing the list at motion-user-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than "Re: Contents of Motion-user digest..." Today's Topics: 1. Re: Motion not starting after upgrading ubuntu to 16.04 (Laurent MAHE) 2. Reload conf without drop an existing netcam_url connection (Eduardo Tavares Teixeira) 3. Unplayable FFV1 videos (Chris Box) 4. Re: Unplayable FFV1 videos (MrDave) ---------------------------------------------------------------------- Message: 1 Date: Tue, 7 Feb 2017 22:43:37 +0000 From: Laurent MAHE <laurent.m...@gmail.com> Subject: Re: [Motion-user] Motion not starting after upgrading ubuntu to 16.04 To: Motion discussion list <motion-user@lists.sourceforge.net> Message-ID: <cadzhf+uddaqx56ji0pmxcbuh0m062uaf4zjyhe6aslokvf_...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi Mike, Thanks for the quick reply. Good call, I had forgotten I had installed via github as apt-get was giving an old version which didn't support rtsp. Just reinstalled via github and I'm back up and running. Thanks:) Laurent On 7 February 2017 at 22:33, Mike Wilson <knobby2...@gmail.com> wrote: > How did you install motion? It seems that is an old ffmpeg library and I > wonder if we link to that anymore with the current github code. I'm not > sure the status of getting that code into repositories like ubuntu. > > On Tue, Feb 7, 2017 at 5:28 PM Laurent MAHE <laurent.m...@gmail.com> > wrote: > >> I've upgraded to 16.04 and since then I can't start motion anymore. >> I get this error message: >> *ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot >> open shared object file: No such file or directory* >> >> I tried to uninstall and reinstall motion without luck. >> >> Any idea? >> Thanks >> >> Laurent >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot______ >> _________________________________________ >> Motion-user mailing list >> Motion-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/motion-user >> https://motion-project.github.io/ >> >> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Motion-user mailing list > Motion-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/motion-user > https://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user > -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 2 Date: Wed, 8 Feb 2017 08:42:34 -0200 (BRST) From: Eduardo Tavares Teixeira <eduardo.teixe...@agrodefesa.go.gov.br> Subject: [Motion-user] Reload conf without drop an existing netcam_url connection To: motion-user@lists.sourceforge.net Message-ID: <328818550.31667.1486550554046.javamail.zim...@agrodefesa.go.gov.br> Content-Type: text/plain; charset=utf-8 hi every body, First of all, congrats for the project. I would like to know if it is possible to ADD a new netcam_url, while motion service is running (motion service will reload con file), without drop an existing netcam_url connection? ------------------------------ Message: 3 Date: Fri, 17 Feb 2017 20:15:12 +0000 From: Chris Box <chris-mot...@ee.eclipse1.net> Subject: [Motion-user] Unplayable FFV1 videos To: motion-user@lists.sourceforge.net Message-ID: <a09b4635f82c5ff9d382a9dbb91d7...@ee.eclipse1.net> Content-Type: text/plain; charset="us-ascii" Hi, I'm using motion in a security camera application, where lossless video encoding is ideal. Performance in terms of motion detection and triggering has been great. However I found that the majority of the FFV1 videos it creates turn out to be unplayable in VLC. No video appears. The other curious thing is that VLC's codec information page reports 1000fps. After some experimentation I've found a solution that so far works perfectly. I'll describe it below. Software versions ----------------- I'm using Motion built from source, from a git clone on 10th Feb. OS is Raspbian Jessie. Instead of the bundled LibAV I'm using FFmpeg from jessie-backports. (The fault also occurs with LibAV.) Relevant Config --------------- ffmpeg_output_movies on ffmpeg_timelapse 0 ffmpeg_video_codec ffv1 ffmpeg_duplicate_frames false width 640 height 480 framerate 5 Interesting lines from "ffprobe -debug 1" on the written .avi file ------------------------------------------------------------------ [ffv1 @ 0xc67d60] ver:0 keyframe:1 coder:0 ec:0 slices:1 bps:0 Stream #0:0, 30, 1/1000: Video: ffv1, 1 reference frame (FFV1 / 0x31564646), yuv420p, 640x480, 1/1000, 5571 kb/s, 1k fps, 4 tbr, 1k tbn, 1k tbc Note that as far as I can tell version should be either 1 (for 1.1) or 3 (for 1.3), not 0. Also note the reported 1k frame rates. My code changes to ffmpeg_open ------------------------------ In this function you'll find the initial setup of the encoding: ffmpeg->c = c = AVSTREAM_CODEC_PTR(ffmpeg->video_st); c->codec_id = ffmpeg->oc->oformat->video_codec; c->codec_type = AVMEDIA_TYPE_VIDEO; c->bit_rate = bps; c->width = width; c->height = height; c->time_base.num = 1; c->time_base.den = rate; c->gop_size = 12; c->pix_fmt = MY_PIX_FMT_YUV420P; c->max_b_frames = 0; After the above I added this: /* Set FFV1 version to 3 (1.3) */ c->level = 3; You'll also find a part that sets the timebase, i.e. the units in which timestamps are written, which drives the framerate: ffmpeg->last_pts = 0; ffmpeg->video_st->time_base.num = 1; ffmpeg->video_st->time_base.den = 1000; I changed the figure of 1000 and instead used the configured framerate: ffmpeg->video_st->time_base.den = rate; Results ------- Ffprobe output confirms compliance with FFV1.3, and all framerate figures are correct: Stream #0:0, 1, 1/5: Video: ffv1, 1 reference frame (FFV1 / 0x31564646), yuv420p, 640x480, 1/5, 1430 kb/s, 5 fps, 5 tbr, 5 tbn, 5 tbc [ffv1 @ 0x158cea0] global: ver:3.2, coder:0, colorspace: 0 bpr:0 chroma:1(1:1), alpha:0 slices:2x2 qtabs:2 ec:1 intra:0 CRC:0x3300533E Also VLC is now very happy to play these files, and its codec information page shows 5fps. If these fixes are acceptable, is it possible to get them incorporated into the code? Obviously either one or both of the fixes would need to be made conditional on whether the codec is FFV1. Thanks, Chris -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 4 Date: Fri, 17 Feb 2017 14:42:02 -0700 From: MrDave <motionmrd...@gmail.com> Subject: Re: [Motion-user] Unplayable FFV1 videos To: motion-user@lists.sourceforge.net Message-ID: <160571f6-74d7-19cb-46fd-24517d771...@gmail.com> Content-Type: text/plain; charset="windows-1252" Due to the changes in the ffmpeg version 3.1 I am having to significantly refactoring that module right now so I will get these into the base rather than requesting a pull request. The 1000 versus the actual frame rate is a situation in which some of the codecs work better than others and it has to be set with consideration of the PTS and DTS for each frame. At some frame rates and codec/container options , the PTS and DTS are not monotonically increasing and that crashes everything. With the testing I've done, the PTS was actually the most important component since it is setting the Presentation Time Stamp which tells the player when to show the user each frame. I really don't use this container / codec combination so thanks for pointing out the issues and problems. MrDave On 2/17/2017 1:15 PM, Chris Box wrote: > > Hi, > > I'm using motion in a security camera application, where lossless > video encoding is ideal. Performance in terms of motion detection and > triggering has been great. However I found that the majority of the > FFV1 videos it creates turn out to be unplayable in VLC. No video > appears. The other curious thing is that VLC's codec information page > reports 1000fps. After some experimentation I've found a solution that > so far works perfectly. I'll describe it below. > > > Software versions > ----------------- > I'm using Motion built from source, from a git clone on 10th Feb. > OS is Raspbian Jessie. > Instead of the bundled LibAV I'm using FFmpeg from jessie-backports. > (The fault also occurs with LibAV.) > > > Relevant Config > --------------- > ffmpeg_output_movies on > ffmpeg_timelapse 0 > ffmpeg_video_codec ffv1 > ffmpeg_duplicate_frames false > width 640 > height 480 > framerate 5 > > > Interesting lines from "ffprobe -debug 1" on the written .avi file > ------------------------------------------------------------------ > [ffv1 @ 0xc67d60] ver:0 keyframe:1 coder:0 ec:0 slices:1 bps:0 > Stream #0:0, 30, 1/1000: Video: ffv1, 1 reference frame (FFV1 / > 0x31564646), yuv420p, 640x480, 1/1000, 5571 kb/s, 1k fps, 4 tbr, 1k > tbn, 1k tbc > > Note that as far as I can tell version should be either 1 (for 1.1) or > 3 (for 1.3), not 0. > Also note the reported 1k frame rates. > > > My code changes to ffmpeg_open > ------------------------------ > > In this function you'll find the initial setup of the encoding: > ffmpeg->c = c = AVSTREAM_CODEC_PTR(ffmpeg->video_st); > c->codec_id = ffmpeg->oc->oformat->video_codec; > c->codec_type = AVMEDIA_TYPE_VIDEO; > c->bit_rate = bps; > c->width = width; > c->height = height; > c->time_base.num = 1; > c->time_base.den = rate; > c->gop_size = 12; > c->pix_fmt = MY_PIX_FMT_YUV420P; > c->max_b_frames = 0; > > After the above I added this: > /* Set FFV1 version to 3 (1.3) */ > c->level = 3; > > You'll also find a part that sets the timebase, i.e. the units in > which timestamps are written, which drives the framerate: > ffmpeg->last_pts = 0; > ffmpeg->video_st->time_base.num = 1; > ffmpeg->video_st->time_base.den = 1000; > > I changed the figure of 1000 and instead used the configured framerate: > ffmpeg->video_st->time_base.den = rate; > > Results > ------- > Ffprobe output confirms compliance with FFV1.3, and all framerate > figures are correct: > Stream #0:0, 1, 1/5: Video: ffv1, 1 reference frame (FFV1 / > 0x31564646), yuv420p, 640x480, 1/5, 1430 kb/s, 5 fps, 5 tbr, 5 tbn, 5 tbc > [ffv1 @ 0x158cea0] global: ver:3.2, coder:0, colorspace: 0 bpr:0 > chroma:1(1:1), alpha:0 slices:2x2 qtabs:2 ec:1 intra:0 CRC:0x3300533E > > Also VLC is now very happy to play these files, and its codec > information page shows 5fps. > > > If these fixes are acceptable, is it possible to get them incorporated > into the code? Obviously either one or both of the fixes would need to > be made conditional on whether the codec is FFV1. > > Thanks, > Chris > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > > _______________________________________________ > Motion-user mailing list > Motion-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/motion-user > https://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ------------------------------ _______________________________________________ Motion-user mailing list Motion-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/motion-user End of Motion-user Digest, Vol 129, Issue 3 *******************************************