mirror of
https://github.com/joe-scotto/scottokeebs.git
synced 2026-08-24 10:14:29 -05:00
OLED Video
Used to convert a video for display on a QMK OLED.
This should work on pretty much any QMK keyboard but I highly recommend using a controller with a decent amount of flash memory such as an RP2040.
Instructions
- Generate your frames using extract_frames.py
- They will output to the
framesdirectory.
- They will output to the
- Upload those to Image2CPP
- Choose your dithering mode if you want to play with the look.
- Code output format should be set to
Plain bytes. - Output should be set to
Draw mode: Vertical - 1 bit per pixel - Click
Generate codeand paste the output toframes.txt.
- Generate your
frames.cusing create_frames_array.py.- Copy
frames.candoled.cto your QMK keymap. - Import
oled.cinto yourkeymap.c. - Compile and flash.
- Copy
- You should now see a video playing on your OLED!
extract_frames.py
This is the script used to generate the video frames you will use to convert.
python extract_frames.py "video.mp4"
| Argument | Type | Default | Description |
|---|---|---|---|
input |
str |
required | Path to the input video file. |
--fps |
float |
15 |
Playback frames per second. |
--width |
int |
128 |
Width of the output frames in pixels. |
--height |
int |
64 |
Height of the output frames in pixels. |
--frames |
int |
120 |
Number of frames to extract from the video. |
--format |
str |
monow |
Output pixel format: monow, gray, or rgb24 |
--speed |
float |
1.0 |
Playback speed of the video. |