Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to load a video from file in XNA ? (PC Only)

Tags:

video

xna

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.

like image 431
Shachar Weis Avatar asked Dec 22 '09 21:12

Shachar Weis


People also ask

Is Microsoft XNA free?

Microsoft XNA (a recursive acronym for XNA's not acronymed) is a freeware set of tools with a managed runtime environment that Microsoft developed to facilitate video game development.

What is Microsoft XNA redistributable?

The XNA Framework Redistributable download provides game developers with the XNA Framework run-time libraries they can include with their product for redistribution on the Windows platform.


1 Answers

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.

like image 87
Tom Gillen Avatar answered Oct 20 '22 11:10

Tom Gillen