Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


VideoEncodingProfile

Use the options in this enumeration to change the encoder profile.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Enum
  • Namespace: UnityEditor
  • Assembly: UnityEditor
public enum VideoEncodingProfile

Remarks

H.264 profiles (Baseline, Main, and High) are compression and encoding standards that determine how the MediaEncoder compresses and encodes video files during recording. You can use the
MediaEncoder
to encode clips and choose the encoding profile via C#. The encoding profile you select influences the compatibility and compression efficiency of the H.264 codec. To record video, you can use the Unity Recorder, which uses the
MediaEncoder
in its implementation, or you can implement your own custom recording logic to work directly with the
MediaEncoder
API.
For a code example, refer to H264EncoderAttributes.
This enum isn’t exposed in VideoClipImporter, so when you transcode video clips to H.264 during an import, Unity uses the baseline profile for maximum stability and compatibility.

Fields

Value

Description

H264BaselineEncode video with the H.264 Baseline profile, the simplest profile with the broadest device compatibility.
H264HighEncode video with the H.264 High profile, the most advanced profile for high-definition content.
H264MainEncode video with the H.264 Main profile, the mid-tier option for standard-definition content.