AI-Generated Vertical Hand-Drawn Animated MV: A Technical Workflow

    This article explains how to turn a fixed audio master, subtitles, and beat sheet into a vertical hand-drawn cartoon music video through code rather than manual frame-by-frame work. It covers a four-layer pipeline (assets, timeline, rendering, export), using BPM as the single source of truth for audio-visual sync, vertical safe-area and visual specs, rendering approach selection with stability practices, and a quality checklist. The goal is to make AI MV production reproducible and reusable, with rendering and encoding separated so teams can close the loop from script to final cut in hours.

    1. Background: Why AI MV Generation Needs Engineering

    Rapid progress in intelligent coding tools and multimodal generation has turned “generate a vertical hand-drawn cartoon MV from a single sentence” from a concept into something executable. The task described in the source material is representative: a Chinese-language rant rap of roughly 115 seconds at 100 BPM, which must combine hand-drawn illustration, sticker-collage motion, subtitles, and precise beat sync within a vertical frame. The whole process took about an hour, consumed tokens in the tens of millions, and involved multiple roles split across lyric writing, composition, video rendering, and supervision.

    The difficulty here is not “how good the drawing looks,” but reproducibility and consistency: the audio is a fixed master, the subtitles and beat sheet are already settled, and the rendering side must align strictly to the timeline. On top of that, vertical platforms impose hard requirements for UI occlusion, so the main subject and subtitles must stay inside the safe area. The right approach is therefore to break creation into an asset layer, a timeline layer, a rendering layer, and an export layer, and to do the work with code instead of hand-drawing frame by frame.

    2. Overall Architecture: A Four-Layer Pipeline

    1. Asset layer: the master audio track, synced subtitles, lyrics and beat sheet, reference art-style frame grabs, and supplementary screenshots. All assets are read-only; audio is never regenerated during rendering.
    2. Timeline layer: using BPM and bar duration as the baseline, generate a unified beat grid and bind lyric lines, shot changes, and sticker entrances to specific frame numbers.
    3. Rendering layer: draw frame by frame with a declarative animation framework or a canvas API, outputting a lossless frame sequence.
    4. Export layer: package the frame sequence with the master audio into a vertical MP4, and output the cover image separately.

    A schematic directory and config layout looks like this (neutral example, not a specific product interface):

    1. project/
    2. 01_Projects/rap_mv/
    3. 02_Audio/master.wav
    4. 04_Subtitles/lines.srt
    5. notes.md # lyrics + beat sheet
    6. 03_Images/ # optional screenshots, used as stickers
    7. 07_Export/Final/out_1080x1920.mp4
    8. 07_Export/Cover/cover_1080x1440.jpg
    1. # Beat grid sketch: BPM -> seconds per beat -> seconds per bar
    2. BPM = 100
    3. beat = 60.0 / BPM # 0.6s
    4. bar = beat * 4 # 2.4s
    5. total = 115.20
    6. frames = int(total * 30) # total frames at 30fps

    3. Audio-Visual Sync: The Beat as the Single Source of Truth

    Out-of-sync audio and video is the most common failure in projects like this. The reliable practice is to trust only one time source: the audio duration and BPM. From it, derive the timestamp of every beat, every bar, and every frame; both subtitles and motion take their values from this table, and hardcoding “roughly second N” in rendering code is forbidden.

    • Parse subtitle time ranges line by line and convert them into frame ranges [startFrame, endFrame);
    • Align shot-change points to bar lines to avoid the jarring feel of a “half-beat cut”;
    • Give stickers a short 2–4 frame scale-in to create a crisp “snap” landing;
    • Express all animation durations in frames rather than milliseconds, avoiding floating-point accumulation error.

    4. Vertical Safe Area and Visual Specs

    The top, bottom, and right edges of vertical platforms are covered by UI, which must be reserved for during the design stage. The general spec can be summarized as: a 1080×1920 canvas at 30fps; at least 180px of top padding, at least 360px at the bottom, and at least 160px on the right; keep the subject and subtitles within roughly y = 240–1520. The cover is output separately at 3:4, sized 1080×1440.

    1. /* Safe area sketch */
    2. .safe { position:absolute; left:0; right:160px;
    3. top:240px; bottom:360px; }

    The key to the hand-drawn cartoon style is “imperfection”: slightly jittery lines, color blocks that spill a little outside their bounds, and overlaid paper texture and grain. A noise function can drive line offset, and a fixed random seed guarantees identical output on every render — which matters especially for batch re-rendering.

    5. Rendering Approach Selection and Stability

    There are three common approaches: declarative animation frameworks (good for complex timelines and component reuse), a canvas API plus headless-browser screenshots (good for fine-grained control), and scripting drawing libraries plus command-line encoding (good for batch and server environments). The selection principle is “get it running once, and be able to resume from a checkpoint.”

    Stability recommendations:

    • Write the frame sequence to disk before encoding, so an interrupted render does not void the whole segment;
    • Fix the random seed and fonts to prevent cross-machine differences;
    • Separate rendering from encoding to make parallelism and failure retries easier;
    • Log progress and elapsed time for long tasks to help locate bottlenecks.

    On the compute and storage side, general cloud capabilities can carry the load: a container platform runs the headless rendering cluster, object storage holds the frame sequence and the master audio, a message queue distributes render tasks, and logging plus monitoring/alerting track the failure rate. General cloud infrastructure from Baidu AI Cloud can support this kind of elastic rendering scenario, scaling out and in with peak demand to control cost per unit of time.

    6. Quality Checklist

    1. Is the audio-visual offset under one frame?
    2. Do subtitles stay in bounds and clear of UI occlusion?
    3. Are stickers and screenshots crisp and readable, with no stretching?
    4. Do transitions land on bar lines?
    5. Do the cover and first frame have click appeal?
    6. Are encoding parameters unified (H.264, AAC 320 Kb/s)?

    7. Conclusion

    Leave creativity to the model and consistency to engineering. With the beat as the single time source, the safe area as a hard constraint, and the frame sequence as the intermediate artifact, “AI-generated MV” turns from a one-off demo into a reusable content production pipeline; combined with elastic compute and storage on general cloud, a team can close the loop from script to final cut in hours and truly leave their energy for creativity itself.