Alert timestamps metadata on video when using passthrough

Anything you want added or changed in future versions of ZoneMinder? Post here and there's a chance it will get in! Search to make sure it hasn't already been requested.
Post Reply
smoothmission
Posts: 6
Joined: Sun Jan 14, 2024 5:10 pm

Alert timestamps metadata on video when using passthrough

Post 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?
User avatar
iconnor
Posts: 3197
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Alert timestamps metadata on video when using passthrough

Post by iconnor »

In 1.37 the red marks should be there regardless of player.

Video writing happens in zm_videostore.cpp
smoothmission
Posts: 6
Joined: Sun Jan 14, 2024 5:10 pm

Re: Alert timestamps metadata on video when using passthrough

Post 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.
User avatar
iconnor
Posts: 3197
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Alert timestamps metadata on video when using passthrough

Post by iconnor »

zm_event.cpp
Post Reply