Beygla Datamosh editor Source Releases
The Beygla icon: a letter B torn into displaced bands.

Beygla

A datamosh editor for macOS whose effects are driven by audio-in and MIDI-in triggers, so the glitches land on the beat instead of wherever you happened to drag them.

Load a clip. Beygla finds the transients in its audio — or in a separate track, or from a live input, or from a controller — and turns each hit into a trigger. Each trigger fires an effect rule that rewrites a span of compressed video frames.

Version 0.9.0  ·  Universal, Apple Silicon and Intel  ·  macOS 14 or later  ·  no dependencies

Fifteen effects

A compressed stream has two kinds of frame. A keyframe is a whole picture. A delta frame carries only motion vectors and a small correction — instructions for moving the previous picture's pixels around. Every effect here works by lying about which pixels those instructions were meant for.

Colour groups them by what they do to the frame array: one hue for stripping reference frames, one for holding and repeating, one for reordering. Each is a rule with a length, an amount and four modulation parameters, and each has its own lane on the timeline — drag across a lane to set where that effect is live, so a set of effects takes turns over a clip instead of all of them firing on every hit.

Bloom strips

Deletes the keyframes in range, so the incoming scene's motion lands on the outgoing scene's pixels.

Void strips

Kills every frame carrying more data than a threshold — keyframes first, then the heavy refresh frames.

Glide holds

Holds one delta frame and re-applies it, so the picture slides steadily in one direction.

Echo holds

Loops the first few delta frames, so the image churns in a cycle rather than drifting.

Stutter holds

Keeps one frame in every few and skips the rest: a hard judder that holds still between updates.

Freeze holds

Every frame replaced with a skip frame. Motion stops dead and nothing smears.

Overlap holds

Runs that double back: each one replays part of the one before, stacking partial movements.

Reverse reorders

The range's delta frames back to front, so shapes crawl backwards through themselves.

Invert reorders

Each frame swapped with its neighbour — motion advances then corrects, one frame out of step.

Weave reorders

Interleaves the range with itself reversed: two contradictory directions on alternate frames.

Jiggle reorders

Each frame displaced in time by a gaussian amount. Motion stumbles rather than tears.

Sort reorders

Reordered by frame size — by how violent each moment was. Gathers into a burst, or decays from one.

Rise reorders

Skips forward through the range, then holds on the last frame reached.

Shuffle reorders

Frames permuted individually, so the image tears into independently drifting blocks.

Blocks reorders

Shuffled in blocks, so motion stays coherent inside each one and only the joins are wrong.

Eleven more, rewriting motion instead of frames

Everything above treats a compressed frame as an opaque blob and only ever moves, holds or deletes whole ones. These decode a frame just far enough to expose its motion vectors as a plain array, run a transform over that array, and re-encode with the edited vectors instead of the real ones — a genuine decode/edit/re-encode pass, not byte surgery, ported from the FFglitch scripts in Datamosher Pro. Needs FFglitch's ffgac and ffedit as a second, optional build; Beygla runs exactly as before without them, just with these eleven unavailable.

Combining a vector rule and a bitstream rule in one render costs exactly one extra encode generation — the one ffgac needs to force a vector onto every macroblock — not two independent renders' worth.

Sink vector

Freezes anything moving faster than a threshold; slow motion is untouched.

Stop vector

Freezes every block's motion, unconditionally.

Invert vector

Negates every vector — right becomes left, up becomes down.

Mirror vector

Reflects the motion field left to right.

Vibrate vector

Adds an independent random jitter to every block, every frame.

Zoom vector

Adds an outward — or at low amount, inward — radial push from centre.

Slam Zoom vector

Replaces motion with a pure radial field instead of adding to it.

Shear vector

Adds a diagonal offset that grows with distance from centre.

Delay vector

Replaces each block's vector with one from several frames ago; past halfway, Amount blends a feedback trail instead.

Shift vector

Feeds vertical motion into the next frame with a constant added each time, like gravity accelerating a fall.

Noise vector

Multiplies the slowest-moving blocks instead of the fastest — the inverse of what a glitch usually does.

How it works

Datamoshing means feeding a decoder frames it was never meant to see. The only practical way to do that is MPEG-4 Part 2 in an AVI container, because AVI stores each compressed frame as a plainly delimited chunk you can reorder with a hex editor.

