Page 1 of 1

Alert timestamps metadata on video when using passthrough

Posted: Sun Jan 21, 2024 6:11 pm
by smoothmission
In the web video player the navbar has red marks for when an alert was active. This feature is lost on passthrough video files.
Native video players such as mpv and vlc have support for chapters which could be utilized for this purpose.

Implementation idea

ffmpeg supports a simple metadata file for creating chapters, which then can be inserted in to a video.
https://ffmpeg.org/ffmpeg-formats.html#Metadata-1

I'd like to help make the feature but I need some pointers of where in the source relevant code is.
Where does zoneminder copy the video of an ended event to its final path?
Where is an example of how to loop through all the alert timestamps?

Re: Alert timestamps metadata on video when using passthrough

Posted: Sun Jan 21, 2024 10:16 pm
by iconnor
In 1.37 the red marks should be there regardless of player.

Video writing happens in zm_videostore.cpp

Re: Alert timestamps metadata on video when using passthrough

Posted: Sun Jan 21, 2024 11:47 pm
by smoothmission
You mean the player in the web browser? I mean the player playing .mp4 files natively on the computer.

zm_videostore.cpp only seems to contain writing of frames. What is the file for when zoneminder renames/moves the temporary "NewEvent" video file to its final name, when the event has ended? That could be a good time to run ffmpeg on the file to import the chapters.

Re: Alert timestamps metadata on video when using passthrough

Posted: Mon Jan 22, 2024 4:22 pm
by iconnor
zm_event.cpp