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 OSD overlay tool #243

Merged
merged 2 commits into from
Feb 27, 2023
Merged

Add OSD overlay tool #243

merged 2 commits into from
Feb 27, 2023

Conversation

Knifa
Copy link
Contributor

@Knifa Knifa commented Dec 1, 2022

Time to start pulling this together! I think it works well enough that it's worth getting it merged and dealing with it from there.

Tried to keep the TS as separate as possible as suggested. All the main functionality is under osd-overlay in TS in it's own little bubble. The UX components are plain JS.

All of the processing is done in a web worker to keep it all separate on that front.

Remaining WIP tasks, I think:

  • Pepper in translations where they should be!
  • Rework UX generally. I'm not particularly happy with the layout, etc. You should be able to grab all of your files in a big bundle and just drag them onto the page and let it figure it out for you, e.g.
  • Expose errors in UX rather than getting folk to dig into developer console.

The MP4 parsing, etc. needs broken out into it's own library because it's absolutely useful for other things. Bit of a longer term goal for me.

@Knifa Knifa force-pushed the knifa/rec-overlay branch 2 times, most recently from 06fb8e8 to 52d1d00 Compare December 1, 2022 14:32
src/osd-overlay/.eslintrc Show resolved Hide resolved
package.json Show resolved Hide resolved
package.json Show resolved Hide resolved
@Knifa Knifa force-pushed the knifa/rec-overlay branch 2 times, most recently from 50044e5 to 7846d02 Compare December 3, 2022 12:48
@stylesuxx
Copy link
Collaborator

Hey @Knifa - thank you first of all for your contribution!
Since you are still pushing stuff, you want me to start reviewing now, or should I wait for your go?

@Knifa
Copy link
Contributor Author

Knifa commented Dec 4, 2022

Hey @Knifa - thank you first of all for your contribution! Since you are still pushing stuff, you want me to start reviewing now, or should I wait for your go?

Let's hang tight for a full review the now --- think I'll try get the UX sorted before I mark it as ready then we can go from there legit!

@stylesuxx
Copy link
Collaborator

Roger that! From what I've seen my biggest "complaint" are the translations. Apart from that everything else is looking nice. Now seeing it, I don't even hate the TS implementation - we can migrate stuff piece by piece to TS at some point.

@Knifa Knifa marked this pull request as ready for review December 11, 2022 19:24
@Knifa
Copy link
Contributor Author

Knifa commented Dec 11, 2022

@stylesuxx I'll take a review now! The drag/drop component could maybe do with a bit more juice in terms of hover effects, etc. but maybe splitting hairs at this point --- would be good to get it in and make it better from there (or some ideas of what it should do).

Let me know what you want from a translations perspective!

@Knifa Knifa changed the title WIP: Add OSD overlay tool Add OSD overlay tool Dec 11, 2022
@stylesuxx
Copy link
Collaborator

@Knifa Regarding translations, I mentioned it in a couple of places. I also see that you have a translation file in place, so if you could just move all your translations there and replace them in the template with the according call to the translation function that would be awesome. You only need to do this for EN, all other languages (as long as the file is present) will be populated by Crowdin anyway.

Could you maybe also attach some (short) sample input and expected output files? I'd like to give it a run later on, but might not have my devices available...

@Knifa
Copy link
Contributor Author

Knifa commented Dec 13, 2022

Thanks! I'll go ahead and put the translations placeholders in shortly.

I've just added a debug panel as a last little extra there to try diagnose some of the issues we're seeing where the process doesn't complete on some machines --- don't expect to add anything more substantial beyond this.

Also, I thought about putting together a bit of a flow diagram if it's helpful?

Test pack with inputs + example output: https://drive.google.com/file/d/1bfOlO9alk1ncx8DFv7En8ONrZQ8op50G/view?usp=sharing

@stylesuxx
Copy link
Collaborator

Awesome, thank you. Flow diagram sounds great, the more documentation the better ;-) Feel free to add a section to the readme explaining the process. Also thanks for the test files - greatly appreciated.

