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: Wrong Video Duration since upgrade to motion 4.5 (Arvid Ihnen)


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

Message: 1
Date: Mon, 19 Dec 2022 12:24:47 +0100
From: Arvid Ihnen <[email protected]>
To: Motion discussion list <[email protected]>
Subject: Re: [Motion-user] Wrong Video Duration since upgrade to
        motion 4.5
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

I know, this is very strange and in the meantime I believe the issue is 
primarily not with motion.
As mentioned before, I am running motion in a docker image under Photon OS on 
VMware ESXi.
I was not able to reproduce the issue using Ubuntu instead of Photon OS. 
Unfortunately I would prefer to use Photon OS for my docker images.
I also checked the logfile from all other docker containers running on my 
Photon OS VM and did not found similar time jumps.
To summarize, I see the time jumps in three places:
- in the log file (leading to Camera reading timeouts)
- in the SQL statement
- in the produced video images

Here are a short extract from the motion log with -d 9 containing the issue.
I was not sure if you see any chance to find the issue (e.g. some multi 
threading problems) under the described circumstances (and also have the time 
to dig into it) and if I should post the whole logfile here.

[4:ml4:Tor] [INF] [ENC] [Dec 18 23:23:00] ffmpeg_set_quality: mpeg2video codec 
vbr/crf/bit_rate: 513
[4:ml4:Tor] [DBG] [DBL] [Dec 18 23:23:00] dbse_exec_mysql: Executing MySQL query
[4:ml4:Tor] [NTC] [EVT] [Dec 18 23:23:00] event_newfile: Writing movie to file: 
/motion/new/Tor/20221218-timelapse.mpg
[4:ml4:Tor] [DBG] [ENC] [Dec 18 23:23:00] ffmpeg_encode_video: Receive packet 
threw EAGAIN returning -2 code :Resource temporarily unavailable
[8:av8:Eingang] [INF] [NET] [Dec 18 23:23:03] netcam_init_swdecoder: norm: 
Initializing decoder
[8:av8:Eingang] [INF] [NET] [Dec 18 23:23:03] netcam_rtsp_open_codec: norm: 
Decoder opened
[8:nc8:Eingang] [NTC] [NET] [Dec 18 23:23:03] netcam_rtsp_connect: norm: Camera 
(Eingang) connected
[8:nc8:Eingang] [INF] [NET] [Dec 18 23:23:03] netcam_rtsp_connect: norm: Netcam 
capture_rate is 7.
[8:nc8:Eingang] [INF] [NET] [Dec 18 23:23:03] netcam_rtsp_connect: norm: Camera 
source is 6 FPS
[3:ml3:Eingang] [NTC] [DBL] [Dec 18 23:23:04] dbse_init: Database type mysql
[3:ml3:Eingang] [NTC] [ALL] [Dec 18 23:23:04] image_ring_resize: Resizing 
pre_capture buffer to 20 items
[3:ml3:Eingang] [NTC] [EVT] [Dec 19 00:05:12] event_ffmpeg_timelapse: Timelapse 
using mpg codec.
[3:ml3:Eingang] [NTC] [EVT] [Dec 19 00:05:12] event_ffmpeg_timelapse: Events 
will be appended to file
[3:ml3:Eingang] [INF] [ENC] [Dec 19 00:05:12] ffmpeg_set_quality: mpeg2video 
codec vbr/crf/bit_rate: 513
[3:ml3:Eingang] [DBG] [DBL] [Dec 18 23:23:05] dbse_exec_mysql: Executing MySQL 
query
[3:ml3:Eingang] [NTC] [EVT] [Dec 18 23:23:05] event_newfile: Writing movie to 
file: /motion/new/Eingang/20221219-timelapse.mpg
[3:ml3:Eingang] [DBG] [ENC] [Dec 18 23:23:05] ffmpeg_encode_video: Receive 
packet threw EAGAIN returning -2 code :Resource temporarily unavailable


