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 date-based naming scheme for DVR files and add video metadata #379

Merged
merged 15 commits into from
Jan 5, 2024

Conversation

Master92
Copy link
Contributor

@Master92 Master92 commented Nov 24, 2023

This PR allows users with an active RTC to chose between the conventional naming scheme (i.e. hdz_000, hdz_001 etc.) and a date-based one (i.e. 2023-11-24T13_34_37).
When no rtc battery is present, the user can not change the naming scheme. On top of that, it automatically falls back to the conventional scheme as default.

Further, I added some metadata to the DVR files i.e. a title (currently the file name) and - for mp4 - the date it was created.
Over the course of my research and the implementation, I found out that the ts container does not support any metadata information about the media creation date, hence a note in the sources.

Closes #42
Closes #116

@SumolX
Copy link
Contributor

SumolX commented Nov 30, 2023

I was playing with this feature on the emulator and noticed I'm unable to change the Naming Scheme option because there is no RTC battery installed on the Emulator. Do you think this option should be disabled in a similar fashion to your other PR, if no RTC battery is present then the row is not selectable and has a darker shade?

Perhaps mark the PR as a draft until the other PR has been merged, that way it follows the standard you have set forth. Besides that I think this is great and much more intuitive, especially if a user enables the Date/Time in the Live View... gives them an idea of when they flew.

Actually I could see us temporary blinking the Date/Time in live view when the recording is started.... that way we don't need to have it on permanently.... but that would potentially be a future feature.

Final comment... though its more of a personal preference.... i think we should simplify the timestamp convention to something a little more readable perhaps...

2023-11-24T13_34_37.mp4
to
20231124_133437.mp4

@Master92
Copy link
Contributor Author

I was playing with this feature on the emulator and noticed I'm unable to change the Naming Scheme option because there is no RTC battery installed on the Emulator. Do you think this option should be disabled in a similar fashion to your other PR, if no RTC battery is present then the row is not selectable and has a darker shade?

You're right. I already had that in mind but wasn't sure how to correctly go ahead and mark this PR to lack some work after #369. I'll convert this PR to draft in a minute 👍
Maybe I'll play around a little and try to come up with an RTC mock for emulator builds 😉

Actually I could see us temporary blinking the Date/Time in live view when the recording is started.... that way we don't need to have it on permanently.... but that would potentially be a future feature.

Yeah we should keep that in mind. Perhaps you'd need the user to decide how they want the OSD to behave.

Final comment... though its more of a personal preference.... i think we should simplify the timestamp convention to something a little more readable perhaps...

2023-11-24T13_34_37.mp4 to 20231124_133437.mp4

That's actually a good idea imho. That way you could navigate your files easier by just typing the digits instead of having to add the dashes, too. The only thing I'd change is separating the date from time with a dash instead of an undesrscore like so: 20231124-133437.mp4. What do you think about that?
I came up with the current scheme through Wikiwix's comment in #123.

@Master92 Master92 marked this pull request as draft November 30, 2023 07:13
@Master92 Master92 marked this pull request as ready for review November 30, 2023 08:47
@SumolX
Copy link
Contributor

SumolX commented Nov 30, 2023

I like your dash format better, all keys are in the same row on the keyboard.

@Master92
Copy link
Contributor Author

That was a pure coincidence, they aren't on my (German) keyboard 😆

@ligenxxxx ligenxxxx merged commit 7c2a143 into hd-zero:main Jan 5, 2024
1 check passed
@evilC
Copy link
Contributor

evilC commented Jan 5, 2024

Liking it, great!
Any thoughts, however, on #359 ?

@evilC
Copy link
Contributor

evilC commented Jan 23, 2024

It's worth noting that it appears that this PR also changed hot clip naming? (At least I assume it was this PR, I see that mark_video_file changed.)
Previously, if you had no hot clips and hot clipped DVR file hdz_028, it would become hot_hdz_001, but now it becomes hot_hdz_028.
I kind of like it to be honest, it helps you know where the file was in the sequence of DVR files - without the RTC mod, this was impossible to know for sure with the old system.
It also seems that the next clip will be hdz_029 - ie hdz_028 would not get used again, so you would not end up with a hot_hdz_028 and a hdz_028, so even if this was unintentional, I see no real need to change it back to how it was.

@Master92
Copy link
Contributor Author

That was indeed unintentional 😅

@evilC
Copy link
Contributor

evilC commented Jan 24, 2024

@Master92 If we do intend to keep it as it currently is, then we should probably remove unused code

@Master92
Copy link
Contributor Author

@evilC agreed. I'm currently working on that file for the date-folder feature and will try to keep removing that in mind 👍

@evilC
Copy link
Contributor

evilC commented Jan 24, 2024

@Master92 I could maybe get rid of it as part of PR #389 ?

@Master92
Copy link
Contributor Author

@evilC I'd be okay with that as well 😉👍

@Master92 Master92 deleted the dvrFileNames branch February 8, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Support timestamp in DVR metadata Feature request: Improve the DVR filename convention
4 participants