Configuration: Video Manager - vrctxl/VideoTXL GitHub Wiki
The video manager is responsible for managing one or more video sources within the TXL video player. A video source is a collection of objects that includes a low level video player component (either "Unity" [VRCUnityVideoPlayer] or "AVPro" [VRCAVProVideoPlayer]), a material capture object, bound audio sources, and a VideoSource script stating the configuration of the video source.
In versions 1.x of VideoTXL, a single Unity and AVPro video source were baked into the internals of SyncPlayer, and a separate LocalPlayer was provided for each flavor of video source. In 2.x, more than one copy of either Unity or AVPro video sources can be made available to the player, which opens the door for changing properties at runtime like low latency or maximum resolution.
Adding or Removing Video Sources
VideoTXL comes with a number of preconfigured video sources under Texel/Video/VideoSources
- Unity1080 (Unity, 1080 max res)
- Unity720 (Unity, 720 max res)
- Unity360 (Unity, 360 max res)
- AVPro1080LL (AVPro, 1080 max res, low latency)
- AVPro1080 (AVPro, 1080 max res, standard latency)
- AVPro720LL (AVpro, 720 max res, low latency)
- AVPro720 (AVPro, 720 max res, standard latency)
- AVPro360LL (AVPro, 360 max res, low latency)
- AVPro360 (AVPro, 360 max res, standard latency)
Additionally, the prefabs AVProTemplate and UnityTemplate are the base prefabs that the above variants derive from. You can easily make more prefab variants of you own by starting with one of the templates.
Too add new sources, drag one of the prefabs under the TXL video player's Video Manager node, and add a reference to it in the Sources list on the Video Manager object itself.
To remove sources, remove the reference from the Sources list. Removing the corresponding object itself is optional.
Default Setup
The default SyncPlayer prefab comes with the Unity1080 and AVPro1080LL video sources preset, matching the behavior of the 1.x SyncPlayer. There are other variant prefabs available, such as one that exposes all of the above video sources and corresponding options.
If you're building a world with a complex audio setup, you may wish to remove any of the Unity-based video sources. Unity will not support outputting a channel to multiple audio sources. On the other hand, if you need to make use of audio filters, you may wish to remove any of the AVPro-based sources, even though you will be unable to play live streams and some other types of video content.
There was a historical period where Unity-based sources were preferred for YouTube and other normal videos, as AVPro was struggling to process them. This seems to no longer be true, and AVPro can play anything Unity can.
Audio Resources
Video sources come with an empty AudioResources node. On the VideoSource script, there is a corresponding list called Audio Groups. Neither of these need to be configured by hand, as they will be auto-generated later. See Audio Manager Configuration for how audio is configured. Any time you add a video source, check the Audio Manager to sync up the audio resources.
Resolution and Latency options
The video player will automatically expose options for preferred resolution or latency if the mix of video sources present would make multiple options available.
The use of the word preferred is deliberate, as options are not relevant or enforceable in all instances. Low latency, for instance, can only be set for AVPro-based sources, whereas Unity-based sources are assumed to be standard latency. Resolutions dictate the maximum resolution requested, and may result in smaller video resolutions being returned when the exact match is not available, or a larger resolution returned if no resolutions are available to meet the request. When loading YouTube videos, 1080 videos aren't able to be returned, so 720 videos would be returned for both the 720 and 1080 sources.