@Knifa
Copy link
Contributor Author

Knifa commented Dec 18, 2022

I totally reworked the processing pipeline today after realising some things I hadn't before with the WebCodecs API --- think this should resolve some of the weird problems we've been seeing AND it's much more obvious what the flow is, I think. Still plan to put together some documentation.

Everywhere that has text uses the translations now, hopefully it's all OK!

@stylesuxx
Copy link
Collaborator

@Knifa - thank you. I still see some translations that are not in the translations files - just wanted to ask if you missed to push them. It's not a big deal, I can add them myself too.

Apart from the documentation - are you happy with the current state right now, because if so, I would give it a final look over and get ready for merging.

I would really like to release a new version with all the other features and would like to include the overlay, but I don't want to put you under pressure - if you feel you need more time, then I will simply do an intermediate release and add this feature later on. Just thought it'd be cool to have this awesome feature included as one of the shiny, nice, new things :-)

@stylesuxx stylesuxx linked an issue Dec 19, 2022 that may be closed by this pull request
@Knifa
Copy link
Contributor Author

Knifa commented Dec 19, 2022

@stylesuxx: Sorry, the nav and tiles totally slipped my mind! That's them added now.

And yeah, please go ahead and give me the review. I'm happy with how it's put together, generally!

Copy link
Collaborator

@stylesuxx stylesuxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, generally speaking everything is looking (and working) very well, just some minor nit picks are still left.

I would just ask you to go over the "TODOs" and add them into an issue, could be a collection of all the TODOs, or split up in multiple issues - how you see fit. This way people could take up the task of implementing those TODOs. In my personal experience, if they are only in code, they are left there to die and nobody is ever going to look at them again...

src/features/home/Tiles.jsx Outdated Show resolved Hide resolved
src/features/navigation/Header.jsx Outdated Show resolved Hide resolved
src/features/navigation/Header.jsx Outdated Show resolved Hide resolved
src/features/osd-overlay/OsdOverlay.jsx Outdated Show resolved Hide resolved
src/features/osd-overlay/OsdOverlay.jsx Outdated Show resolved Hide resolved
src/features/osd-overlay/OsdOverlay.jsx Outdated Show resolved Hide resolved
src/features/osd-overlay/OsdOverlay.jsx Outdated Show resolved Hide resolved
src/features/osd-overlay/FileDrop.jsx Outdated Show resolved Hide resolved
src/osd-overlay/mp4/index.ts Outdated Show resolved Hide resolved
src/osd-overlay/mp4/parsers.ts Outdated Show resolved Hide resolved
@Knifa
Copy link
Contributor Author

Knifa commented Jan 24, 2023

Thanks for your review @stylesuxx! Think that's it all tidied up.

I've created an issue to track the remaining TODOs: #278

@stylesuxx
Copy link
Collaborator

This is looking good - thank you so much! I will give it another test run tomorrow and merge it if I can't find anything else to nit pick :-)

In case you are keen to keep some things in separate commits, please squash, otherwise I will squash everything into a single commit.

@Knifa
Copy link
Contributor Author

Knifa commented Jan 25, 2023

Nice, thanks! Happy to have it all squashed into one commit when merged. 👍

@Knifa
Copy link
Contributor Author

Knifa commented Feb 10, 2023

@stylesuxx I've sorted the conflicts that cropped up from the develop force-push so this is all looking good again (there were actually none, it was just upset about the history). I've squashed it myself 💪

@stylesuxx stylesuxx merged commit 42951d1 into fpv-wtf:develop Feb 27, 2023
@stylesuxx
Copy link
Collaborator

@Knifa - thank you for your patience and contribution - finally merged.

@stylesuxx stylesuxx added this to the V2.0.0 milestone Mar 12, 2023
@Knifa Knifa deleted the knifa/rec-overlay branch March 26, 2023 00:53
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.

Bake OSD into FPV footage
4 participants