Skip to content

vhs โ€‹

Plays the picture as a worn tape: smeared colour, wobbling lines, a tracking band and snow.

tsx
import { Clip, Composition, Track } from "@uberscene/kit";

// vhs: Plays the picture as a worn tape: smeared colour, wobbling lines, a tracking band and snow.
export default function Video() {
  return (
    <Composition fps={30} width={640} height={360}>
      <Track id="main">
        <Clip
          id="shot"
          src="asset:redCup"
          in={18}
          out={21}
          fit="cover"
          effects={[
            {
              type: "vhs",
              amount: [
                { at: 0.5, value: 0, easing: "easeInOut" },
                { at: 1.5, value: 0.8 },
              ],
              tracking: [
                { at: 0.5, value: 0, easing: "easeInOut" },
                { at: 1.5, value: 0.8 },
              ],
              noise: [
                { at: 0.5, value: 0, easing: "easeInOut" },
                { at: 1.5, value: 0.5 },
              ],
            },
          ]}
        />
      </Track>
    </Composition>
  );
}

The coffee footage is Pixabay videos 209419, 209424, 46989 and 251, under the Pixabay Content License. The maker of the machine in the red cup shot has nothing to do with this project.

Params โ€‹

Drawn as a shader.

paramtypedefaultdescription
amountnumber (0..1)0.5How worn the tape is: how far the lines wobble and the colour smears. 0 leaves both as they were.
trackingnumber (0..1)0.5How strong the tracking band is, the torn strip that climbs the frame: 0 is none.
noisenumber (0..1)0.3How much snow and how many dropouts the tape has: 0 is none.
seedinteger (0..โˆž)0Picks the pattern; the same seed draws the same wear.

All effects and transitions ยท Units

MIT licensed.