New feature proposition: How about native video support?

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

New feature proposition: How about native video support?

Post by Mel »

For example to display intro videos, endings something like that. Also, i read somewhere that video blending was a feature which could be done in pixel shader 3. So, why not include a feature like this in a native way?

perhaps support for XVid or OGG Theora videos.

Congratulations, the engine is SUPPERB. :)
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Because of the lack of cross-platform video libraries. Moreover, this would be an external add-on, due to the additional library requirements. That's not a prohibitor, though, so if someone comes up with a cross-platform solution I guess the IrrExt project won't reject it.
If you need a solution for only one platform you can search the forum for various implementations.
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Look for Acki's IAVIPlayer (from his Irr-extension).
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Zeuss
Posts: 114
Joined: Mon Nov 08, 2004 9:02 pm
Location: Canberra - Australia
Contact:

Post by Zeuss »

This does sound like a viable IrrExt,

Probably something supporting mkv's in x264 format (audio I am a little unclear on, probably ogg but Irrlicht has no native audio as we all know). With mkv's and x264 both open source formats, and x264 has libaries for everything it could be done cross platform quite happily.
Help make Irrlicht even Better! Create and submit your own Irrlicht Extension
Want a Games Education? Try The Academy of Interactive Entertainment
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

Because of "crossplatforming" i thought those codecs would be good enough. They're free (gpl), if i'm no mistaken,anyway, i'm still a bit "noob" to the engine, and i'm not very used to it.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
killthesand
Posts: 42
Joined: Sat Sep 29, 2007 3:33 am
Contact:

Post by killthesand »

How ridiculous a task would it be to load video as a texture? Have a movie playing on 3d polygons...
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Uhm, how would you present a video in Irrlicht?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

killthesand wrote:How ridiculous a task would it be to load video as a texture? Have a movie playing on 3d polygons...
Its been done before, infact I came quite close to having a full-on video manipulation app with a video texture on a wall, I was able to fast forward and fast-rewind the video with sound. This was done using one of the video texture add-ons in the FAQ forum. (Yes there is more than one.)

On a slightly unrelated note, webcam support is quite trivial, you just need to lock the texture, copy the pixels over from your webcam librarie's output (eg OpenCV) and unlock() the texture. This is the same method used for videos, getting the actual data into Irrlicht is the easy part, you just need to handle your own decoding.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
killthesand
Posts: 42
Joined: Sat Sep 29, 2007 3:33 am
Contact:

Post by killthesand »

you just need to handle your own decoding.
I tried a couple of video loaders from the forum and didn't have much success, so I decided to make my own. I'm using libavformat and libavcodec so it should be cross platform, although I've only tested it on windowsXP. (Hooray Fedora 9 came out today!)

Here is source code and a windows demo of a 2d video player, and a video loaded as a texture. http://mihd.net/p41qiwm

Getting the libraries to link is a pain! Here is an amazing resource: http://arrozcru.no-ip.org/ffmpeg_wiki/tiki-index.php
Following that tutorial, I couldn't get automake to compile so I left the old version alone. I needed to update m4 before I could update Autoconf.

Watch out what libraries you use because your license can quickly switch from lgpl, to gpl, to illegal.

http://dranger.com/ffmpeg/ffmpeg.html has nice tutorials for using the libraries.
killthesand
Posts: 42
Joined: Sat Sep 29, 2007 3:33 am
Contact:

Post by killthesand »

Now that proper Nvidia drivers for Fedora 9 have been released, I've made a couple small changes to the video loader to make it work with OpenGL. (It does seems to run much faster with the software renderer.)

Download source and test avi here: http://mihd.net/80qklit

This needs to be linked with the following libraries
Irrlicht
GL
X11
Xext
Xxf86vm
z
m
avutil
avformat
avcodec
swscale
Post Reply