Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Video encoding compatibility reference

Refer to the encoding compatibility options.
Read time 2 minutesLast updated 12 days ago

Video encoding compresses video files using a codec to save bandwidth and storage.

Codecs

Codec

Advantages

Disadvantages

H.264Best natively supported codec for hardware acceleration.
H.265Higher compression.Limited to supported devices.
VP8Cross-platform support and comprehensive feature set.Consumes more resources compared to H.264.
The Unity Editor supports the .ogv format, but it isn’t widely supported on other platforms. Transcode .ogv files into .mp4 (H.264) or .webm (VP8) depending on the target platform.
Note
Android supports VP8 using native libraries, so VP8 might be hardware-assisted on some Android devices.

Encoding with external programs

If you use video files that the target platform supports, you can manage encoding with an external program for finer control. You can disable the Transcode property in the Video Clip Importer so Unity doesn’t modify the video files.

Key encoding values

The following table lists key values in your encoding parameters:

Parameter

Description

Video CodecH.264, H.265, or VP8.
ResolutionThe resolution of your display. For example: 1280 × 720.
ProfileThe profile is a set of capabilities and constraints, often specified by the vendor, such as Baseline or Main. Applies to H.264/H.265. See H.264 or H.265.
Profile LevelApplies for H.264/H.265. Within a given profile, the level specifies performance requirements, for example, Baseline 3.1.
Audio CodecAAC (for .mp4 videos using H.264/H.265) or Vorbis (for .webm videos using VP8).
Audio ChannelsDependent on the platform. Refer to the developer guide for your platform. For example, the article on Supported media formats for Android.

H.265 compatibility

The following table provides platform-specific requirements and information for the H.265 codec:

Platform

Requirements

Encoding/Decoding

Notes

macOSSDK 10.13+Hardware encoding: 6th Generation Intel Core processor

Software encoding: All Macs

Hardware decoding: 6th Generation Intel Core processor

Software decoding: All Macs
WindowsWindows 10 + HEVC extensionsEncoder

Decoder
HEVC extension (Hardware only)

HEVC extension (Hardware + software support)
UWPWindows 10+If a device lists support for H.265, that might not apply to all devices within the device family.
Android5.0+
iOSSDK 11.0+Hardware decoding: A9 Chip

Software decoding: All iOS Devices
tvOSSDK 11.0+

Additional resources