Playing movie in texture
-
- Posts: 135
- Joined: Thu Oct 30, 2008 11:56 am
- Location: UK
- Contact:
hi all
have continued the development of the ffmpeg version of the video player, will post a new version of the class once more features are sorted.
could anyone give me a pointer/hint on how to play the sound from the movie file,
and what the best method of outputting it in irrlicht would be as there seem to be a few choices thou cAudio seems to be pretty decent from my reading
thanx
Rob
** UPDATED
for anyone else playing with this and cursing the lack of docs on ffmpeg, check out http://dranger.com, very helpful, will do some research and post back what to do with the audio
have continued the development of the ffmpeg version of the video player, will post a new version of the class once more features are sorted.
could anyone give me a pointer/hint on how to play the sound from the movie file,
and what the best method of outputting it in irrlicht would be as there seem to be a few choices thou cAudio seems to be pretty decent from my reading
thanx
Rob
** UPDATED
for anyone else playing with this and cursing the lack of docs on ffmpeg, check out http://dranger.com, very helpful, will do some research and post back what to do with the audio
Hmm ... i don't think that using a specific audio lib for the sound output would be good, because there are so many out there and I prefer Irrklang. Maybe you could do something where the user has to derive a subclass that implements sound handling and the standard version does not play any sound (like a "NullOutputDevice ).
Dustbin::Games on the web: https://www.dustbin-online.de/
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
-
- Posts: 135
- Joined: Thu Oct 30, 2008 11:56 am
- Location: UK
- Contact:
Hmm also, my investigation continues, just getting into sound and will look into irrKlang next, is really pushing my knowledge digging into this but half the fun is the steep learning curve.
so far i have looked into SDL, there is a really good example that am pretty sure is partly how the ffmpeg wrapper was coded but whilst I have managed to re compile irrilicht with SDL support (before realising that the wrapper was for the video window) I cant do the same with my own program as am getting a conflict between SDL/mySQL which are both using a slightly different version of config_win.h.
ffmpeg sdl sound example here
http://dranger.com/ffmpeg/tutorial03.html
i have then looked into openAL (RAW, not the cAudio wrapper) which quite alot of people seem to be using and found a ffmpeg/openal example which looks pretty good here
http://kcat.strangesoft.net/alffmpeg.c
looking at irrKlang, which is actually using ffmpeg, as with the other two examples, seems to be based on a similar idea (only so many ways to do sound i guess), hmmmm indeed much as I like a choice
Since I am currently leaning towards openAL, if I coded the class for this with #define exclusions for the specific openAL code would you be willing to modify it to support irrKlang once I have the openAL version working?
so far i have looked into SDL, there is a really good example that am pretty sure is partly how the ffmpeg wrapper was coded but whilst I have managed to re compile irrilicht with SDL support (before realising that the wrapper was for the video window) I cant do the same with my own program as am getting a conflict between SDL/mySQL which are both using a slightly different version of config_win.h.
ffmpeg sdl sound example here
http://dranger.com/ffmpeg/tutorial03.html
i have then looked into openAL (RAW, not the cAudio wrapper) which quite alot of people seem to be using and found a ffmpeg/openal example which looks pretty good here
http://kcat.strangesoft.net/alffmpeg.c
looking at irrKlang, which is actually using ffmpeg, as with the other two examples, seems to be based on a similar idea (only so many ways to do sound i guess), hmmmm indeed much as I like a choice
one question thou, how is irrKlang any less of a specific audio lib than openAL, both are cross platform and have a similar (ish) feature set?? or are you suggesting that the videoplayer class should be independant of any specific sound library (which agreed would be nice but even more of a mind job)?Hmm ... i don't think that using a specific audio lib for the sound output would be good, because there are so many out there and I prefer Irrklang. Maybe you could do something where the user has to derive a subclass that implements sound handling and the standard version does not play any sound (like a "NullOutputDevice Wink ).
Since I am currently leaning towards openAL, if I coded the class for this with #define exclusions for the specific openAL code would you be willing to modify it to support irrKlang once I have the openAL version working?
I though about keeping it lib-independent, i.e. no binding to a particular audio lib. I don't know if it is an easy way to go to do so with your project, but I think it would open your code for a larger user base.
Or try to keep the bindings as small as possible (and good documented), so that it would be (relatively) easy to swap that lib.
Or try to keep the bindings as small as possible (and good documented), so that it would be (relatively) easy to swap that lib.
Dustbin::Games on the web: https://www.dustbin-online.de/
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
-
- Posts: 135
- Joined: Thu Oct 30, 2008 11:56 am
- Location: UK
- Contact:
-
- Posts: 135
- Joined: Thu Oct 30, 2008 11:56 am
- Location: UK
- Contact:
a working version with sound can be found @ http://irrlicht.sourceforge.net/phpBB2/ ... 610#203610
;0)
;0)
OK , the full path of the file in my os C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\mmstream.h,yeah ,certainly it's from windows sdk ,i think you may find it by that message.briaj wrote:Hi all, I cannot compile because I don't have the include headers:
#include <dshow.h>
#include <mmstream.h>
#include <amstream.h>
#include <ddstream.h>
I have installed DX9SDK and I cannot find them. I am using Irrlicht 1.7. Is there any native way to play movies?
Thank you very much in advance.
my english is very pool ,sorry.
Re: Playing movie in texture
This worked really well, but now Microsoft have decided this interface is obsolete, and in Windows 7 there are problems playing mpeg2 movies now, possibly because of the codecs/win 7 issues. Back to square 1 thanks to MS! How to get fast mpeg2 video playback with hardware support for linux and windows??
Re: Playing movie in texture
A single lib for both? That'd be ffmpeg probably.
-
- Posts: 4
- Joined: Mon May 23, 2016 10:48 pm
Re: Playing movie in texture
Okay, I know this post is very old, but does the original version (page 1) still works with the latest irrlicht build?
I have tried to render a .wmv video to texture, but I always get a blank texture. I've used both the original method and the "rotating mesh with texture example". In both cases, the texture remains unpainted.
The video seems to be properly loaded, as I can see the stream being non-NULL and I can hear the audio play.
Any suggestions on how to fix this?
EDIT: It appears I have solved it. When i was drawing the texture, I was asking Irrlicht to use the alpha channel. Setting it NOT to use it solved my issue - now I can render the video properly. Thanks a lot for this amazing tool!
I have tried to render a .wmv video to texture, but I always get a blank texture. I've used both the original method and the "rotating mesh with texture example". In both cases, the texture remains unpainted.
The video seems to be properly loaded, as I can see the stream being non-NULL and I can hear the audio play.
Any suggestions on how to fix this?
EDIT: It appears I have solved it. When i was drawing the texture, I was asking Irrlicht to use the alpha channel. Setting it NOT to use it solved my issue - now I can render the video properly. Thanks a lot for this amazing tool!
"Thorns are the rose's sweetest essence"
Re: Playing movie in texture
Yes, it should do as it just renders the video to a texture each frame. Make sure your texture resolution matches the video as depending on the video driver, that may stop it working.