Upgrading Montage Review page

Current Development version likely to have breaking changes
IgorA100
Posts: 132
Joined: Sat Feb 03, 2024 11:55 am

Re: Upgrading Montage Review page

Post by IgorA100 »

I've already redone everything...
The array is not large; it stores only one event for each monitor. Not even a complete event, but only a few parameters necessary for work.
I used exactly the array in which the objects are stored. This made it easier to organize access to the event. The array was iterated through "for" to eliminate unnecessary iterations. But now it doesn't matter...
The code is not much more complicated.
So maybe just treat the EventId as a string and not an integer.
Ok, I'll take that into account.
IgorA100
Posts: 132
Joined: Sat Feb 03, 2024 11:55 am

Re: Upgrading Montage Review page

Post by IgorA100 »

The CMD_STOP command does not work to stop a running Event.
I run the command something like this:

Code: Select all

  $j.getJSON(data.monitorUrl+'?'+auth_relay, {
        command: CMD_STOP,
        connkey: connkey,
        auth: auth_hash,
        view: 'request',
        request: 'stream',
        monitorUrl: monitor.url
      })
      .done(getCmdResponse)
      .fail(logAjaxFail);
}
Currently I have a problem with command support: CMD_STOP & CMD_MAXFPS
IgorA100
Posts: 132
Joined: Sat Feb 03, 2024 11:55 am

Re: Upgrading Montage Review page

Post by IgorA100 »

Another problem.
1. I start replaying the event by changing the SRC from anywhere, having received the “frame” I need (calculation by time and frames)
2. The event starts playing within a couple of seconds (not instantly). If you send the CMD_SEEK command at this moment, there will be an error, because There is no socket yet.
I have already written about this problem.
My algorithm is this:
When you click on the Timeline, I check whether the click was on an event that is already playing or not.
- If the click was on an event that is being played back, then I send the CMD_SEEK command (necessary in order not to interrupt the current broadcast. It’s more beautiful and the image won’t disappear)
- Otherwise, I generate a new SRC specifying "frame".
So, if you click on an event that is not yet being played back, and immediately click on it again, a socket error appears. In this case, playback will start from the time of the first click, and not the second.
This is a significant problem that I cannot solve.
User avatar
iconnor
Posts: 3067
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Upgrading Montage Review page

Post by iconnor »

YOu should not need to change src. That will be too slow. You should be able to seek outside of the current event. ZMS should figure out if it needs to load another event We may need to fix things in zms, but that is the only way this will be performant.
IgorA100
Posts: 132
Joined: Sat Feb 03, 2024 11:55 am

Re: Upgrading Montage Review page

Post by IgorA100 »

iconnor wrote: Sat Jul 13, 2024 2:10 pm ZMS should figure out if it needs to load another event We may need to fix things in zms,
I did not get anything.
How can I force ZMS to start playing the next event at a specific time without changing the SRC?
Or is this just your thought?
Of course, ideally let ZMS decide when to start replaying an event. But now I don't see any other solution other than changing the SRC.
IgorA100
Posts: 132
Joined: Sat Feb 03, 2024 11:55 am

Re: Upgrading Montage Review page

Post by IgorA100 »

In principle, I think it would be enough to send some kind of ZMS command that you need to start playing the event "XXX" from time "YYY". I handle everything else without any problems.
But, unfortunately, the last time I wrote in C++ was about 15 years ago.
IgorA100
Posts: 132
Joined: Sat Feb 03, 2024 11:55 am

Re: Upgrading Montage Review page

Post by IgorA100 »

I calculate the frame number by time, but I noticed that in recorded events the FPS is variable and not constant. I don't know why it was done this way. But with variable FPS it is impossible to correctly calculate the frame number based on time.
User avatar
iconnor
Posts: 3067
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Upgrading Montage Review page

Post by iconnor »

I havn't seen a lot of variable fps videos in my time with ZM.

This one of the reason why we store frame information in the db. THe original way of storing video was in jpegs and yeah we would speed up the recording when motion was happening. When mp4 came along, timing is stored in the mp4.

If you tell zms to jump to a specific time, it will seek through the mp4 in order to do exactly that.

The code may not be great, but it generally works I think. and I can help with the C++ side of things.
IgorA100
Posts: 132
Joined: Sat Feb 03, 2024 11:55 am

Re: Upgrading Montage Review page

Post by IgorA100 »

iconnor wrote: Sun Jul 14, 2024 9:41 pm If you tell zms to jump to a specific time
How, what command can this be done now?
IgorA100
Posts: 132
Joined: Sat Feb 03, 2024 11:55 am

Re: Upgrading Montage Review page

Post by IgorA100 »

Today I realized that the CMD_VARPLAY command (sets "rate") is not working properly.
Only Rate=100 works correctly
This is clearly visible on the Event page.
Those. with rate=200, the playback speed increases slightly, but not twice, but maybe by 30-40%.
I'm confused.

ADDED: rate=100, rate=200 ..... is the value in the SRC line. When I executed the CMD_VARPLAY command, of course I specified rate: 1 or rate: 2 or ...
Post Reply