Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add object tag data to mp4 chapters and or mp4 files as they are created #3847

Open
bagobones opened this issue Sep 15, 2022 · 5 comments
Open
Labels
enhancement New feature or request pinned

Comments

@bagobones
Copy link

bagobones commented Sep 15, 2022

Describe what you are trying to accomplish and why in non technical terms
Recordings are a more complete accounting of a period of time, recordings could act as a better long term archive if they where self describing with useful tags of what they contain.

Describe the solution you'd like
Add MP4 chapter tags when an event starts so it is visible in players like VLC playing back a recording.
Add MP4 tags to the mp4 files created so that they can be quickly searched for ones that contain object events outside of frigate and act as a stand along archive.

Tags would include Frigate time stamp in local or UTC formatted, object and zones so if the file is moved or copied the context of the time of the event is not lost.

Describe alternatives you've considered
Just using Frigate as is.

Additional context
As I currently understand it frigate only stores events / object time stamps in its own database? If the DB is corrupt lost or you move a recording or change storage paths the link is essentially lost.

When providing a clip or set of clips to law enforcement having internalized time stamps and object annotations would be helpful in the standard video files. For long term arching being able to use tools to search ONLY for files with tags in them and move those to cold storage would be very nice.

A number of NVR solutions offer options to lock retain files or move old files to long term storage.

Adding these tags might allow additional external tools to also be developed to act on archived files etc.

@bagobones bagobones added the enhancement New feature or request label Sep 15, 2022
@NickM-27
Copy link
Sponsor Collaborator

Just a few things to add:

As I currently understand it frigate only stores events / object time stamps in its own database? If the DB is corrupt lost or you move a recording or change storage paths the link is essentially lost.

Not sure on the meaning of "only" but the recordings are split into 10 second segmenta and frigate already has info on each segment as far as if it contains motion // objects. We're planning on revamping the recordings view to use this information on playback so the user can see what happened.

We don't want to tie a segment to just one event as multiple events can happen on the same camera at the same time, but there's definitely metadata that can be included like you explained.

Potentially related:
#2525

@bagobones
Copy link
Author

Not sure on the meaning of "only" but the recordings are split into 10 second segmenta and frigate already has info on each segment as far as if it contains motion // objects.

I mean that without frigate the mp4 files contain no object or event information. I am aware they are folder sorted by date and in 10 second segments. The idea behind adding object meta data to the files themselves via chapters / file metadata is to ensure that that info is not lost if the files / folders are orphaned from the frigate application / DB or so they could be archived / processed separately from frigate.

Another example would be in the future having an export function that would write one large file for a period of time by joining all the segments but including chapter markers would retain some of the useful detection data for a 3rd party.

@bagobones
Copy link
Author

To follow up on this based on recent development it seems like having this in an archive or export function would be the best place as it has been repeatedly stated that the main segment files should not be read directly.

So changing this slightly to be add chapter markers when exporting clips so it is easier to review them outside of frigate and retain some of the useful object detection / events.

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Jul 2, 2024

that makes sense to me, also could be optional via the api / ui potentially

@bagobones
Copy link
Author

At the very lease I kind of see this as being you export a time range and the the EVENT/Alerts it crosses get turned into chapter marker STARTS..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pinned
Projects
None yet
Development

No branches or pull requests

2 participants