Skip to content

Roliga/udon-video-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Udon Video Decoder

Udon Video Decoder is a library for loading videos generated by Pixel Proxy, allowing you to load arbitrary API calls into VRChat.

See VideoDecodeExample.cs for a complete usage example.

Some demos are available in the Udon Video Decode Demo VRChat world.

Dependencies

Scene Setup

  1. Create an empty GameObject in your scene and attach the VideoDecoder.cs script to it.
  2. Pick a Render Texture and Blank Texture in the Video Decoder settings. Some preset ones are provided with this package. If you make your own, make sure that:
  • These textures match in size.
  • The blank texture has Read/write enable.
  • The Blank Texture has Compression disabled.
  1. In your own program, define a variable like public VideoDecoder videoDecoder.
  2. Assign the Video Decoder GameObject to this variable.
  3. You can now call videoDecoder.LoadURL to load your data.

API

LoadURL

LoadURL(VRCUrl url, UdonSharpBehaviour callbackBehaviour, string callbackField, string callbackMethod, string callbackErrorField, string callbackErrorMethod)

Loads the specified URL asynchronously.

  • callbackBehaviour: The UdonSharpBehaviour that the following callbacks reside in.
  • callbackField: Name of field to put the returned data on. Type of this field should be byte[].
  • callbackMethod: Name of method to call on success.
  • callbackErrorField Name of field to put load error code in. Type of this field should be VRC.SDK3.Components.Video.VideoError.
  • callbackErrorMethod: Method to call on failure.

Any of the callback* parameters can be set to null if you don't need them.

CancelLoad

CancelLoad()

Stops the internal video player, cancelling any currently loading data.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages