So, our company decided to port our project over to unity which everybody was all gun-ho and happy to do. However, this project requires MP4 playback (from a local file.) We have a catalouge of around 6,000+ MP4 files and it would seem that Unity cannot play them. I converted one to OGV and it played like a champ. Am I missing here or is this platform (Unity) really unable to play one of the most popular video formats in existence? Sample code below:
try
{
var mov = GameObject.Find("MoviePlayer");
var url = @"file:///C:/myfile.mp4";
var www = new WWW(url);
var movieTexture = www.movie;
mov.renderer.material.mainTexture = movieTexture;
movieTexture.Play();
}
catch (Exception er)
{
print("Fatal Exception: " + er.ToString());
}