A desktop VHS-style video recorder, live camera processor, CRT display simulator, and MP4 exporter built with CustomTkinter, OpenCV, NumPy, ModernGL, and GLFW.
V8.1 adds a Windows installer build workflow, application/installer branding, and consistent Windows version metadata while retaining the V8.0 playback, CRT, RF, and stability work.
- Recorder, Player, VHS Tape, CRT TV, and Live pages in one desktop app.
- Tape bundle workflow for creating, loading, saving, and exporting virtual tapes.
- Threaded playback, scrubbing, editing preview, camera capture, live processing, and CRT rendering paths.
- Optional RF carrier round-trip model for analog-like luma/chroma degradation.
- GPU CRT simulator using ModernGL and GLFW for phosphor masks, beam shape, bloom, curvature, persistence, and export baking.
- Live camera path with a simple camera-index selector, fullscreen overlay, and direct OpenGL CRT output.
- Windows built-in audio playback plus MP4 export with optional audio mux.
- Backward-compatible bundle loading for older tape bundle layouts.
- Restored the missing CRT TV application wiring on top of the optimized playback/RF branch: Player preview, Live preview, direct OpenGL windows, settings persistence, and CRT-baked exports are connected again.
- Fixed the CRT phosphor-history path so previous-frame history is copied framebuffer-to-framebuffer entirely on the GPU instead of falling back to a GPU→CPU→GPU round-trip every frame.
- CRT source upload can now use texture channel swizzling to consume OpenCV BGR frames directly, avoiding a full-frame BGR→RGB allocation on supported OpenGL drivers.
- Static CRT shader uniforms are cached and resent only when settings/resolution change; the shader equations and visual model are unchanged.
- CRT remains GPU-native; the optional Rust core is used only for CPU-side VHS/RF hot loops where it provides a measurable benefit.
- Simplified Live camera selection back to plain camera indexes such as
0,1, and2. - Camera refresh discovers connected inputs in a background worker so the UI does not freeze.
- Camera backend fallback now happens internally instead of cluttering the dropdown with backend names.
- Live mode no longer turns brief camera read hiccups into periodic static bursts; short misses are dropped, sustained loss still triggers signal-loss behavior.
- Live on/off no longer blocks the UI while waiting for camera release.
- Live CRT processing uses a bounded latest-frame queue so stale GPU jobs are dropped instead of piling up.
- Live preprocessing uses one shared resize/even-field path; OpenCV can be extended to OpenCL/UMat without changing the tape equations.
- CRT output remains isolated through the CRT renderer thread; no Live worker touches ModernGL or GLFW directly.
- Updated CRT and Live setting help text.
- Added a Windows installer builder (
build_installer.bat) using Inno Setup 6. - Embedded V8.1 into the Windows executable file-version/product-version metadata.
- Updated package/UI version identifiers to V8.1.
- The installer includes the complete PyInstaller application folder and creates Start Menu and optional Desktop shortcuts.
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
python main.pyCRT implementation files live in vcr/crt.py and vcr/crt_renderer.py.
Run from the project root:
build_installer.batThe script builds the PyInstaller application first, locates Inno Setup 6, and creates:
installer\output\Digital-VCR-V8.1-Setup.exe
If the EXE was already built and you only want to rebuild the installer:
build_installer.bat --skip-exeThe installer places Digital VCR in Program Files, creates a Start Menu shortcut, offers an optional Desktop shortcut, and includes the V8.1 uninstaller entry.
- Python 3.10+
- NumPy
- OpenCV
- Pillow
- imageio-ffmpeg
- CustomTkinter
- ModernGL
- GLFW
Installed from requirements.txt:
numpy>=1.24
opencv-python>=4.7
Pillow>=10.0
imageio-ffmpeg>=0.4.9
customtkinter>=5.2.2
moderngl>=5.12.0
glfw>=2.10.0Use this to create tapes, record source video into tape tracks, tune record-side defects, and save bundle folders.
Use this to play, scrub, tune playback defects, build a RAM proxy, preview audio, and export final MP4 files.
Advanced modelling tab for RF record/playback controls, luma/chroma carrier behavior, crosstalk, and tape-style degradation.
GPU display simulation tab for Player, Live, direct OpenGL windows, and MP4 export. It includes Consumer TV and Pro Monitor presets plus phosphor masks, scanlines, beam sharpness, bloom, halation, curvature, overscan, convergence, vignette, and phosphor decay controls.
Use a live camera as the source path with:
- simple camera-index selection
- background camera discovery
- live VHS-style preview
- fullscreen overlay output
- direct CRT output through the CRT renderer thread
- quick access to record-side, playback-side, and audio controls
Current preferred bundle layout:
tape_info.json- global tape info and decode parameterstape_luma.npz- luma tracks plus per-track metadata arraystape_chroma.npz- chroma trackssettings.json- saved UI settingsaudio_tape.npz- compact embedded tape audio when availableaudio.wav- fallback or export-friendly audio fileoutput.mp4- exported videooutput_with_audio.mp4- muxed export when audio is available
The loader still supports older bundle layouts, including legacy single-file tape.npz and fallback audio.wav.
- Real RF modulation is optional. If disabled, the app uses the faster byte-domain defect path.
- If a track was recorded with RF round-trip metadata, playback can automatically use the RF-aware path.
- Progressive field sampling reduces combing artifacts from progressive sources.
- Field-pair alignment is track-aware, which is important for insert/edit-style cases and tapes that do not begin exactly on an even track boundary.
- Tape audio is stored compactly when possible and decoded back in memory on load.
- Export can generate video-only or muxed video+audio outputs.
main.py
requirements.txt
README.md
vcr/
audio.py
audio_player.py
bundle.py
crt.py
crt_renderer.py
defects.py
editor.py
exporter.py
modulation.py
native_core.py
native/
digital_vcr_core.dll # generated on Windows after build_native.bat
player.py
recorder.py
rf_model.py
tape.py
gui/
app.py
native/
digital_vcr_core/
Cargo.toml
src/lib.rs
tools/
capture_screen.py
Digital VCR can use a small Rust native library for hot loops that were previously executed in Python. The signal model itself remains in the existing Python/NumPy/ OpenCV pipeline; the native core currently accelerates exact row-shift copies and RF smooth-noise interpolation.
On Windows, install the Rust toolchain, then run:
build_native.batThis places digital_vcr_core.dll in vcr/native/. build_exe.bat and
build_exe.ps1 automatically build and package the native core when cargo is
available. If the DLL is missing or fails its runtime numerical self-check, the
application automatically uses the Python reference implementation instead.
The performance changes are designed not to reduce simulation quality: the RF noise batching consumes the same NumPy random sequence as the former per-scanline implementation, and the native path is guarded against numerical divergence. Playback also uses deadline-based 30 fps pacing so render time is counted inside the frame budget rather than added on top of a fixed 33 ms sleep.