I want to show a video texture in my application with the video file being supplied by the user.
Texture2d
has a FromFile
method, but Video
doesn't.
Any ideas? (I only need PC support)
Thanks.
I want to show a video texture in my application with the video file being supplied by the user.
Texture2d
has a FromFile
method, but Video
doesn't.
Any ideas? (I only need PC support)
Thanks.
This unfortunately won't work ... their API requires that the video be processed through the content pipeline.
I haven't updated it since the video APIs were released by the XNA team, but you can check out this open source project I wrote, Scurvy.Media (http://scurvymedia.codeplex.com/). It was also a content pipeline, but perhaps you can modify it to work via a .FromFile type method.
feel free to contact me via codeplex if you have any questions. :-)
You could also try the XNA DirectShow Video Player:
http://xnadsplayer.codeplex.com/
I've never used it, so not sure how well it works, but it's another option for you.
You could try using the video API added in XNA 3.1, together with the winform content loading sample on the creators site. The sample shows how to allow the user to select a content file, and have the system compile it to .xnb and then load it back into memory at runtime.