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 screen recorder as a tool (Not for game footage) #1299

Merged
merged 31 commits into from Dec 14, 2023

Conversation

XK9274
Copy link
Member

@XK9274 XK9274 commented Dec 1, 2023

Target 4.3 [#1165]

Adds screen record ability for demoing apps/content/features/bugs

Not really suitable for games in current build as it's CPU encoding. There is a mi_venc module that I'm currently unable to work out.

  • Will add a screen recorder tool to the Tweaks -> Tools -> Screen recorder control
  • Submenu with the following options:
    • Toggle indicator icon - Flashes/shows an icon (depending on which app you're in) to remind you you're recording
    • Toggle countdown pulse - Pulses the screen white 3 times as a count in to starting recording (3 - 2 - 1 - go), also does the same when stopping to signify it's stopped.
    • Toggle hotkey - Enables or disables the hotkey to start/stop recording (Hold MENU+A for 2 seconds)
    • Reset screen recorder - Hardkills ffmpeg, removes all flags and stops any recording
    • Delete all recordings - Probably not needed, but it's a quick way to delete all recordings in the directory
  • Could benefit from overclocking
  • Stripped/basic version of ffmpeg with "just enough" (but has neon support) compiled in for this function. I can recompile with more as and when required.
MENU MENU

VIDEO LINK

XK9274 and others added 9 commits November 29, 2023 00:07
Adds menu structure
Working functions:
- Start/stop
- Delete all
- Reset ffmpeg
- Sticky integration

Todo:
- Compile a smaller ffmpeg (less functions included)
- Indicator functions
- Countdown functions
- Global hotkey
Add hotkey toggler and logic to keymon (Menu+A) (disabled by default)
Add logic for countdown and indicator (disabled by default)
Add indicator resource
Add fresh compile of ffmpeg with everything stripped apart from whats needed for this feature (but does contain NEON)
Add libx264 for ffmpeg
Don't add as tool but add to tools menu
Move define to settings.h
Update shell script for controlling screen recorder with better structure
Change cmdline of ffmpeg to a faster encode (still CPU bound)

TODO:
maybe integrate indicator into source instead of using imgpop (but still use imgpop for mainUI) to stop the flickering in UI's of the indicator dot
- Menu + A key now starts but must be held for 2 seconds
- RGB Changing now just pulses white(r) 3 times to signify started,
- Ending now pulses 3 times to signify stopped.
@XK9274 XK9274 marked this pull request as draft December 1, 2023 22:20
- Pulse is slower when ran on menu items than hotkeys? Add logic to handle this
- Pulse/rumble only once when ending
- If countdown is disabled, rumble once start/stop.
@XK9274 XK9274 self-assigned this Dec 2, 2023
@XK9274 XK9274 marked this pull request as ready for review December 2, 2023 22:19
@XK9274 XK9274 added the enhancement New or improved feature label Dec 3, 2023
@XK9274 XK9274 added this to the v4.3 milestone Dec 3, 2023
github-merge-queue bot pushed a commit that referenced this pull request Dec 11, 2023
## Needs to be merged after Mainui sig handling #1193 as it uses -2, and
#1299 unless rebased after this merges (as the NUM_TOOLS needs to be
updated)

- Tested on MM+ FW 0628, MM 1027, MM 0611
- Tested with Sandisk Ultra cards

## Adds a tool to sort the Apps list A-Z or Z-A based on their
config.json LABEL.

- Will add 2 tools to the Tweaks -> Tools menu
XK9274 and others added 4 commits December 14, 2023 00:16
Update menu item value tracking
Better count logic
- Fix if the user deleted the recordings while ffmpeg was running through it caused unintended behaviour where it would stop the `start` menu item working.
- Fix If countdown is 1 pulse doesn't run
@schmurtzm schmurtzm added this pull request to the merge queue Dec 14, 2023
Merged via the queue into main with commit d414814 Dec 14, 2023
3 checks passed
@schmurtzm schmurtzm deleted the feat-add-screen-recorder branch December 14, 2023 22:35
@XK9274 XK9274 changed the title FEAT: Add screen recorder as a tool (Not for game footage) Add screen recorder as a tool (Not for game footage) Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New or improved feature
Projects
Status: Done / Ready for release
Development

Successfully merging this pull request may close these issues.

None yet

3 participants