> Am 18.12.2022 um 20:00 schrieb tosiara <[email protected]>:
> 
> We could only try to help if Arvid could get full debug log from the 
> beginning (-d 9) while reproducing the issue and a corresponding movie file
> 
> Without that it is really hard to tell anything
> 
> On Sat, Dec 17, 2022, 23:26 MrDave <[email protected] 
> <mailto:[email protected]>> wrote:
> Just to wrap this one up for me, I have absolutely no idea how something like 
> this could occur.  
> 
> 
> On 12/15/2022 10:14 AM, Arvid Ihnen via Motion-user wrote:
>> Hi,
>>    many thanks for trying to reproduce the issue.
>> I did some further investigations and figured out two things.
>> 
>> 1)  For ever recording I wrote the approximate duration into the SQL 
>> database using the following configuration:
>> sql_query_stop UPDATE motion SET length = timestampdiff(SECOND, time_stamp, 
>> '%Y-%m-%d %T')*1000,time_stamp_end = '%Y-%m-%d %T' WHERE filename = '%f'
>> 
>> For some recordings the length is also about 42minutes too high. The 
>> recordings with the wrong Duration and the one with the wrong entry in the 
>> database are not always the same.
>> 
>> 
>> 2) Looking at the logfile it shows that every "ERR" entry is also about 42 
>> minutes too high. How is this possible?
>> 
>> [9:nc9:Tor] [NTC] [NET] [Dec 15 17:11:03] netcam_rtsp_connect: norm: Camera 
>> (Tor) connected
>> [9:nc9:Tor] [NTC] [NET] [Dec 15 17:11:03] netcam_rtsp_connect: norm: Unable 
>> to determine the camera source FPS.
>> [8:nc8:Katzenloch] [NTC] [NET] [Dec 15 17:11:03] netcam_rtsp_connect: norm: 
>> Camera (Katzenloch) connected
>> [9:nc9:Tor] [ERR] [NET] [Dec 15 17:54:10] netcam_rtsp_handler_reconnect: 
>> norm: Reconnecting with camera....
>> [7:nc7:Garten] [ERR] [NET] [Dec 15 17:54:10] netcam_rtsp_handler_reconnect: 
>> norm: Reconnecting with camera....
>> [7:nc7:Garten] [NTC] [NET] [Dec 15 17:12:03] netcam_rtsp_connect: norm: 
>> Camera (Garten) connected
>> [9:nc9:Tor] [NTC] [NET] [Dec 15 17:12:03] netcam_rtsp_connect: norm: Camera 
>> (Tor) connected
>> [9:nc9:Tor] [NTC] [NET] [Dec 15 17:12:03] netcam_rtsp_connect: norm: Unable 
>> to determine the camera source FPS.
>> [7:nc7:Garten] [ERR] [NET] [Dec 15 17:55:10] netcam_rtsp_handler_reconnect: 
>> norm: Reconnecting with camera....
>> [9:nc9:Tor] [ERR] [NET] [Dec 15 17:55:10] netcam_rtsp_handler_reconnect: 
>> norm: Reconnecting with camera....
>> [7:nc7:Garten] [NTC] [NET] [Dec 15 17:13:03] netcam_rtsp_connect: norm: 
>> Camera (Garten) connected
>> [9:nc9:Tor] [NTC] [NET] [Dec 15 17:13:03] netcam_rtsp_connect: norm: Camera 
>> (Tor) connected
>> [9:nc9:Tor] [NTC] [NET] [Dec 15 17:13:03] netcam_rtsp_connect: norm: Unable 
>> to determine the camera source FPS.
>> [1:ml1:Garten] [NTC] [ALL] [Dec 15 17:13:16] motion_detected: Motion 
>> detected - starting event 28.
>> [1:ml1:Garten] [WRN] [DBL] [Dec 15 17:13:16] dbse_firstmotion: Ignoring 
>> empty sql query
>> [1:ml1:Garten] [NTC] [EVT] [Dec 15 17:13:16] event_newfile: Writing movie to 
>> file: /motion/new/Garten/20221215171315.mp4
>> [7:nc7:Garten] [ERR] [NET] [Dec 15 17:56:10] netcam_rtsp_handler_reconnect: 
>> norm: Reconnecting with camera....
>> [7:nc7:Garten] [NTC] [NET] [Dec 15 17:14:03] netcam_rtsp_connect: norm: 
>> Camera (Garten) connected
>> [1:ml1:Garten] [NTC] [EVT] [Dec 15 17:14:29] event_newfile: Writing image to 
>> file: /motion/new/Garten/20221215171346.jpg
>> [1:ml1:Garten] [NTC] [ALL] [Dec 15 17:14:29] mlp_actions: End of event 28
>> [1:ml1:Garten] [NTC] [ALL] [Dec 15 17:14:31] motion_detected: Motion 
>> detected - starting event 29.
>> [1:ml1:Garten] [WRN] [DBL] [Dec 15 17:14:31] dbse_firstmotion: Ignoring 
>> empty sql query
>> [1:ml1:Garten] [NTC] [EVT] [Dec 15 17:14:31] event_newfile: Writing movie to 
>> file: /motion/new/Garten/20221215171430.mp4
>> [7:nc7:Garten] [ERR] [NET] [Dec 15 17:57:10] netcam_rtsp_handler_reconnect: 
>> norm: Reconnecting with camera....
>> [1:ml1:Garten] [NTC] [EVT] [Dec 15 17:15:02] event_newfile: Writing image to 
>> file: /motion/new/Garten/20221215171431.jpg
>> 
>> Best Regards
>>     Stefan
>> 
>>> Am 15.12.2022 um 03:27 schrieb MrDave <[email protected] 
>>> <mailto:[email protected]>>:
>>> 
>>> Just a FYI that I am unable to reproduce this issue.  All durations are 
>>> reported correctly.
>>> 
>>> On 12/14/2022 12:11 AM, Arvid Ihnen via Motion-user wrote:
>>>> HI,
>>>>   thanks for your replies.
>>>> 
>>>> @Tony: Not sure what the viewing of the video has to do with the 
>>>> generation?
>>>> 
>>>> @MrDave: Here is the (hopefully) relevant part of the configuration:
>>>> minimum_frame_time 0
>>>> movie_max_time 0
>>>> movie_output on
>>>> movie_bps 400000
>>>> movie_quality 60
>>>> movie_codec mp4
>>>> timelapse_codec mpg
>>>> movie_duplicate_frames off
>>>> movie_extpipe_use off
>>>> framerate 25
>>>> width 1920
>>>> height  1080
>>>> 
>>>> As far as understood, it is encoded.
>>>> 
>>>> Best Regards
>>>>     Stefan
>>>> 
>>>>> Am 14.12.2022 um 00:55 schrieb MrDave <[email protected] 
>>>>> <mailto:[email protected]>>:
>>>>> 
>>>>> Is this  via the passthrough option or encoded?
>>>>> 
>>>>> 
>>>>> 
>>>>> On 12/13/2022 4:46 PM, Tony wrote:
>>>>>> My suggestion is to observe the output of "top"  for excessive cpu usage 
>>>>>> while viewing the mp4
>>>>>> 
>>>>>> On Dec 13, 2022 14:58, Arvid Ihnen via Motion-user 
>>>>>> <[email protected]> 
>>>>>> <mailto:[email protected]> wrote:
>>>>>> Hi,
>>>>>>   I just upgraded my docker based motion system from 4.3.1 to 4.5.0. 
>>>>>> Since then some of the videos shows a wrong duration. Attached is an 
>>>>>> example of the mediainfo output of a captured video, which is in reality 
>>>>>> about 50 seconds long:
>>>>>> 
>>>>>> General
>>>>>> Complete name                            : 20221213150454.mp4
>>>>>> Format                                   : MPEG-4
>>>>>> Format profile                           : Base Media
>>>>>> Codec ID                                 : isom (isom/iso2/avc1/mp41)
>>>>>> File size                                : 9.02 MiB
>>>>>> Duration                                 : 42 min 16 s
>>>>>> Overall bit rate                         : 29.8 kb/s
>>>>>> Writing application                      : Lavf57.83.100
>>>>>> 
>>>>>> Video
>>>>>> ID                                       : 1
>>>>>> Format                                   : AVC
>>>>>> Format/Info                              : Advanced Video Codec
>>>>>> Format profile                           : Baseline@L4
>>>>>> Format settings                          : 1 Ref Frames
>>>>>> Format settings, CABAC                   : No
>>>>>> Format settings, Reference frames        : 1 frame
>>>>>> Format settings, GOP                     : M=1, N=12
>>>>>> Codec ID                                 : avc1
>>>>>> Codec ID/Info                            : Advanced Video Coding
>>>>>> Duration                                 : 42 min 16 s
>>>>>> Bit rate                                 : 11.9 Mb/s
>>>>>> Width                                    : 1 920 pixels
>>>>>> Height                                   : 1 080 pixels
>>>>>> Display aspect ratio                     : 16:9
>>>>>> Frame rate                               : 25.000 FPS
>>>>>> Color space                              : YUV
>>>>>> Chroma subsampling                       : 4:2:0
>>>>>> Bit depth                                : 8 bits
>>>>>> Scan type                                : Progressive
>>>>>> Bits/(Pixel*Frame)                       : 0.230
>>>>>> Stream size                              : 9.02 MiB (100%)
>>>>>> Writing library                          : x264 core 152 r2854 e9a5903
>>>>>> Encoding settings                        : cabac=0 / ref=1 / 
>>>>>> deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 / 
>>>>>> psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 
>>>>>> 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / 
>>>>>> threads=4 / lookahead_threads=4 / sliced_threads=1 / slices=4 / nr=0 / 
>>>>>> decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / 
>>>>>> bframes=0 / weightp=0 / keyint=12 / keyint_min=1 / scenecut=0 / 
>>>>>> intra_refresh=0 / rc=crf / mbtree=0 / crf=20.0 / qcomp=0.60 / qpmin=0 / 
>>>>>> qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=0
>>>>>> Codec configuration box                  : avcC
>>>>>> 
>>>>>> I did not change any configuration parameter from 4.3.1 to 4.5.0. When 
>>>>>> playing the video (almost) the last frame is displayed for the remaining 
>>>>>> time. Any idea?
>>>>>> 
>>>>>> Many thanks for your help!
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> _______________________________________________
>>>>>> 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>_______________________________________________
>>>>> 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>
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> 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>_______________________________________________
>>> 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>
>> 
>> 
>> 
>> _______________________________________________
>> 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>_______________________________________________
> 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>_______________________________________________
> 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...

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



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

Subject: Digest Footer

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


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

End of Motion-user Digest, Vol 196, Issue 20
********************************************

Reply via email to