SOURCE.MP4 ENCODE RAW.AVI MOSH MOSHED.AVI DECODE OUT AUDIO DETECT TRIGGERS AUDIO IS NEVER TOUCHED PICTURE SOUND

The mosh is pure byte surgery. ffmpeg is only ever asked to do the two things it is unambiguously good at: produce a clean MPEG-4 elementary stream, and decode a deliberately broken one without giving up.

Why it stays in sync

Every effect is length-preserving. An op only overwrites the frame slots it covers — it never inserts or deletes. The usual approach of duplicating frames to stretch a smear makes the video longer than its audio, which is fine for a one-off render and useless when the whole point is that the hits land on the kick.

Holding a frame is the interesting case. The obvious move — writing a zero-length AVI chunk — does not work: the decoder emits no picture for it and the output comes up short. On an eight-second test clip, holding thirty frames turned 240 frames into 210.

What Beygla writes instead is a synthesised six-byte vop_coded = 0 P-VOP: a fully legal MPEG-4 frame meaning "this picture is exactly the previous one". Building it requires reading vop_time_increment_resolution out of the stream's VOL header, which is not byte-aligned, so the parser walks it bit by bit.

That frame still produces no decoder output — but it leaves a correctly sized hole in the presentation timeline, and decoding with -fps_mode cfr refills the hole by repeating the last picture. Frame count restored exactly, sync intact, and the intermediate AVI stays playable in other tools.

240 → 240frames at 30 fps, all seven effects
143 → 143frames at 23.976 fps, 24000/1001 preserved
6 bytesthe synthesised skip frame
Triggers
Audio track
Transients in the clip's own audio, or in a separate file loaded over it. The override drives detection, plays against the picture, and is the track muxed into the render.
Audio in
Arm, play the clip, and let the detector listen to whatever is coming into your interface. Each hit is timestamped against the playhead.
MIDI in
Perform on a controller. Bind a rule to one note to give it its own pad. Listens to every connected source by default, or to one you pick.
Sync
A fixed tempo grid. Set the BPM — or tap it — pick a note length from a bar down to sixteenths or triplets, and put beat 1 on the track's downbeat.
By hand
Double-click the timeline. A hand-placed trigger is an explicit instruction, so it fires every enabled effect.
Detection
Spectral flux over a selectable band — kick, snare, hats or full range. Peaks are ranked by prominence and sensitivity selects what fraction of that ranking to keep. Onset times are reported at the centre of the analysis window; uncorrected, every hit reads about 12 ms early. Corrected, it lands within 3 ms on a 120 BPM pattern.
Install

Download the release, unzip, and move Beygla.app to Applications. Nothing else to install — ffmpeg ships inside the app.

The app is ad-hoc signed and not notarized, so Gatekeeper will refuse it on first launch — right-click and choose Open, or clear the quarantine flag:

xattr -dr com.apple.quarantine /Applications/Beygla.app

That is the honest state of it: a locally built app, not a distributed product. Building from source avoids the issue entirely.

git clone https://github.com/SungamMagnus/beygla.git
cd beygla
./tools/build-ffmpeg.sh
./build.sh --universal

The bundled ffmpeg is built from source rather than copied. Homebrew's is dynamically linked against its own Cellar, built for one architecture, and links libx264 — which makes it GPL. Beygla's is static, universal, and built --disable-gpl, taking H.264 from VideoToolbox instead, so it is LGPL. Everything the app never asks for is switched off.

The same build produces beyglactl, a command-line front end that shares every line of the actual moshing with the app.

beyglactl render clip.mp4 out.mp4 --band low --effect bloom --dur 0.4
Known limits
Live capture
Arming records your performance against the playhead; the render happens after. Real-time moshed output is possible with the same engine, but it is not built yet.
Motion vectors
Beygla rewrites whole frames. Datamosher Pro's other half — Sink, Shear, Zoom, Slice, Stop, Fluid, Motion Transfer and the rest — rewrites the motion vectors inside them, which needs FFglitch as a separate binary. Those are not implemented here.
Single clip
Supermosh-style multi-clip transitions are not wired up. The engine supports it — concatenate, force keyframes at the junctions, bloom them — but there is no clip-list interface.
No icon
The design system states outright that no logo exists and none should be invented, so the app ships with the wordmark and no mark.