Technique

Datamoshing

Datamoshing Example

Datamoshing is a glitch video technique that abuses video compression so motion from one shot “melts” into another, producing smeared, blooming, and broken-image transitions. It works by manipulating the structure of compressed video, especially I-frames and P-frames.


1. How datamoshing works

Video Glitch Motion

Modern video codecs (like MPEG-4 / Xvid) compress by storing full images only sometimes, and changes most of the time:

  • I-frames (intra frames): full images, like regular still frames.
  • P-frames (predicted frames): store only motion and difference data relative to previous frames.

When you remove or corrupt I-frames, you force the decoder to keep applying P-frame motion data on top of an old image, so the movement of a new shot flows across the pixels of the previous one.

Two core glitch behaviors:

  • I-frame removal: creates smeared, “melting” transitions between clips.
  • P-frame duplication (“bloom”): copying one or more P-frames over and over exaggerates motion, creating trailing, pulsating artifacts.

In practice, datamoshing is “breaking” the normal rules of compression to reveal its inner mechanics as an aesthetic surface.


2. Core techniques

2.1 Classic I-frame removal

Datamosh Transition

This is the most iconic datamosh:

  1. Join two clips into a single file so there is a shot change in the middle.
  2. Compress with an MPEG-4 ASP codec (Xvid) and set a very high max I-frame interval so the file has few I-frames.
  3. Open the file in a frame editor (e.g. Avidemux / VideoMux).
  4. Locate the I-frame at the cut between shots.
  5. Mark that single I-frame and delete it, accepting the “you will corrupt the file” warning.
  6. Save without re-encoding (video output set to Copy), so the broken structure is preserved.

The result: when the second clip begins, its motion vectors are applied to the frozen image of the first clip, creating a flowing, painterly glitch transition.

2.2 P-frame duplication (bloom)

Here you intensify motion trails instead of transitions:

  1. Prepare and compress your clip similarly using Xvid with long GOP / max I-frame interval.
  2. In Avidemux/VideoMux, find a P-frame with strong motion (e.g. a quick movement).
  3. Select that single P-frame and duplicate it 20-30 times.
  4. Save again with video set to Copy so frames are not re-encoded.

The motion data in that P-frame keeps being applied, creating blooming streaks and trails that feel hypnotic and “trancy.”


3. Tools and workflows

Video Glitch Software

Common “classic” datamoshing toolchain:

  • Avidemux / VideoMux / VideoMosh-like tools

    • Set video codec to MPEG-4 ASP (Xvid).
    • In codec settings, set Maximum I-frame interval to a huge value (e.g. all 9s) to minimize I-frames.
    • For the moshing pass, set video output to Copy so no new compression is added.
  • FFGlitch - Command-line tool specifically for datamoshing

  • NLEs (Premiere, After Effects, CapCut) with pseudo-datamosh workflows Some modern tutorials imitate datamoshing inside AE by combining masking, content-aware fill, and stylized artifact layers instead of literally editing I/P-frames. This is more controllable but less “raw” than file-level corruption.

For more tools, see our Free Glitch Tools and Glitch Apps guides.


4. Practical tips for glitchologists

4.1 Preparing source footage

  • Use high-contrast motion: quick cuts, bold shapes, strong color changes produce more dramatic mosh artifacts.
  • Avoid heavy pre-compression: already-mushy footage yields weaker glitches. Export a clean, high bitrate intermediate before your Xvid pass.
  • Plan where you want melting to occur: sharp edits between very different scenes are ideal I-frame removal points.

4.2 Technical best practices

Datamosh Result

  • Always keep a clean master. Work on a duplicate, as you will intentionally corrupt files.
  • When saving the final moshed output, ensure:
    • Video output = Copy
    • No filters are applied
    • Container is something simple like AVI that plays nicely with Xvid glitches.
  • Expect crashes: tools like Avidemux can be unstable when copying P-frames many times. Duplicate in batches and save frequently.

4.3 Aesthetic control

  • Control duration of the melt by how far you are from the next I-frame. Longer stretches between I-frames mean longer smears.
  • For subtle work, remove only a few I-frames near a cut. For more chaos, remove several I-frames or chain multiple moshed segments.
  • Combine techniques: start with an I-frame melt, then add a P-frame bloom section mid-shot to shift energy and texture.
  • Enhance in post: layer color shifts, pixel sorting, or additional glitches on top of the moshed video for richer glitch ecologies.

5. Creative directions

Abstract Datamosh

Datamoshing is not just a “trippy” effect; it is a way of revealing compression as material, exposing how digital images are stored, predicted, and broken. By controlling I-frames and P-frames, you are essentially sculpting motion vectors as if they were paint, turning codec errors into deliberate glitch aesthetics.