I am a newbie to Unity and I would like to display a movie texture directly from Youtube. It seems that WWW class handles movie texture but only in OGG format.
Is there an other way to receive and display a movie texture? (by using C#?) I want to read the movie on the fly from the original server so the solution to convert in OGG does not suit.
If you want to stream on the fly then you have to use a file in Ogg format you can’t just pull arbitrary YouTube vids (or any other random vids) and play them back. You can use other formats (*.mov, *.avi, *.asf, *.mpg, *.mpeg and *.mp4) by including them in your build at author time as Unity will convert them to Ogg for you, but that’s not quite what you’re after based on your post.
Thanks Tom for your answer.
By looking in previous posts an other way will be to integrate a HTML/Flash player inside Unity (as Webkit with off-screen rendering capabilities) but Unity plugins can only be done in the standalone version of Unity, right? and I would like to use the webplayer…
The only other solution would be to transcode in realtime in OGG format with a specific server platform, but I am not sure of the feasibility. We are going to investigate this solution.
If you intend for this to scale, and without some serious hardware, transcoding to any reasonable resolution is not really feasible.
We use ffmpeg, which you can automate, and it does a pretty good job at converting files. However, it’s far from realtime and Ogg files tend to be much larger than their original source.
Maybe you could setup an Amazon EC2 server that batch converts videos and spits them out as Ogg. I think there may even be a pre-built AMI. There would be a delay in conversion, but the low cost and high scalability would be a big upside.