Send Motion-user mailing list submissions to
        [email protected]

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
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."


Today's Topics:

   1. Re: Recorded Video Speed Up/Frame Loss (Stuart Howard)
   2. Re: Recorded Video Speed Up/Frame Loss (MrDave)


----------------------------------------------------------------------

Message: 1
Date: Tue, 7 Mar 2017 20:10:57 +0000
From: Stuart Howard <[email protected]>
Subject: Re: [Motion-user] Recorded Video Speed Up/Frame Loss
To: Motion discussion list <[email protected]>
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="us-ascii"

Version 4.0.1


> On 7 Mar 2017, at 20:01, tosiara <[email protected]> wrote:
> 
> What is motion version? There was a fix recently
> 
> On Mar 7, 2017 21:47, "Stuart Howard" <[email protected] 
> <mailto:[email protected]>> wrote:
> Hi all,
> 
> I'm wondering if anyone can help me with a problem I have with recorded video 
> from Motion.  My IP camera is capable of sending 25fps over an RTSP stream, 
> which I use Motion to capture.  The problem is that the recorded videos often 
> (though not always) have segments which speed up rapidly and/or drop frames, 
> rendering them useless for security purposes.  I've uploaded two sample 
> videos in a zip file which can be found at the following URL:
> 
> https://drive.google.com/open?id=0B2FVaRjHavc5ZVp4enI3cjk5WGs 
> <https://drive.google.com/open?id=0B2FVaRjHavc5ZVp4enI3cjk5WGs>
> 
> Video 1 was recorded with Motion.  Note the time stamp in the top right 
> corner after 18:37:07.
> 
> Video 2 is the equivalent video recorded on board the camera itself.  Note 
> how it doesn't speed up, doesn't lose any frames, and is generally much 
> smoother (e.g. the car passing in the background).
> 
> FFMpeg's analysis of the two videos is as follows:
> 
> Video 1:
> 
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Video 1.mp4':
>   Metadata:
>     major_brand     : isom
>     minor_version   : 512
>     compatible_brands: isomiso2avc1mp41
>     encoder         : Lavf56.40.101
>   Duration: 00:00:06.20, start: 0.010000, bitrate: 7552 kb/s
>     Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), 
> yuv420p, 1280x720, 7546 kb/s, 77.23 fps, 23.42 tbr, 16k tbn, 48 tbc (default)
>     Metadata:
>       handler_name    : VideoHandler
> 
> 
> 77fps ?!
> 
> 
> Video 2:
> 
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Video 2.mp4':
>   Metadata:
>     major_brand     : isom
>     minor_version   : 512
>     compatible_brands: isomiso2avc1mp41
>     encoder         : Lavf55.33.100
>   Duration: 00:00:15.89, start: 0.001000, bitrate: 2190 kb/s
>     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 
> 1280x720, 2116 kb/s, 25.06 fps, 25 tbr, 90k tbn, 180k tbc (default)
>     Metadata:
>       handler_name    : VideoHandler
>     Stream #0:1(eng): Data: none (rtp  / 0x20707472), 69 kb/s
>     Metadata:
>       handler_name    : HintHandler
> Unsupported codec with id 0 for input stream 1
> 
> The CPU isn't particularly taxed (quad core, which I've been monitoring 
> during idle and recording using htop), and the cores rarely go above about 
> 55% utilisation, even during recording.
> 
> Incidentally, the live web stream from Motion does not suffer from this 
> problem (only the recordings) and is able to stream at something near to the 
> full frame rate I see when accessing it directly via the camera's own web 
> interface, however, even so I don't feel it's quite as smooth using Motion as 
> when accessing the camera directly.
> 
> The portions of my Motion config files which I think are relevant are as 
> follows:
> 
> rtsp_uses_tcp on
> stream_maxrate 40
> event_gap 10
> ffmpeg_bps 5000000  (it does the same even at the default of 400000)
> ffmpeg_video_codec mp4
> ffmpeg_duplicate_frames true .  (I've tried false)
> use_extpipe off   (I've also tried the external encoding with a variety of 
> similar results)
> width 1280
> height 720
> netcam_url rtsp://192.168.0.7:554/live/ch0 <http://192.168.0.7:554/live/ch0>
> netcam_keepalive on   (I've tried off)
> netcam_tolerant_check off   (I've tried on)
> threshold 11000
> threshold_tune on
> noise_level 20
> noise_tune on
> despeckle_filter EedDl
> smart_mask_speed 0
> lightswitch 50
> pre_capture 0
> post_capture 0
> ffmpeg_output_movies on
> 
> Anyone know what I'm doing wrong here?  Any help greatly appreciated.
> 
> Regards,
> 
> Stuart
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Announcing the Oxford Dictionaries API! The API offers world-renowned
> dictionary content that is easy and intuitive to access. Sign up for an
> account today to start using our lexical data to power your apps and
> projects. Get started today and enter our developer competition.
> http://sdm.link/oxford <http://sdm.link/oxford>
> _______________________________________________
> Motion-user mailing list
> [email protected] <mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/motion-user 
> <https://lists.sourceforge.net/lists/listinfo/motion-user>
> https://motion-project.github.io/ <https://motion-project.github.io/>
> 
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
> <https://lists.sourceforge.net/lists/options/motion-user>
> ------------------------------------------------------------------------------
> Announcing the Oxford Dictionaries API! The API offers world-renowned
> dictionary content that is easy and intuitive to access. Sign up for an
> account today to start using our lexical data to power your apps and
> projects. Get started today and enter our developer competition.
> http://sdm.link/oxford_______________________________________________
> Motion-user mailing list
> [email protected]
> 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: Tue, 7 Mar 2017 22:26:24 -0700
From: MrDave <[email protected]>
Subject: Re: [Motion-user] Recorded Video Speed Up/Frame Loss
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="windows-1252"

I was not able to view the samples but I would suggest you try the post 
capture as a first step.  The guide needs to be revised to explain this 
better.

What Motion does is only record the frames that have motion and when the 
motion frames have finished it will add the specified number of post 
capture frames.  This is different than the event time.  The event time 
will group together all the sequences of motion frames together and call 
them an event.  So for any sort of decent standard video, you should be 
specifying post capture frames.  It has been contemplated to revise the 
default to automatically include all the frames (instead of just those 
with motion) in the movies.  This however would break the functionality 
for those that need to just see the motion frames.

To Tosiara's question on version.  The videos have been a particularly 
thorny issue to resolve and there have been quite a few revisions trying 
to nail down variable FPS, presentation time stamps(PTS),  and all the 
variations that come with the different containers.  Generally, each 
container seems finicky in its own way.  I have had the best experience 
with the mkv container.

You may also want to consider turning on the emulate motion option and 
running through the various codecs to determine which one provides the 
best quality.  Then once the container is selected, choose the 
post_capture to make sure it is encoding all the frames.

Finally, if the 4.0.1 isn't working out, you can try the latest master 
branch.  Either build from source as described in the guide or if 
desired there is a script that allows you to build your own deb in the 
motion-packaging repo if you want that.

Dave


On 3/7/2017 1:10 PM, Stuart Howard wrote:
> Version 4.0.1
>
>
>> On 7 Mar 2017, at 20:01, tosiara <[email protected] 
>> <mailto:[email protected]>> wrote:
>>
>> What is motion version? There was a fix recently
>>
>> On Mar 7, 2017 21:47, "Stuart Howard" <[email protected] 
>> <mailto:[email protected]>> wrote:
>>
>>     Hi all,
>>
>>     I'm wondering if anyone can help me with a problem I have with
>>     recorded video from Motion.  My IP camera is capable of sending
>>     25fps over an RTSP stream, which I use Motion to capture. The
>>     problem is that the recorded videos often (though not always)
>>     have segments which speed up rapidly and/or drop frames,
>>     rendering them useless for security purposes.  I've uploaded two
>>     sample videos in a zip file which can be found at the following URL:
>>
>>     https://drive.google.com/open?id=0B2FVaRjHavc5ZVp4enI3cjk5WGs
>>     <https://drive.google.com/open?id=0B2FVaRjHavc5ZVp4enI3cjk5WGs>
>>
>>     Video 1 was recorded with Motion.  Note the time stamp in the top
>>     right corner after 18:37:07.
>>
>>     Video 2 is the equivalent video recorded on board the camera
>>     itself.  Note how it doesn't speed up, doesn't lose any frames,
>>     and is generally much smoother (e.g. the car passing in the
>>     background).
>>
>>     FFMpeg's analysis of the two videos is as follows:
>>
>>     Video 1:
>>
>>     Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Video 1.mp4':
>>       Metadata:
>>         major_brand   : isom
>>         minor_version   : 512
>>     compatible_brands: isomiso2avc1mp41
>>         encoder   : Lavf56.40.101
>>       Duration: 00:00:06.20, start: 0.010000, bitrate: 7552 kb/s
>>         Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 /
>>     0x31637661), yuv420p, 1280x720, 7546 kb/s, 77.23 fps, 23.42 tbr,
>>     16k tbn, 48 tbc (default)
>>         Metadata:
>>     handler_name    : VideoHandler
>>
>>
>>     77fps ?!
>>
>>
>>     Video 2:
>>
>>     Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Video 2.mp4':
>>       Metadata:
>>         major_brand     : isom
>>     minor_version   : 512
>>     compatible_brands: isomiso2avc1mp41
>>         encoder     : Lavf55.33.100
>>       Duration: 00:00:15.89, start: 0.001000, bitrate: 2190 kb/s
>>         Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661),
>>     yuv420p, 1280x720, 2116 kb/s, 25.06 fps, 25 tbr, 90k tbn, 180k
>>     tbc (default)
>>         Metadata:
>>     handler_name    : VideoHandler
>>         Stream #0:1(eng): Data: none (rtp  / 0x20707472), 69 kb/s
>>         Metadata:
>>     handler_name    : HintHandler
>>     Unsupported codec with id 0 for input stream 1
>>
>>     The CPU isn't particularly taxed (quad core, which I've been
>>     monitoring during idle and recording using htop), and the cores
>>     rarely go above about 55% utilisation, even during recording.
>>
>>     Incidentally, the live web stream from Motion does not suffer
>>     from this problem (only the recordings) and is able to stream at
>>     something near to the full frame rate I see when accessing it
>>     directly via the camera's own web interface, however, even so I
>>     don't feel it's quite as smooth using Motion as when accessing
>>     the camera directly.
>>
>>     The portions of my Motion config files which I think are relevant
>>     are as follows:
>>
>>     rtsp_uses_tcp on
>>     stream_maxrate 40
>>     event_gap 10
>>     ffmpeg_bps 5000000  (it does the same even at the default of 400000)
>>     ffmpeg_video_codec mp4
>>     ffmpeg_duplicate_frames true .  (I've tried false)
>>     use_extpipe off   (I've also tried the external encoding with a
>>     variety of similar results)
>>     width 1280
>>     height 720
>>     netcam_url rtsp://192.168.0.7:554/live/ch0
>>     <http://192.168.0.7:554/live/ch0>
>>     netcam_keepalive on   (I've tried off)
>>     netcam_tolerant_check off   (I've tried on)
>>     threshold 11000
>>     threshold_tune on
>>     noise_level 20
>>     noise_tune on
>>     despeckle_filter EedDl
>>     smart_mask_speed 0
>>     lightswitch 50
>>     pre_capture 0
>>     post_capture 0
>>     ffmpeg_output_movies on
>>
>>     Anyone know what I'm doing wrong here?  Any help greatly appreciated.
>>
>>     Regards,
>>
>>     Stuart
>>
>>
>>
>>
>>
>>
>>
>>     
>> ------------------------------------------------------------------------------
>>     Announcing the Oxford Dictionaries API! The API offers world-renowned
>>     dictionary content that is easy and intuitive to access. Sign up
>>     for an
>>     account today to start using our lexical data to power your apps and
>>     projects. Get started today and enter our developer competition.
>>     http://sdm.link/oxford
>>     _______________________________________________
>>     Motion-user mailing list
>>     [email protected]
>>     <mailto:[email protected]>
>>     https://lists.sourceforge.net/lists/listinfo/motion-user
>>     <https://lists.sourceforge.net/lists/listinfo/motion-user>
>>     https://motion-project.github.io/ <https://motion-project.github.io/>
>>
>>     Unsubscribe:
>>     https://lists.sourceforge.net/lists/options/motion-user
>>     <https://lists.sourceforge.net/lists/options/motion-user>
>>
>> ------------------------------------------------------------------------------
>> Announcing the Oxford Dictionaries API! The API offers world-renowned
>> dictionary content that is easy and intuitive to access. Sign up for an
>> account today to start using our lexical data to power your apps and
>> projects. Get started today and enter our developer competition.
>> http://sdm.link/oxford_______________________________________________
>> Motion-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/motion-user
>> https://motion-project.github.io/
>>
>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
>
>
> ------------------------------------------------------------------------------
> Announcing the Oxford Dictionaries API! The API offers world-renowned
> dictionary content that is easy and intuitive to access. Sign up for an
> account today to start using our lexical data to power your apps and
> projects. Get started today and enter our developer competition.
> http://sdm.link/oxford
>
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> 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...

------------------------------

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford

------------------------------

_______________________________________________
Motion-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user


End of Motion-user Digest, Vol 130, Issue 3
*******************************************

Reply via email to