Video

Local video import, sprite playback and synchronized audio.

Getting started

  1. Install Video in Package Manager.
  2. Import the VideoPlayback example and open its scene.
  3. Press Play. Space pauses/resumes, R restarts, and arrow keys seek.

Importing

Portable Frames is the default and plays on Windows, Linux, macOS, Web, Android, and iOS. Windows can convert it with Media Foundation when FFmpeg is absent. Original Container preserves the source file and uses Windows Media Foundation for runtime decoding.

VideoPlayer

Assign clip and targetRenderer, then use Prepare / Play / Pause / Stop. Set time to seek, isLooping to repeat and playbackSpeed / volume / mute to control playback. Observe isPrepared / isPlaying / frame / texture and subscribe to playback/error events.

Direct playback

VideoPlayer supports file and HTTP(S) URL sources, independent cursors and software/D3D11 decoding. The native path currently requires Windows. Preparation and reads are synchronous; unknown-duration live streams, DRM, subtitles and HDR tone mapping are not included. Asset bundles retain compressed container bytes.

Streaming, hardware decoding, time semantics and limits

Full package guide · FFmpeg documentation

逐帧定位、事件与新增示例