What is the simplest way to render video into memory (for drawing to a texture) in .NET?
Posted
by
sebf
on Game Development
See other posts from Game Development
or by sebf
Published on 2012-04-29T23:06:10Z
Indexed on
2012/06/05
22:48 UTC
Read the original article
Hit count: 255
In my project I would like to be able to play back video on surfaces in the world. I intend to do this by having the video frames rendered to a block of memory, then use this to update a texture each frame. Everything is in place - except for the part that actually gets the video.
I have looked on Google and found that the video library world is very expansive (and geared towards video processing), and am having trouble finding a suitable one.
FFMpeg is very comprehensive, but is an entire suite and would take a good amount of work to integrate. So far the most promising library I've found is the one based on the VLC player libraries - by virtue of it using the same resources as VLC Player it is known to be very capable; it also renders to blocks of memory, but the API (at least of the one on Codeplex) is more of a port of the C++ API rather than a managed wrapper.
The 'solution' can be any wrapper/API/library, but with characteristics that make it suitable for use in a rendering engine, namely:
- Renders the video frame data to memory, so it can be picked up and passed to a texture on the GPU easily.
- Super simple - all that is needed is a way to load, jump and render a frame programatically - ideally it would use the systems codecs and not require an assortment of plugins.
- Permissive license (LGPL or more free-er)
- .NET bindings at least; all the better if it is natively managed
Can anyone suggest a lightweight, (.NET) library, that can take a video file, and spit out some frames into a byte[]?
© Game Development or respective owner