HOW TO PLAY A VIDEO ????

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
jeromegz
Posts: 14
Joined: Sat Aug 02, 2008 10:51 am

HOW TO PLAY A VIDEO ????

Post by jeromegz »

imagine a game without cinematique ?.But avi is not open and it is "propriétaire".How to display a movie ?
you have 3 choice
1) pay royalties
2) construct your own movie library (with a little help of libtheora or ogm format , ogg) -> very good choice , i plan a library but not today
3) play png sequence in a mesh :


IAnimatedMesh* complex = smgr->getMesh("../../media/plan.obj");
IAnimatedMeshSceneNode* nodecomp = smgr->addAnimatedMeshSceneNode( complex );

//utiliser du png pour moins de problemes de droits
//use png because it is royalties free !
if (nodecomp)
{
nodecomp->setMaterialFlag(EMF_LIGHTING,false);


core::array<video::ITexture*> textures;

char tmp[64];
for (s32 ge=1; ge<55; ++ge)
{

/* if (ge<10)
sprintf(tmp, "../../media/Textures/caust0%d.jpg", ge);
if (ge>10)
sprintf(tmp, "../../media/Textures/caust%d.jpg", ge);
*/
if (ge<10)
sprintf(tmp, "../../media/Cinematiques/000%d.png", ge);
if (ge>= 10 && ge < 100)
sprintf(tmp, "../../media/Cinematiques/00%d.png", ge);

if (ge>= 100 && ge < 1000)
sprintf(tmp, "../../media/Cinematiques/0%d.png", ge);


video::ITexture* t = driver->getTexture(tmp);
textures.push_back(t);
}


scene::ISceneNodeAnimator* animcaustic = smgr->createTextureAnimator(textures, 32,true);

nodecomp->setMaterialType(video::EMT_SOLID );
nodecomp->addAnimator(animcaustic);

animcaustic->drop();



nodecomp->setScale(core::vector3df(5,5, 5));

}



but the probleme is that this exemple require an enorme quantity of memory to display png animation...

do not hesitate to reply if you have an idea about cinematiques

thank you
Hello
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

search the forum as video playing has been talked about a lot before!
Image Image Image
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Re: HOW TO PLAY A VIDEO ????

Post by rogerborg »

jeromegz wrote:3) play png sequence in a mesh :

but the probleme is that this exemple require an enorme quantity of memory to display png animation...
Only one comment to make:

Image
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Post Reply