Page 1 of 1

Timeline shows just 1 frame / event

Posted: Fri May 08, 2020 12:08 pm
by Henri
My configuration is ZM 1.34.11 running on Ubuntu 18.04
If i start timeline view for several (recording) events on one Monitor the Mouseover on the timeline shows just one frame per event.
That means if my event section lengt is 3 minutes the picture changes just every 3 timeline minutes on not as in 1.32.3 where i can see several pictures/frames during the timeline mouseover.
This makes the timeline useless because you can not find out what happens inside an event, specialy if your section lengt is high (10 minutes or more).

Re: Timeline shows just 1 frame / event

Posted: Sun May 10, 2020 12:17 pm
by Henri
Is there someone else with the same problem or is nobody using the timeline feature.

Re: Timeline shows just 1 frame / event

Posted: Tue Nov 17, 2020 10:57 pm
by td
Hello Henri,

same with me, version 1.34.21.
When hovering the mouse ove the timeline exactly one image is displayed. When hovering further the displayed image does not change.

Best
td

Re: Timeline shows just 1 frame / event

Posted: Tue Dec 01, 2020 4:20 pm
by leewells
I'm seeing the same problem on 1.34.22 on Ubuntu 18.04.5. I just upgraded from 1.30.4 yesterday, and it was working fine before the upgrade.

I see it on monitors that are capturing jpg frames, as well as ones that are capturing h264 video. For the monitors recording video, I can see one NNNNN-capture.jpg get generated in the events directory, but no more if I move the mouse. If I go out and back into the timeline view, then it will generate one more -capture.jpg for a different frame.

So far I can't find any errors in the apache logs, or in the zoneminder logs (I even turned on debug logging for a bit).

--Lee

Re: Timeline shows just 1 frame / event

Posted: Tue Dec 01, 2020 8:16 pm
by burger
Related: viewtopic.php?f=42&t=29925

I wonder if adding 'savejpegs' will fix the timeline. With just x264 encode, I'm guessing it uses the one jpeg from where the movies are stored, but per previous post, maybe not.

Re: Timeline shows just 1 frame / event

Posted: Tue Dec 01, 2020 8:21 pm
by leewells
burger wrote: Tue Dec 01, 2020 8:16 pm I wonder if adding 'savejpegs' will fix the timeline. With just x264 encode, I'm guessing it uses the one jpeg from where the movies are stored, but per previous post, maybe not.
I see the problem on monitors with savejpegs, and without. I could understand the convert from h264 to jpeg to cause an issue..... but it happens even when the *-capture.jpg files are already sitting in the events directory (monitors with savejpegs on).

--Lee

Re: Timeline shows just 1 frame / event

Posted: Thu Dec 03, 2020 9:11 pm
by leewells
I did a little more digging, and I see about 3 or 4 GET requests in the apache logs to get 1 frame of an event in the timeline when I mouseover it.
But if I move the mouse around some more, no additional requests are sent from the browser to apache.

I'm thinking this problem is on the browser side of things.

I can see another 3-4 GETs if I move to a 2nd event in the same timeline, but if I then move back to the original event, there are no more requests made.
It seems we get one mouseover action fired per event, and then no more until you reload the page, or pan the timeline.

--Lee

Re: Timeline shows just 1 frame / event

Posted: Wed Dec 09, 2020 4:28 pm
by leewells
I think I have a fix. The problem was that previewEvent() in timeline.js would never request additional frame data after it had data for 1 event in the frame. With this change it will now call requestFrameData() if it doesn't have the frame already.

Code: Select all

diff --git a/web/skins/classic/views/js/timeline.js b/web/skins/classic/views/js/timeline.js
index 8742ac67b..b517a6a82 100644
--- a/web/skins/classic/views/js/timeline.js
+++ b/web/skins/classic/views/js/timeline.js
@@ -132,7 +132,7 @@ function requestFrameData( eventId, frameId ) {
 function previewEvent(slot) {
   eventId = slot.getAttribute('data-event-id');
   frameId = slot.getAttribute('data-frame-id');
-  if ( events[eventId] ) {
+  if ( events[eventId] && events[eventId]['frames'][frameId] )  {
     showEventData(eventId, frameId);
   } else {
     requestFrameData(eventId, frameId);
It's working for me on 1.34.22, but I'll keep testing it out to make sure.
--Lee

Re: Timeline shows just 1 frame / event

Posted: Wed Dec 09, 2020 5:46 pm
by td
Wonderful and thank you!
Works fine for me.
But, on the risk of sounding naive: why are there so few experiencing this problem?

Best
td

Re: Timeline shows just 1 frame / event

Posted: Wed Dec 09, 2020 7:19 pm
by leewells
I wondered the same thing at first. Maybe not many people use the timeline?? I haven't seen anyone post that the timeline was showing multiple frames per event for them in 1.34.

I started out assuming it was something broken in my upgrade from 1.29 to 1.34. But then found the apache logs weren't showing requests, then chased it into the browser.

It looks like its been this way since 29Sep2019. The old logic had 3 tests before it would call showEventDetail(), otherwise it would call requestFrameData(), so ended up making additional requests for new frames.

--Lee

Re: Timeline shows just 1 frame / event

Posted: Wed Dec 09, 2020 8:47 pm
by td
There are more things in Heaven and Earth …

Thank you.
td

Re: Timeline shows just 1 frame / event

Posted: Wed Dec 16, 2020 3:53 pm
by leewells
A slight tweak to the fix. I had seen an error in the log with the first version when I would mouse over events that were stored as mp4 files instead of image captures.

Code: Select all

diff --git a/web/skins/classic/views/js/timeline.js b/web/skins/classic/views/js/timeline.js
index 3eacc2529..44551824f 100644
--- a/web/skins/classic/views/js/timeline.js
+++ b/web/skins/classic/views/js/timeline.js
@@ -132,7 +132,7 @@ function requestFrameData( eventId, frameId ) {
 function previewEvent(slot) {
   eventId = slot.getAttribute('data-event-id');
   frameId = slot.getAttribute('data-frame-id');
-  if ( events[eventId] ) {
+  if ( events[eventId] && events[eventId]['frames'] && events[eventId]['frames'][frameId] )  {
     showEventData(eventId, frameId);
   } else {
     requestFrameData(eventId, frameId);
--Lee

Re: Timeline shows just 1 frame / event

Posted: Thu Dec 17, 2020 2:10 pm
by Henri
Thank you leewells this solved my problem :-)