| Before | After |
|---|---|
![]() |
![]() |
video_glitcher is a Java app built with Processing as a library. It extends PApplet, loads a video file, previews it fullscreen, applies glitch effects in real time, and exports the result as an MP4 in either live interactive mode or full-process mode.
Project site: krahd.github.io/video_glitcher
Current version: v1.1.3
The repository is self-contained and includes the Processing OpenGL jars needed for the P2D renderer, plus platform-specific video natives for macOS, Linux, and Windows. Export uses ffmpeg from your system PATH.
On macOS Apple Silicon and Linux x86_64, install video_glitcher from the krahd/tap Homebrew tap:
brew tap krahd/tap && brew install krahd/tap/video_glitcher
video_glitcherThe Homebrew formula installs the matching prebuilt release bundle, adds ffmpeg plus openjdk automatically, and exposes the video_glitcher command. Windows should use the release ZIP instead.
Latest release page:
Latest release downloads:
For version-pinned downloads and release-specific details, open the release page for the tag you want.
Formula/video_glitcher.rb: Homebrew formula snapshot synced tokrahd/homebrew-tapsrc/tom/videoGlitcher/VideoGlitcher.java: main application sourcevideo_glitcher.pde: original Processing sketch version.vscode/launch.json: debug launch configs forvideo_glitcheron macOS, Windows, and Linux.vscode/tasks.json: build and run tasks forvideo_glitcherin VS Code.github/workflows/publish-homebrew-tap.yml: waits for release assets and updates the Homebrew tap formula from tagged releases or manual dispatch.github/workflows/release.yml: automated cross-platform release bundleslib/: bundled Processing, video, ControlP5, and Processing OpenGL librariesbin/: compiled class outputpackaging/homebrew/render_homebrew_formula.py: renders the asset-based Homebrew formula from release asset URLs and SHA-256 digestspackaging/portable/: launcher scripts for the portable cross-platform bundledist/: generated packaging output, ignored by git
- Java 17 or newer
- VS Code with Java support
- Homebrew installs
ffmpegandopenjdkautomatically when you usebrew tap krahd/tap && brew install krahd/tap/video_glitcher ffmpegon yourPATHif you want MP4 export- Native video runtime files are already vendored for
macos-aarch64,macos-x86_64,linux-amd64, andwindows-amd64
Build from the project root with:
javac -cp "lib/core.jar:lib/controlP5/library/*:lib/processing-opengl/library/*:lib/video/library/*" -d bin src/tom/videoGlitcher/VideoGlitcher.java src/tom/videoGlitcher/VideoGlitcherLogic.java src/tom/videoGlitcher/FfmpegVideoExporter.javaIn VS Code, run the default build task:
Terminal->Run Build Task...- Choose
Build video_glitcher
Current automated coverage targets the pure Java logic that was extracted from the fullscreen Processing sketch. It covers export filename generation, video-fit calculations, range normalization, glitch state transitions, and ffmpeg export setup.
Run the logic tests from the project root with:
mkdir -p test-bin && javac -d test-bin src/tom/videoGlitcher/VideoGlitcherLogic.java src/tom/videoGlitcher/FfmpegVideoExporter.java test/tom/videoGlitcher/VideoGlitcherLogicTest.java && java -cp test-bin tom.videoGlitcher.VideoGlitcherLogicTestIn VS Code, you can also run:
Terminal->Run Task...- Choose
Test video_glitcher logic
The app also supports a non-interactive smoke mode for local runtime validation on macOS. Smoke mode runs in a normal window instead of Processing present mode and exits on its own.
Available tasks:
Smoke Test video_glitcher Startup (macOS Apple Silicon)Smoke Test video_glitcher Load (macOS Apple Silicon)Smoke Test video_glitcher Export (macOS Apple Silicon)Smoke Test video_glitcher Process (macOS Apple Silicon)
The load, export, and process smoke tasks generate a short sample clip with ffmpeg and launch the app with --smoke-test. The load task validates the video pipeline without requiring interaction. The export task exercises the live interactive ffmpeg-backed export path. The process task runs the full-clip end-to-end mode and exits non-zero if the automatic export does not finish cleanly. The shipped command uses a longer smoke timeout because a heavy preset can render slower than realtime.
The smoke commands also accept the new retro presets, including --preset=vhs-decay and --preset=old-digicam, so you can validate the analogue-style control paths without touching the GUI.
You can also invoke smoke mode directly from the terminal:
java -cp "bin:lib/core.jar:lib/controlP5/library/*:lib/processing-opengl/library/*:lib/video/library/*" \
-Dgstreamer.library.path="$PWD/lib/video/library/macos-aarch64" \
-Dgstreamer.plugin.path="$PWD/lib/video/library/macos-aarch64/gstreamer-1.0" \
tom.videoGlitcher.VideoGlitcher --smoke-test --smoke-frames=45To auto-load a file and exercise live export:
java -cp "bin:lib/core.jar:lib/controlP5/library/*:lib/processing-opengl/library/*:lib/video/library/*" \
-Dgstreamer.library.path="$PWD/lib/video/library/macos-aarch64" \
-Dgstreamer.plugin.path="$PWD/lib/video/library/macos-aarch64/gstreamer-1.0" \
tom.videoGlitcher.VideoGlitcher --smoke-test --video=/absolute/path/to/sample.mp4 --auto-export --smoke-frames=180 --export-frames=48To auto-load a file and exercise full-process export:
java -cp "bin:lib/core.jar:lib/controlP5/library/*:lib/processing-opengl/library/*:lib/video/library/*" \
-Dgstreamer.library.path="$PWD/lib/video/library/macos-aarch64" \
-Dgstreamer.plugin.path="$PWD/lib/video/library/macos-aarch64/gstreamer-1.0" \
tom.videoGlitcher.VideoGlitcher --smoke-test --video=/absolute/path/to/sample.mp4 --preset=Extreme --auto-process --smoke-frames=360The rest of the app still requires manual validation because runtime behavior depends on a fullscreen PApplet, native video libraries, and live GUI interaction.
Use:
Terminal->Run Task...- Choose
Run video_glitcher (macOS Apple Silicon)
This task builds the app first, then runs it with the correct bundled GStreamer paths.
Additional platform tasks:
Build video_glitcher (Linux x64)Run video_glitcher (Linux x64)Build video_glitcher (Windows x64)Run video_glitcher (Windows x64)
Use:
Terminal->Run Task...- Choose
Package video_glitcher (macOS app)
This creates a distributable app bundle at dist/video_glitcher.app.
Use:
Terminal->Run Task...- Choose one of:
Package video_glitcher Release (macOS Apple Silicon)Package video_glitcher Release (Linux x64)Package video_glitcher Release (Windows x64)
These create release archives in dist/ for each platform, for example:
dist/video_glitcher-macos-aarch64.zipdist/video_glitcher-linux-amd64.zipdist/video_glitcher-windows-amd64.zip
Each bundle contains the application jar, the required libraries, the platform-specific video natives, and the matching launcher script.
Use:
Run and Debug- Select one of:
Run video_glitcher (macOS Apple Silicon)Run video_glitcher (macOS Intel)Run video_glitcher (Linux x64 bundled)Run video_glitcher (Windows x64)- Press
F5
Each debug launch is configured with the correct bundled libraries and native video paths for that platform.
java -cp "bin:lib/core.jar:lib/controlP5/library/*:lib/processing-opengl/library/*:lib/video/library/*" \
-Dgstreamer.library.path="$PWD/lib/video/library/macos-aarch64" \
-Dgstreamer.plugin.path="$PWD/lib/video/library/macos-aarch64/gstreamer-1.0" \
tom.videoGlitcher.VideoGlitcher- Click background: open the file picker when no video is loaded
L: load a videoSpace: pause or playG: turn glitching on or offF: toggle freeze modeH: show or hide the HUDU: show or hide the GUIE: start or stop live interactive exportP: open a save dialog, then process the full clip from start to finish with the current settingsS: save a frame as PNGUp: increase glitch intensityDown: decrease glitch intensity
- The preset controls now use a button grid that includes the original digital presets,
VHS Decay,Old Digicam, andRandom. - The GUI includes a dedicated retro section with six toggles:
Tracking Tear,Head Switch,Chroma Drift,Scanline Wobble,Vertical Smear, andColumn Drift. - The top-right
Advancedtoggle switches the whole control surface betweencompactandfull. GUI: Compactkeeps the panel short and only exposes the presets plus four high-level sliders:Digital Intensity,Glitch Activity,Analogue Intensity, andDamage Texture.GUI: Fullstretches the panel vertically, reveals the advanced timing sliders, the full digital toggle bank, the per-effect retro sliders, and supports mouse-wheel scrolling inside the panel.- Full-process export snapshots the active retro settings the same way it snapshots the rest of the glitch configuration, so preview and export stay aligned.
- Clicking inside the GUI does not trigger the background file picker.
- Glitching starts disabled before the first video is loaded so the empty-state text stays readable.
- After the first successful video load, glitching turns on automatically and then follows the user's chosen on/off state.
Export Start/Export Stopstay in the interactive lane: you can let the preview run, change settings on the fly, and manually finish the MP4.Process Fullopens a save dialog, snapshots the current glitch settings, rewinds to frame 0, renders the entire clip once, and finishes the MP4 automatically at the playback end.- The GUI is layout-aware: compact mode keeps the panel shorter for quick preset-driven use, while full mode exposes the deeper digital and analogue tuning controls.
- The full-height panel now stops at the HUD/status bar instead of running behind it, and the footer transport row uses clearer labels such as
REWIND. - When the full panel grows beyond the visible space, use the mouse wheel while the pointer is over the GUI to scroll the control list.
- If the fitted video does not fill the screen, black mattes are drawn around it so glitches stay confined to the visible video area.
- The app now calls
PApplet.hideMenuBar()before entering Processing present mode so fullscreen explicitly covers the macOS menu bar.
- The app is written as plain Java, so Processing types that are auto-imported in
.pdesketches must be imported explicitly in the Java source. - Video playback depends on the bundled Processing video library and native GStreamer files matching your platform.
- MP4 export depends on
ffmpegbeing installed and available on yourPATH. - The macOS packaging task builds an
.appimage with the required jars and bundled Apple Silicon video natives. - Pushing a release tag like
v1.1.2triggers the GitHub Actions workflow to build and publish downloadable release bundles for macOS, Linux, and Windows. - The
Publish Homebrew Tapworkflow waits for the macOS Apple Silicon and Linux x86_64 release ZIPs, rendersFormula/video_glitcher.rb, syncs it intokrahd/homebrew-tap, and removes the previous hyphenated formula file when theHOMEBREW_TAP_TOKENrepository secret is configured.
Pull requests are welcome.

