Dalian Works
aifilm

Why Every AI Film Shot Needs Two Images: First and Last Frames Explained

Published 2026-11-04 · Translated from the Chinese original

Every shot in an AI film requires two images—a first frame and a last frame—and the reason is one sentence: Jimeng's video generation is driven by first and last frames. The first frame defines the starting point of the image; the last frame defines the end point; the motion in between is derived by the model itself. If you provide only a first frame, the model doesn't know where the image should go. The generated video will drift, flicker, or outright leave an STCODE.png placeholder at the last-frame position, killing the entire shot. Based on the practical work of "The First Avenue," with 1,029 shots and two images per shot, that's 2,058 first and last frames total—not one can be missing. How are first and last frames generated? They're not just two random images thrown together; each has its own generation channel. The first frame is generated using the arcpictask.taskdes image-generation prompt; the last frame uses the same set of prompts but goes through a different branch. Character images go through drawrole via Volcano Engine synchronous direct call; location images go through placeaiwords' empty-rolex branch as pure text-to-image. If a scene contains both a person and a location, it goes through placeaiwords' character-present branch with scenetopic for image-to-image compositing. The compositing logic is: fmpic holds the character image, plcpic holds the location image, and the two are overlaid to produce a complete scene last frame. In other words, first frames and last frames follow different generation paths, but they must both attach to the same storyboard record, distinguished by -a and -b suffixes. The material states it plainly: every shot produces two images—first frame -a, last frame -b—and this naming rule exists so the program can recognize them as pairs. Is a first frame alone acceptable? No, and the consequence is specific. The material names this among the five pitfalls you will step in: first and last frames must be generated as a pair, otherwise secondpic leaves an STCODE.png placeholder. This placeholder isn't a blank image; it's an image annotated with error information. When the program detects it, it knows that video generation for this shot failed. If you force a shot with only a first frame into video generation, Jimeng's model treats the first frame as the start point, then makes up its own end point—motion may distort, characters may skip frames, scenes may warp. Based on experience, sometimes the model happens to produce decent-looking footage, but that luck is extremely unstable. Getting one good shot out of ten would be a good outcome. So don't gamble—fill in the last frame before running. Why is the last frame so important? Because video generation works by interpolating from the first frame to the last frame. You treat the first and last frames as two anchor points, and the model draws a motion path between them. Every frame along that path must resemble both the first frame and the last frame for the transition to feel natural. Without a last frame, the model has only one anchor. It has to invent an end point out of nothing, and whether it does a good job is pure luck. The material says the full film runs two hours and twenty minutes with 1,029 shots, and every single video must generate stably—you can't rely on luck. That's why first and last frames must exist together, and why their style, characters, and scenes must match. If your first frame uses an ancient-costume character but the last frame uses a modern-costume character, the model will render a mid-process where the character slowly changes outfits—and the visual is ruined. What does the last frame get drawn with? Not a random photo or something pulled off the internet—it comes from the coordinated use of the system's three image-generation branches. Characters go through drawrole, producing the same character in different poses; locations go through placeaiwords' empty-rolex branch, painting an empty scene view; scenes go through placeaiwords' character-present branch, compositing the character and location together. In the compositing prompt, fmpic is the character image and plcpic is the location image; the two combine into one scene image. Only thus can the generated last frame exist in the same world and under the same lighting logic as the first frame. If your first frame is daytime and your last frame is nighttime, the transition will flicker between bright and dark. So the last frame isn't just "the final image"—it forms a complete motion start-and-end segment with the first frame. Based on experience, within the same shot, the angle can change and the shot size can change, but core elements like character costume, scene dressing, and lighting direction must remain consistent, otherwise the seams in video generation will leak through. What step do beginners most often get wrong? Based on experience, seven out of ten people fall into the same trap: they run the first frame, think it looks good, and directly call Jimeng to generate the video, completely forgetting the last frame. The generated video looks fine for the opening seconds, then gets increasingly absurd, and finally the image smears into a blur or the character disappears. After hours of debugging, they find out the secondpic field still contains the STCODE.png placeholder—the last frame was never generated. Another common mistake is generating first and last frames not as pairs but in batches—all first frames one day, all last frames the next. The style parameters between first and last frames end up misaligned, and the resulting images look like they're from two different worlds. The material specifically mentions that the large model channel is bound to a uid via CRTOR, meaning every call must maintain consistent context. If you start a new session the next day, the model no longer remembers the previous style settings. So the correct approach: for the same shot, generate first and last frames together in one pass—don't split them across two time periods. Are there counterexamples? Yes. I've seen someone who, to save money on two images, generated only first frames throughout the entire process, cutting the image count from 2,058 to 1,029 and halving image generation costs. But in the video generation stage, every single shot failed and retried because the last frame was missing, burning more than twice the money. In the end, they had to fill in all the last frames, and the total cost was higher than if they'd done it properly from the start. That's a textbook case of penny-wise, pound-foolish. Someone else, in the image-to-video stage, switched to batch-producing videos by pairing the same first frame with different last frames. On the surface it looked fast, but every video had identical shot language, and audiences got bored after ten minutes. The material puts it strongly: "The essence of this design isn't the prompts; it's breaking a film into enumerable, re-runnable, replaceable records." First and last frames existing as a pair is the smallest closed loop in this record system. Break that loop, and every downstream link fails in cascade. What's the logic behind this design? It exists so you can swap actors, change actions, and adjust shots without redoing everything. When you store each shot's first and last frames as independent records, if you find one video's motion trajectory is wrong, you only need to regenerate that shot's first and last frames, run video generation once more, and no other shot is touched. If you stored only a first frame, adjusting the motion trajectory means rewriting the entire video prompt and regenerating the whole film—the cost and effort are on a completely different scale. Based on experience, this approach aligns with the core principle of database design: rather save one extra record than sacrifice re-runnability to save storage space. So the relationship between first and last frames isn't just about appearing as a pair; they're the most fundamental atomic unit in the entire film engineering effort. What's the immediate next action? Pick a shot you're currently working on. If it has only a first frame, generate a last frame for it. Then run the same video generation API twice: first pass using only the first frame without the last frame; second pass with both frames complete. Compare the outputs. Based on experience, the first pass will start showing image drift and motion distortion after two or three seconds, while the second pass stays stable throughout with clean motion. Once you see this difference with your own eyes, you'll never think about skipping a frame again. The material has already spelled this out in the pitfall list—you step in it once, and you remember for good.