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

Exports should have timestamps in the export filename title #15559

Open
tearfulnumpty opened this issue Dec 17, 2024 · 3 comments
Open

Exports should have timestamps in the export filename title #15559

tearfulnumpty opened this issue Dec 17, 2024 · 3 comments
Labels
enhancement New feature or request pinned

Comments

@tearfulnumpty
Copy link

Describe what you are trying to accomplish and why in non technical terms
Title. Exports should reflect the exported time (and date) in the output filename.

It's fine to keep the export_id as well, but both the start and stop times should be included in the actual filename. Date is less necessary, but I think it would also be helpful.

Describe the solution you'd like
Specifically, the output filename could resemble: {camera_name}_{export_id}_{date}_{start_time}_{end_time}.{container}

Describe alternatives you've considered
Alternatively, it could be included in metadata, but I think the filename makes more sense.

Additional context
The only potential reason not to do this that I can think of would be filename length restrictions on some OS/FS, but I don't know that this would actually be a realistic issue. If it is, then perhaps this can be left as an option to the user.

I think this is an incredibly valuable feature, especially since the only way to obtain the raw underlying video in Frigate is via export (direct file access isn't easily accessible for use due to 10s splitting).

@tearfulnumpty tearfulnumpty added the enhancement New feature or request label Dec 17, 2024
@tearfulnumpty
Copy link
Author

Actually having thought about it for a second, it may make more sense to put the export_id after the date information. This would make sorting the file much easier.

I see an argument for the following two naming conventions:

  1. {camera_name}_{date}_{start_time}_{end_time}_{export_id}.{container}
  2. {date}_{start_time}_{end_time}_{camera_name}_{export_id}.{container}

It could be useful to sort by camera, and it could be useful to sort by date. Perhaps a user configurable option for both would be nice. If an option isn't desired, then I think either of the two suggestions here are better than having the export_id before the date as both still reflect a sort of time much better than the OP proposal.

@tearfulnumpty tearfulnumpty changed the title Exports should time timestamps in the export filename title Exports should have timestamps in the export filename title Dec 17, 2024
@tearfulnumpty
Copy link
Author

I should also mention that if this is implemented, there needs to be a way to find the filename of the export on the filesystem. Currently the filename is just the export id, but this would change that and potentially break some tools built on top of that assumption.

@NickM-27
Copy link
Collaborator

the path is already a field stored in the DB / API response, and existing export names won't change

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