FFmpeg.wasm icon

FFmpeg.wasm

Process audio and video files using FFmpeg.wasm

Subtitle Burn-in

AI-generated

Summary

Burn subtitles into a video file using FFmpeg.wasm, supporting SRT/ASS/VTT formats with customizable font, color, position, and background opacity.

Inputs

  • binaryPropertyName — Name of the binary property containing the input video file (default: 'data')

Output shape

Video with burnt-in subtitles stored in outputBinaryPropertyName. Output binary property defaults to 'data' and is hidden when operation is 'metadata'.

Output file format defaults to 'mp4'; for x264-compatible formats (mp4, mkv, mov, etc.), video is re-encoded with libx264 using the selected encoding preset.

Examples

Example 1: Burn SRT subtitles into an MP4 video with default font size and white color.

subtitleBinaryProperty: 'subtitle', subtitleFormat: 'srt', subtitleFontSize: 24, subtitleFontColor: 'white', subtitleOutputFormat: 'mp4'

Example 2: Burn ASS subtitles with a semi-transparent background and centered positioning.

subtitleBinaryProperty: 'subtitle', subtitleFormat: 'ass', subtitleFontSize: 28, subtitleFontColor: '#FF0000', subtitleBgOpacity: 0.7, subtitlePosition: 'center', subtitleOutputFormat: 'mp4'

Links

Discussion