A video player for the M5Stack Cardputer ADV. Plays .avi files (MJPEG video + MP3 audio) at 240×135, converted with ffmpeg
snowflake is procedurally generated
- put
frost-convert.pyin a folder with your.mp4/.mkvfiles and run it (requiresffmpeg). - copy the
.avifiles fromfrost-out/to/Movieon the SD card. - Boot frost. on first boot it generates /.frost/config file. see Settings
- boot frost again and by now you can select a video.
converter defaults: 20 fps, quality 6, 8 KB frame cap.
flowchart LR
SD[(SD card<br>.avi)] --> R[Reader<br>core 0]
R --> AR[Audio buffer<br>8 KB]
R --> VR[Video buffer<br>64 KB]
AR --> A[MP3 decode<br>core 1]
VR --> V[JPEG decode<br>core 0]
A --> S[Speaker]
V --> L[LCD]
A -. audio clock .-> V
a reader task owns the SD card and fills two buffers. Audio and video decode only from RAM. Video frames are timed against the audio, frames that come late gets skipped causing video stutters. Audio decode takes the highest priority (personally audio stutters are way more unbearable)
Arrow keys: ; up, . down, , left, / right.
Space Pause / resume
0–9 Jump to 0%–90%
Fn+← / → Seek −/+ 2%
] / [ Next / previous video
= / - Volume (with Fn: brightness)
s Stop
m Mute
r Repeat current video
\ Shuffle
v Video off / on (audio keeps playing)
h Half frame rate
i Title and position
d Debug overlay
n / b Next / previous frame (while paused)
Fn+[ / ] Audio sync −/+ 20 ms
Fn+S Scan titles
← Fullscreen: back to browser, keeps playing
In the browser: ↑ ↓ move, → open or play (also queues all videos in the directory) , ← parent folder, Enter go back to the player/video, ' add to queue, Fn+' play next.
Edit /.frost/config on the SD card. Delete it to restore defaults.
| Key | Default | Meaning |
|---|---|---|
movie_dir |
/Movie |
Video folder |
brightness |
255 |
0–255 |
screen_timeout |
0 |
ms before the screen sleeps, 0 = never |
accent |
FFFFFF |
Hex color |
background |
000000 |
Hex color |
shuffle |
0 |
0 or 1 |
av_offset |
80 |
Audio sync, ms |
boot_animation |
1 |
0 or 1 |
| Field | Meaning |
|---|---|
fps |
Frames drawn last second |
drop |
Frames skipped |
dec |
ms to decode and draw one frame |
aw |
ms the audio waited for data (should be 0) |
vq |
Bytes in the video buffer |
.aviwith MJPEG + MP3 only. Use the converter.- ffmpeg splits blocks above 1GB files. frost runs fine but videos end prematurely
- 20-25 fps is the practical maximum.
git clone https://github.com/wisnc/frost
cd frost
pio run