Nodes/Advanced Text Overlay/Instagram Question Box - Video
ComfyUI Node

Instagram Question Box - Video

That Instagram question sticker, but animated over your video

By scofano·Created 10 months ago·Updated 3 months ago· 24
Instagram Question Box - Video
    • video_path
    video_path
    filename_prefixIGQuestion
    delete_originalfalse
    question_textAsk me a question
    answer_text
    question_fontArial Black
    question_font_size30
    question_letter_spacing-0.5
    question_fill_color_hex#FFFFFF
    question_fill_alpha1.00
    answer_fontArial
    answer_font_size50
    answer_letter_spacing0.0
    answer_line_spacing4.0
    answer_fill_color_hex#000000
    answer_fill_alpha1.00
    box_width950
    header_height90
    body_height200
    answer_padding16
    header_color_hex#323b42
    header_alpha1.00
    body_color_hex#FFFFFF
    body_alpha1.00
    corner_radius32
    box_shadow_enabletrue
    box_shadow_color_hex#000000
    box_shadow_alpha0.50
    box_shadow_distance10
    box_shadow_blur15
    horizontal_alignmentcenter
    vertical_alignmentmiddle
    x_shift0
    y_shift0
    animatefalse
    animation_kindfade_in
    animation_frames32
    animation_easeease_in_out
    animation_opacity_target1.00
    pause_seconds_before_start0

    The image version of Instagram Question Box is great for a still story frame, but stories are usually video. This is that same two-panel "Ask me a question" sticker, rendered on every frame of a real video file, written back out as a new MP4 - with the original audio track stitched back in. You get the full sticker look with animation, and the result drops straight into ComfyUI's output folder.

    Mechanically it's the video counterpart to the pack's Advanced Text Overlay - Video node: imageio reads the source frame by frame, the same 4×-supersampled rounded-box renderer (Lanczos downscale, Gaussian-blur shadow) composites the sticker over each frame, and the writer spits out an MP4. At the end ffmpeg does a stream copy (-c copy -map 0:v:0 -map 1:a:0) to re-mux the original audio, so the soundtrack comes along untouched. If ffmpeg isn't available, you still get a perfectly good silent video and a console warning.

    The inputs that matter

    The full sticker controls from the image node are here - question_text, answer_text, the separate question_font / answer_font typography clusters, box_width / header_height / body_height (defaults tuned for a 1080-wide portrait story), corner_radius, box_shadow_*, and positioning. The differences are at the top:

    • video_path - full path to the input video file.
    • filename_prefix - output is named {prefix}_{original}.mp4 (default IGQuestion), auto-incrementing so it never clobbers an existing file.
    • delete_original - removes the source video after processing. Leave it off until you've verified the output.
    • pause_seconds_before_start - the pause before animation starts, in seconds, converted to frames using the source FPS. This is the video-node version of pause_frames_before_start, which is what the image node uses.

    Everything else behaves like the still version: answer text supports the inline <b> / <i> / <br> / <span color> rich text, word-wraps to the box, and the animation system fades or slides the sticker in over animation_frames, then holds the final pose for the rest of the clip. The single output is a video_path string, and the node is flagged as an output node so the result shows up in the outputs panel.

    Installing it

    Same pack, same install as the other three nodes - ComfyUI Manager, search "Advanced Text Overlay", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/scofano/ComfyUI-Advanced-TextOverlay
    pip install -r requirements.txt
    

    Restart, and it's under Advanced Text Overlay. No models or keys required.

    Where people get burned

    Two things, both shared with the pack's other video node. First, ffmpeg is an external binary, not a pip dependency - if it's missing from your PATH the video renders but comes out silent. Second, this is a full per-frame re-encode, so a long clip takes a while; set your animation_frames sensibly and don't expect real-time. And because delete_original nukes the source, run one render with it off first. The header text still truncates with an ellipsis rather than wrapping, so keep question_text short - the detail belongs in the body.

    CategoryAdvanced Text Overlay

    Inputs (40)

    NameTypeDefaultDescription
    video_pathSTRING
    filename_prefixSTRINGIGQuestion
    delete_originalBOOLEANfalse
    question_textSTRINGAsk me a question
    answer_textSTRING
    question_fontCOMBOArial Black33 options: Arial, Arial Black, Arial Narrow, C059, Comic Sans MS, Courier New, +27
    question_font_sizeINT301–999
    question_letter_spacingFLOAT-0.5-10–50
    question_fill_color_hexSTRING#FFFFFF
    question_fill_alphaFLOAT1.000–1
    answer_fontCOMBOArial33 options: Arial, Arial Black, Arial Narrow, C059, Comic Sans MS, Courier New, +27
    answer_font_sizeINT501–999
    answer_letter_spacingFLOAT0.0-10–50
    answer_line_spacingFLOAT4.00–100
    answer_fill_color_hexSTRING#000000
    answer_fill_alphaFLOAT1.000–1
    box_widthINT95050–4096
    header_heightINT9010–2048
    body_heightINT20010–2048
    answer_paddingINT160–512
    header_color_hexSTRING#323b42
    header_alphaFLOAT1.000–1
    body_color_hexSTRING#FFFFFF
    body_alphaFLOAT1.000–1
    corner_radiusINT320–200
    box_shadow_enableBOOLEANtrue
    box_shadow_color_hexSTRING#000000
    box_shadow_alphaFLOAT0.500–1
    box_shadow_distanceINT100–100
    box_shadow_blurINT150–60
    horizontal_alignmentCOMBOcenter3 options: left, center, right
    vertical_alignmentCOMBOmiddle3 options: top, middle, bottom
    x_shiftINT0-4096–4096
    y_shiftINT0-4096–4096
    animateBOOLEANfalse
    animation_kindCOMBOfade_in6 options: fade_in, fade_out, move_from_top, move_from_bottom, move_from_left, move_from_right
    animation_framesINT321–1000
    animation_easeCOMBOease_in_out4 options: linear, ease_in, ease_out, ease_in_out
    animation_opacity_targetFLOAT1.000–1
    pause_seconds_before_startINT00–100000

    Outputs (1)

    NameTypeDescription
    video_pathSTRING