{"course":{"slug":"making-things-with-ai","title":"Making Things with AI","url":"https://addaly.com/learn/making-things-with-ai","level":"beginner","track":"create"},"lesson":{"slug":"frames-are-expensive","title":"Why a second of video costs what it does","url":"https://addaly.com/learn/making-things-with-ai/frames-are-expensive","position":39,"of":84,"minutes":8,"answer":"Video generation is not image generation repeated, because the model must attend across frames as well as within them, so cost rises faster than the frame count and memory becomes the binding limit.","keyIdea":"Video generation is not image generation repeated, because the model must attend across frames as well as within them, so cost rises faster than the frame count and memory becomes the binding limit."},"body":{"format":"markdown","text":"## The naive arithmetic, and why it is wrong\n\nA five-second clip at 24 frames per second is 120 frames. If video were images repeated, it would cost 120 times an image. That would be expensive and manageable.\n\nIt costs considerably more than that, and the reason is the part that makes video work at all.\n\nA model that generated each frame independently would produce 120 unrelated pictures. To make frame 47 continue frame 46, the model must see other frames while generating each one. That means attention *across time* as well as across space, and attention is quadratic: doubling the number of frames quadruples the cost of the temporal attention layers.\n\nCurrent video models handle a fixed window of frames jointly. Within that window, every latent position can attend to every other, across both space and time. A 121-frame clip at a 60 by 104 latent resolution has on the order of 750,000 positions attending to each other. That is the number that decides what hardware you need.\n\n> Figure: Why a second of video costs what it does. Line chart of Cost, relative to a 25-frame clip against Frames generated in one pass: Temporal attention, growing with the square of the frames (25, 1) (49, 3.8) (73, 8.5) (97, 15.1) (121, 23.4); If frames were separate pictures (25, 1) (49, 2) (73, 2.9) (97, 3.9) (121, 4.8). Every latent position attends to every other, across space and time, so doubling the frames roughly quadruples that part of the bill. The odd frame counts (49, 81, 121) come from the video autoencoder compressing four input frames into one latent frame, plus one.\n\n## Where the memory goes\n\nThe practical consequence is that video generation is memory-bound rather than time-bound. You can wait longer for a slow generation. You cannot wait your way past running out of video memory.\n\nRough current figures for open video models: a small one generating a few seconds at low resolution fits in 8 to 12 GB with quantisation; the larger open models want 24 GB and gratefully accept more. This is why video generation went to hosted services for most people first, while image generation went local.\n\nThe mitigations are the same family as for images, applied harder:\n\n- **Quantisation** of the weights.\n- **Tiled decoding**, because the video autoencoder's decode step is the single largest memory spike.\n- **Fewer frames per pass**, generating in chunks and joining them.\n- **Lower resolution**, then upscaling each frame afterwards, which works, and introduces its own flicker if the upscaler is not temporally aware.\n\n## The video autoencoder\n\nImages use a spatial autoencoder that compresses by eight in each direction. Video autoencoders compress in time as well, typically by four: four input frames become one latent frame. A 121-frame clip becomes about 31 latent frames.\n\nThis is why video models produce frame counts in odd-looking numbers (49, 81, 121) rather than round ones. The counts are set by the temporal compression factor plus one.\n\nIt also introduces a specific artefact. Because four frames share one latent, fast motion within those four frames has to be reconstructed by the decoder from a single compressed representation. Rapid movement therefore comes back smeared or stuttering in a way that is not present in the latent itself. If your clip has a fast pan or a quick gesture and the result looks like a badly encoded video file, this is the mechanism, and generating at a higher frame rate does not fix it because the compression factor is fixed.\n\n## What this means for how you work\n\nThree practical consequences follow directly from the arithmetic.\n\n**Generate short.** The cost curve punishes length superlinearly, and the drift problem covered later in this module punishes it again. Five seconds is not an arbitrary limit; it is where several curves cross.\n\n**Generate small, upscale after.** Resolution multiplies into the same attention cost. A 480-pixel generation upscaled to 1080 costs a fraction of a native 1080 generation and is frequently indistinguishable after grading.\n\n**Expect to throw work away.** Because each generation is expensive, the temptation is to accept a nearly-right clip. The professional habit is the opposite: decide in advance what \"usable\" means for the shot, and discard anything that is not, because a flawed clip costs you far more in the edit than a regeneration costs in credits.\n\nThe honest limitation to carry: none of this is a temporary inefficiency waiting for better engineering. The quadratic term is in the architecture. Approaches that reduce it (attending only to nearby frames, or compressing time harder) reduce the cost and give up exactly the long-range consistency that the attention was buying. That trade is the subject of the next lesson.\n\nIt is worth grounding the cost in something concrete, because \"expensive\" is not a number. On hosted services, generated video is currently priced in the region of a few cents to a few tens of cents per second of output, depending on model and resolution. Against a hit rate of one usable shot in six or eight attempts (which is a realistic figure for text-conditioned work and improves considerably with a first frame) a usable five-second shot lands somewhere between the price of a coffee and rather more. Multiply by the thirty shots a two-minute piece needs and you have the real budget. Doing that arithmetic before starting is the difference between a project that finishes and one that stops halfway."},"check":{"question":"Why do open video models list frame counts like 49 and 81 rather than 48 and 80?","options":[{"text":"Those values are chosen to match the common video frame rates used in broadcast and film, so that generated clips divide evenly into whole seconds when placed on a timeline.","correct":false,"tempting":"Neither 49 nor 81 divides evenly by 24, 25 or 30, so this cannot be the reason."},{"text":"They are the maximum counts that fit in typical consumer video memory at the model's resolution.","correct":false,"tempting":"Memory sets an upper bound but would not produce these particular values, which appear regardless of the hardware available."},{"text":"The temporal compression factor of the video autoencoder produces counts of the form four times a number, plus one.","correct":true},{"text":"Odd frame counts guarantee a central keyframe, which the model uses as an anchor for temporal attention.","correct":false,"tempting":"No such central-anchor mechanism exists; attention operates across the whole window rather than around a designated middle frame."}]},"prev":{"slug":"video-shots-not-films","title":"Video, and what it still cannot do","url":"https://addaly.com/learn/making-things-with-ai/video-shots-not-films"},"next":{"slug":"temporal-consistency","title":"What holds a moving picture together","url":"https://addaly.com/learn/making-things-with-ai/temporal-consistency"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Source and assessment review continues. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'Why a second of video costs what it does', in Making Things with AI. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/making-things-with-ai/frames-are-expensive (Accessed: 29 November 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"Why a second of video costs what it does","courseTitle":"Making Things with AI","module":{"index":5,"slug":"time-and-space","title":"Time and space: video and three dimensions"},"answer":null,"keyIdea":"Video generation is not image generation repeated, because the model must attend across frames as well as within them, so cost rises faster than the frame count and memory becomes the binding limit.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure","figure":{"caption":"Every latent position attends to every other, across space and time, so doubling the frames roughly quadruples that part of the bill. The odd frame counts (49, 81, 121) come from the video autoencoder compressing four input frames into one latent frame, plus one.","series":[{"label":"Temporal attention, growing with the square of the frames","points":[[25,1],[49,3.8],[73,8.5],[97,15.1],[121,23.4]]},{"label":"If frames were separate pictures","points":[[25,1],[49,2],[73,2.9],[97,3.9],[121,4.8]]}],"title":"Why a second of video costs what it does","type":"line","xLabel":"Frames generated in one pass","yLabel":"Cost, relative to a 25-frame clip"},"alt":"Figure: Why a second of video costs what it does. Line chart of Cost, relative to a 25-frame clip against Frames generated in one pass: Temporal attention, growing with the square of the frames (25, 1) (49, 3.8) (73, 8.5) (97, 15.1) (121, 23.4); If frames were separate pictures (25, 1) (49, 2) (73, 2.9) (97, 3.9) (121, 4.8). Every latent position attends to every other, across space and time, so doubling the frames roughly quadruples that part of the bill. The odd frame counts (49, 81, 121) come from the video autoencoder compressing four input frames into one latent frame, plus one."}},"blocks":[{"t":"h2","id":"the-naive-arithmetic-and-why-it-is-wrong","runs":[{"text":"The naive arithmetic, and why it is wrong"}]},{"t":"p","runs":[{"text":"A five-second clip at 24 frames per second is 120 frames. If video were images repeated, it would cost 120 times an image. That would be expensive and manageable."}]},{"t":"p","runs":[{"text":"It costs considerably more than that, and the reason is the part that makes video work at all."}]},{"t":"p","runs":[{"text":"A model that generated each frame independently would produce 120 unrelated pictures. To make frame 47 continue frame 46, the model must see other frames while generating each one. That means attention "},{"text":"across time","i":true},{"text":" as well as across space, and attention is quadratic: doubling the number of frames quadruples the cost of the temporal attention layers."}]},{"t":"p","runs":[{"text":"Current video models handle a fixed window of frames jointly. Within that window, every latent position can attend to every other, across both space and time. A 121-frame clip at a 60 by 104 latent resolution has on the order of 750,000 positions attending to each other. That is the number that decides what hardware you need."}]},{"t":"h2","id":"where-the-memory-goes","runs":[{"text":"Where the memory goes"}]},{"t":"p","runs":[{"text":"The practical consequence is that video generation is memory-bound rather than time-bound. You can wait longer for a slow generation. You cannot wait your way past running out of video memory."}]},{"t":"p","runs":[{"text":"Rough current figures for open video models: a small one generating a few seconds at low resolution fits in 8 to 12 GB with quantisation; the larger open models want 24 GB and gratefully accept more. This is why video generation went to hosted services for most people first, while image generation went local."}]},{"t":"p","runs":[{"text":"The mitigations are the same family as for images, applied harder:"}]},{"t":"ul","items":[[{"text":"Quantisation","b":true},{"text":" of the weights."}],[{"text":"Tiled decoding","b":true},{"text":", because the video autoencoder’s decode step is the single largest memory spike."}],[{"text":"Fewer frames per pass","b":true},{"text":", generating in chunks and joining them."}],[{"text":"Lower resolution","b":true},{"text":", then upscaling each frame afterwards, which works, and introduces its own flicker if the upscaler is not temporally aware."}]]},{"t":"h2","id":"the-video-autoencoder","runs":[{"text":"The video autoencoder"}]},{"t":"p","runs":[{"text":"Images use a spatial autoencoder that compresses by eight in each direction. Video autoencoders compress in time as well, typically by four: four input frames become one latent frame. A 121-frame clip becomes about 31 latent frames."}]},{"t":"p","runs":[{"text":"This is why video models produce frame counts in odd-looking numbers (49, 81, 121) rather than round ones. The counts are set by the temporal compression factor plus one."}]},{"t":"p","runs":[{"text":"It also introduces a specific artefact. Because four frames share one latent, fast motion within those four frames has to be reconstructed by the decoder from a single compressed representation. Rapid movement therefore comes back smeared or stuttering in a way that is not present in the latent itself. If your clip has a fast pan or a quick gesture and the result looks like a badly encoded video file, this is the mechanism, and generating at a higher frame rate does not fix it because the compression factor is fixed."}]},{"t":"h2","id":"what-this-means-for-how-you-work","runs":[{"text":"What this means for how you work"}]},{"t":"p","runs":[{"text":"Three practical consequences follow directly from the arithmetic."}]},{"t":"p","runs":[{"text":"Generate short.","b":true},{"text":" The cost curve punishes length superlinearly, and the drift problem covered later in this module punishes it again. Five seconds is not an arbitrary limit; it is where several curves cross."}]},{"t":"p","runs":[{"text":"Generate small, upscale after.","b":true},{"text":" Resolution multiplies into the same attention cost. A 480-pixel generation upscaled to 1080 costs a fraction of a native 1080 generation and is frequently indistinguishable after grading."}]},{"t":"p","runs":[{"text":"Expect to throw work away.","b":true},{"text":" Because each generation is expensive, the temptation is to accept a nearly-right clip. The professional habit is the opposite: decide in advance what “usable” means for the shot, and discard anything that is not, because a flawed clip costs you far more in the edit than a regeneration costs in credits."}]},{"t":"p","runs":[{"text":"The honest limitation to carry: none of this is a temporary inefficiency waiting for better engineering. The quadratic term is in the architecture. Approaches that reduce it (attending only to nearby frames, or compressing time harder) reduce the cost and give up exactly the long-range consistency that the attention was buying. That trade is the subject of the next lesson."}]},{"t":"p","runs":[{"text":"It is worth grounding the cost in something concrete, because “expensive” is not a number. On hosted services, generated video is currently priced in the region of a few cents to a few tens of cents per second of output, depending on model and resolution. Against a hit rate of one usable shot in six or eight attempts (which is a realistic figure for text-conditioned work and improves considerably with a first frame) a usable five-second shot lands somewhere between the price of a coffee and rather more. Multiply by the thirty shots a two-minute piece needs and you have the real budget. Doing that arithmetic before starting is the difference between a project that finishes and one that stops halfway."}]}],"check":{"question":[{"text":"Why do open video models list frame counts like 49 and 81 rather than 48 and 80?"}],"options":[{"text":[{"text":"Those values are chosen to match the common video frame rates used in broadcast and film, so that generated clips divide evenly into whole seconds when placed on a timeline."}],"correct":false,"tempting":[{"text":"Neither 49 nor 81 divides evenly by 24, 25 or 30, so this cannot be the reason."}]},{"text":[{"text":"They are the maximum counts that fit in typical consumer video memory at the model’s resolution."}],"correct":false,"tempting":[{"text":"Memory sets an upper bound but would not produce these particular values, which appear regardless of the hardware available."}]},{"text":[{"text":"The temporal compression factor of the video autoencoder produces counts of the form four times a number, plus one."}],"correct":true,"tempting":null},{"text":[{"text":"Odd frame counts guarantee a central keyframe, which the model uses as an anchor for temporal attention."}],"correct":false,"tempting":[{"text":"No such central-anchor mechanism exists; attention operates across the whole window rather than around a designated middle frame."}]}],"order":[1,3,2,0],"why":null},"prev":{"slug":"video-shots-not-films","title":"Video, and what it still cannot do","minutes":8},"next":{"slug":"temporal-consistency","title":"What holds a moving picture together","minutes":8}}}