Category Archives: Visual Studio 2012

Coders Codex::Decoding Video Streams to Textures in Unity 3d

INTRODUCTION

Here we will decode an Ogg Theora file streaming from the internet onto a plane surface scripted in Unity 3d.

DISCUSSION

The fastest method to do this as of writing is to look here and then attach this to the camera in a new unity 3d scene.

FINDINGS

The Unity docs do not seem to show a C# source example, so in full Blue Peter (UK) style: Here is one I made earlier.

And the screenshot:

WWWVideoTexture.cs in Unity 3d

LINKS

WWW.movie in Unity 3d Scripting API
Video Streaming solutions for Unity3d on Stack Overflow
C# pixelInset problem on UnityAnswers
Streaming Textures in Unity3d
Video Playback Speed Discussion on Unity 3d Forums