Extension: omni.videoencoding-0.1.2

Documentation Generated: Sep 22, 2025

Overview#

The Video Encoding Extension provides a programmable interface to encode image frames into MP4 video files. It allows you to encode frames from raw RGBA buffers or image files and offers control over essential video encoding parameters during a video export session.

Concepts#

At the core of this extension is the IVideoEncoding interface, which exposes methods to start an encoding session, encode frames (from buffers or files), and finalize the video file. The design lets you integrate video encoding into applications by simply acquiring and releasing the encoding interface as needed.

Functionality#

  • The interface method start_encoding prepares the plugin for processing frames by creating an output video file and accepting parameters such as framerate, total number of frames, and overwrite options.

  • Frame encoding can be executed either from raw image data (using encode_next_frame_from_buffer) or directly from existing image files (using encode_next_frame_from_file), enabling flexibility for various workflows.

  • Once all frames are processed, finalize_encoding closes the output file ensuring the video is ready for playback.

Configuration#

Unique encoding settings in the extension allow you to fine-tune the output video. Configurable parameters include:

  • Bitrate and framerate, which determine video quality and playback speed

  • I-frame interval, maximum encode dimensions, preset, profile, and rate control mode, which directly impact the encoding efficiency and output compatibility

  • An option to set the video full range flag for luma and chroma sample processing

These settings are defined in the extension.toml file, ensuring that encoding behavior can be adjusted to meet specific performance and output requirements.

Relationships#

This extension depends on the omni.assets.plugins package to support image file handling via the carb.imaging API. It also integrates a native plugin from the RTX build, ensuring efficient video encoding performance.