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

Improvements to OSD options #46

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

X-Stuff
Copy link

@X-Stuff X-Stuff commented Apr 1, 2024

Playback offset

By default Avatar goggles split video files by 5 minutes (or by size 1.1GB). Video file splitted correctly but OSD file has approximately 5 seconds of lost data. Current option Adjust playback speed artificially increases OSD file duration and thus scales OSD frame time.

This changes introduce new type of solving this problem. Instead of streching OSD render - it just can be delayed by some amount of time to exactly match the video.

Includes UI changes:

  • Added slider for playback offset amount. Slider enabled only if Adjust playback speed setting is disabled.
    image image
  • auto button calculates and set duration difference as playback offset amount.
  • Added warning icon next to OSD file duration to show user if it mismatches video duration
    image

Character size setting

As end user I want to have more control of how OSD data is rendered,
For my personal opinion, rendered for 1080p OSD overlay glyphs looks quite heavy. I want to have smaller character size for OSD overlay.

This PR gives user more control of rendering result.
Default size is set on video file load with size selection logic as it was during frame rendering.

Different scaling

This commit also introduces a slightly different way to position overlay glyphs. You need only to know your OSD dimensions (rows and columns), this is something that should be in OSD file, however I didn't find a format specification so just took data from official website of betaflight. (TODO: should be checked with iNAV and other firmwares)

Includes UI changes:

  • UI for character size selection
    Size Result
    Race image
    Small image
    Large image
    XLarge image
    Ultra Large image

X-Stuff added 4 commits April 2, 2024 00:14
## Playback offset

By default Avatar goggles split video files by 5 minutes (or by size 1.1GB). Video file splitted correctly but OSD file has approximately 5 seconds of lost data.
Current option `Adjust playback speed` artificially increases OSD file duration and thus scales OSD frame time.

This changes introduce new type of solving this problem.
Instead of streching OSD render - it just can be delayed by some amount of time to exactly match the video.

Includes UI changes:
 * Added slider for playback offset amount. Slider enabled only if `Adjust playback speed` setting is disabled.
 * Added auto button - which calculates and set duration difference as playback offset amount.
 * Added warning icon next to OSD file duration to show user if it mismatches video duration

## Character size setting

 As end user I want to have more control how osd data is rendered,
For my personal optinon, rendered for 1080p OSD overlay glyphs looks quite heavy. I want to have smaller character size for OSD overlay.

This commit also introduces a slightly diffent way to position overlay glyphs. You need only to know your OSD dimensions (rows and columns), this is something that should be in OSD file, however I didn't find a format specification so just took data from official website of betaflight.
(TODO: should be checked with iNAV and other firmwares)

Default size is set on video file load with the same logic as it was.

Includes UI changes:
 * UI for character size selection
@avsaase
Copy link
Owner

avsaase commented Aug 21, 2024

Firmware 36.42.4 added support for exFAT formatted SD cards which removed the 4GB file limit. I think they also fixed the issue of the OSD getting out of sync with the video. With those improvements I think there is no need to add options to synchronize the video and OSD. In fact, I'm going to remove the "Adjust playback speed" option to keep the tool as simple as possible.

Re the font scaling: My main goal with this tool is to enable rendering the video as close as possible to how it looks in the goggles so I'm inclined to say it's out of scope for this project. I need to think about it for a bit.

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.

2 participants