Datamosh
A vision mixer that leaves out the keyframes
thesandbox.pagePGM Bars
0:00
Press and hold the picture to make it flow
This browser can't run the codec: it needs web workers and OffscreenCanvas.
Frame 000000
- Keyframe
- Keyframe left out
- Delta frame
- Held delta
- Bar height: bits in the frame
How the picture breaks
Compressed video keeps only a few whole pictures, the keyframes. Every frame in between cuts the picture into 16-pixel blocks and says where each block moved from, plus a small correction, the residual. The bar chart under the picture shows the difference: a keyframe is a tall bar, the frames after it are small ones.
At a cut, the new shot starts with a keyframe. Leave it out and the decoder carries on with the picture it already has, so the new shot's movement is applied to the old shot. Turn on Vectors to see the blocks being pushed. With Residual off only the movement is applied, so a pan slides the picture away and drags its edge in behind it.
Hold repeats one frame's movement until you let go, so the picture keeps flowing the same way. Blocks the encoder couldn't predict are sent whole: Heal lets them through, so the new shot fills in bit by bit, and Smear moves them along with their neighbours instead. Key puts a clean picture back.
The codec is this page's own, in the style of MPEG: 16x16 macroblocks, colour at half resolution, and an 8x8 cosine transform for the corrections, so it behaves the same in every browser. The camera, screen, and files you show it stay on your device. Rec saves what's on the program monitor as a video.