tags:

views:

365

answers:

3

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.

A: 

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. :-)

Joel Martinez
A: 

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.

Joel Martinez
+3  A: 

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.

Aphid
This sample loads models with :contentBuilder.Add(fileName, "Model", null, "ModelProcessor");I could not find a "Processor" that would load Video.I tried "VideoProcessor" But that does not work.
Shachar Weis