Event playback - incorrect total duration
Posted: Thu Aug 25, 2022 3:43 pm
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?
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?