Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Stream video from VLC to a MovieTexture

Discussion in 'Scripting' started by col000r, Nov 21, 2014.

  1. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    698
    I'm trying to do something a bit crazy: I want to take what's on the screen of a separate computer and display it on a MovieTexture in Unity.

    I was able to stream video from a simple ogg file and display it on a cube with this script (it's basically the example from the docs translated to c#)

    Now I'm trying to get a stream of live video and use that instead of the ogg file. I'm transcoding and streaming a file from a separate windows machine. I just went through the VLC stream wizard with Destination "HTTP", Port "8080", Path "/"; enabled active transcoding and set the codec to "Video - Theora + Vorbis (OGG)".

    It's streaming in VLC! - I can simply enter the local IP of the windows machine (http://192.168.0.200:8080) in VLC here on the Mac and watch the stream. But in Unity I get nothing! - www just says it's the movieTexture isn't ready to play, no error, not isDone, nothing. :/

    What am I doing wrong? Has anyone gotten streaming live-video to work inside Unity? I'd be very thankful for any kind of help!
     
    razielblood and si1984 like this.