Zoneminder 1.36.24 (PPA), Ubuntu Server 22.04, Nginx.
When the event playback starts the total event duration shown by the player is less than the event length. As the playback continues the total duration shown by the player will increase, the playback bar's length will re-adjust and at some point the length finally reaches correct value - 10:00.
This is a problem because the playback bar does not map nicely to the red areas that show alarmed frames. They do end up matching when the player finally loaded the entire video and the total event length is correct. This can be forced by scrolling to the end of the event which forces the player to load the rest of the content from the server.
This is how playback bar looks when the event starts (total duration shown - 6:04):
The playback area marked with alarmed frames does not correspond to the actual alarmed frames:
Finally at the end of the playback the whole video is loaded and the total duration is shown correctly (10:00). At this point the red zone corresponds properly to the alarmed frames:
It appears that the server serves the video content in chunks using "206 Partial Content" header and the player uses the currently available playback duration as the value for the overall duration. In the previous version of Zoneminder I used (1.34) the player was always showing correct total duration and the progress bar was showing how much content was downloaded from the server with an additional gray bar (similar to how YouTube player does it).
Does anybody know what can be done to fix it?
Event playback - incorrect total duration
Event playback - incorrect total duration
Last edited by ncpv on Tue Sep 20, 2022 12:33 am, edited 1 time in total.
Re: Event playback - incorrect total duration
I was also using for a long time 1.34 but now i'am on 1.36 and notice the same problem.ncpv wrote: ↑Thu Aug 25, 2022 3:43 pm In the previous version of Zoneminder I used (1.34) the player was always showing correct total duration and the progress bar was showing how much content was downloaded from the server with an additional gray bar (similar to how YouTube player does it).
Does anybody know what can be done to fix it?
Did you (or someone else) has a solution for this?
Re: Event playback - incorrect total duration
I did not find the solution, but I did some experiments and tried watching the recorded mp4 video file directly in Firefox by opening it in a separate tab (not in Zoneminder). The built-in Firefox video player behaved in the same way - total duration of the video was shown incorrectly and as the playback was progressing the total duration was increasing until it finally loaded the whole video and showed the correct duration, so the problem is not specific to Zoneminder video player.
Interesting enough, video files recorded by the previous version of Zoneminder load correctly in Zoneminder player and directly in Firefox.
So, it appears that the culprit is this new version of Zoneminder. I think it is related to how Zoneminder encodes the recorded video to make the ongoing event playback possible without needing to wait until the event ends.
In previous version of Zoneminder I used I could not watch the mp4 video for the ongoing event. In this version of Zoneminder (1.36.24) it is possible to watch the mp4 video recording of the event while it is still being recorded. I think the Zoneminder encodes the video in a certain way to make this functionality possible and it has this side effect that the total duration of the video is not always displaying correctly.
Re: Event playback - incorrect total duration
Thx for your reply !
You are right about Firefox because i also use it.
Maybe there is an option in ZM to disable this function (watch mp4 while recording).
For know i have no idea's.
You are right about Firefox because i also use it.
Maybe there is an option in ZM to disable this function (watch mp4 while recording).
For know i have no idea's.