FFmpeg.wasm icon

FFmpeg.wasm

Process audio and video files using FFmpeg.wasm

Resize

AI-generated

Summary

Resize the input video to specified width and height, outputting a resized MP4 file with H.264 video and copied audio.

Inputs

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

Output shape

binary property containing the resized MP4 video file.

Default output binary property name is 'data'; output format is always MP4.

Examples

Example 1: Resize a video to 1920x1080 without preserving aspect ratio.

Set width to 1920, height to 1080, clear keepAspectRatio or set it to false.

Example 2: Resize a video while maintaining original aspect ratio.

Keep default keepAspectRatio=true; specify width or height, the other dimension adjusts automatically using -1.

Links

Discussion