BlackVideo Mini Player v2.3.0 — Offline Captions (Whisper), Subtitle Rendering & Track Fix #18
LoneStamp
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
✅ What's in This Release
🎙️ Offline Caption Generation — Whisper.cpp Integration
Generate subtitles for any video without an internet connection or API key.
.srtfile beside the video. The result is auto-loaded into Track 1 when complete.--translateflag, which outputs English subtitles regardless of the spoken language. Useful for non-English films with no existing subtitle file.WinExec. The player polls for the output.srtfile each frame and loads it the moment it appears.Whisper: generating captions...orWhisper: translating...while the job is running, and clears automatically when done.whisper_bridge.adbshells out towhisper-cli.exerather than linking againstwhisper.h. No whisper headers or import libraries needed inlib/.ggml-base.bin,ggml-small.bin,ggml-medium.bin, orggml-large.bininbuild\models\and the next job picks it up automatically. No rebuild required.whisper-cli.exeand the model are resolved in order:BLACKVIDEO_WHISPER_PATH/BLACKVIDEO_WHISPER_MODELenv vars →build\beside the exe → systemPATH. No config file needed in production.📝 Real Subtitle Text Rendering
Loaded
.srtfiles now display on-screen during playback — not just track labels in the menu.srt_parser.adb— new module that parses.srtfiles at load time (handles UTF-8 BOM, Windows CRLF, multi-line cues, up to 4 096 cues). Stores all cues in memory for O(n) per-frame lookup.player.adbcallsSRT_Parser.Current_Text(pos)each frame and pushes the result to the C overlay viabv_ui_set_sub_text.ui_overlay.c— draws the current cue horizontally centred just above the control bar, with a semi-transparent shadow box for readability against any background colour..srtfile and with Whisper-generated.srtfiles (auto-loaded from Track 1).🐛 Subtitle Track State Bug Fixed
The subtitle track was silently resetting to Off immediately after a track was selected or a file was loaded.
Open_Dialog(the PowerShell file picker) blocks viapopen, SDL queuesSDL_MOUSEBUTTONDOWNevents in the background. When the dialog closes and the event pump resumes, those queued events fireHandle_Button_Downagain. If the mouse had drifted over the Subtitle: Off row,CTX_SUB_NONEwas triggered automatically, settingSub_Active = -1right after the user's selection.Ctx_Close_Tickrecords the SDL tick whenever the context menu closes. AnySDL_MOUSEBUTTONDOWNarriving within 250 ms of that moment is discarded. This absorbs all queued dialog-close events without affecting normal clicks.⚙️
.envFile — Dev / Production Path Override Systemmain.adbloads.envat startup usingSetEnvironmentVariableAfor eachKEY=VALUEline found in the file beside the exe. Blank lines and#comments are skipped..envfile needed in a release package. Whisper paths resolve automatically frombuild\. The player silently skips the load step if the file is absent..env.exampleto.envand setBLACKVIDEO_WHISPER_PATHandBLACKVIDEO_WHISPER_MODELto override the search paths during development (e.g. pointing to awhisper-bin-x64folder outside the project)..env— it is listed in.gitignoreand contains local machine paths only.🏗️ Build System
build.batchecks for Whisper assets (non-fatal) — prints[OK]ifwhisper-cli.exeandggml-base.binare found inbuild\, otherwise prints a setup reminder. Build continues regardless.build.batgenerates.env.exampleif none exists — creates a ready-to-rename template with commented-outBLACKVIDEO_WHISPER_PATHandBLACKVIDEO_WHISPER_MODELlines.build.batcopies Whisper DLLs (whisper.dll,ggml.dll,ggml-base.dll,ggml-cpu.dll) fromlib\tobuild\alongside the other runtime DLLs, if present.🎮 Controls
Keyboard
SPACE←/→↑/↓MLFESCorQUI Bar
1.0xSpeedContext Menu (Right-click)
.srt(auto-loaded).srt(auto-loaded)📦 Requirements (Windows)
ffmpeg.exeonPATHor inbuild\(for Whisper audio extraction)build\:SDL2.dllSDL2_ttf.dllSDL2_ttf-devel-2.0.12-VClibfreetype-6.dllSDL2_ttf-devel-2.0.12-VCzlib1.dllSDL2_ttf-devel-2.0.12-VCavcodec-62.dllavdevice-62.dllavfilter-11.dllavformat-62.dllavutil-60.dllswresample-6.dllswscale-9.dllOptional — Whisper DLLs (only needed for caption generation):
whisper.dllggml.dllggml-base.dllggml-cpu.dll🚀 Usage
build\blackvideo-player.exe "C:\path\to\video.mp4"Generate captions after opening:
📁 New Files in This Release
src/srt_parser.ads/.adbsrc/whisper_bridge.ads/.adbwhisper.hat build time).env.example.envWHISPER_SETUP.mdBuilt with Ada 2012 · FFmpeg 8.x · SDL2 · SDL2_ttf · whisper.cpp · GNAT Community 2021
Full Changelog: v2.2.0...v2.3.0
This discussion was created from the release BlackVideo Mini Player v2.3.0 — Offline Captions (Whisper), Subtitle Rendering & Track Fix.
All reactions