Hi everyone!
I've been working on the project of my own game using Irrlicht engine. I've decided to use FMOD library to manage sounds and then I realised that I'll also need to put some videos in my game. I didn't know what library should I use. I read about two of them, which are, I think, the most interesting to me and my project: ffmpeg and Theora. Finally, I chose Theora, because it seemed to be nice and simple to use. To be honest, I don't know anything about dealing with videos. But I've just found a nice solution how to simply integrate Theora with Irrlicht engine reading this topic: http://irrlicht.sourceforge.net/forum/v ... hp?t=38121 So, I've used the code witten there to create my own VideoPlayer class. After all it works well, but the problem is that it doesn't provide any sounds while playing a clip. As I said - I've never worked with videos, CODEC's and the other that stuff before. And that's why I'm stuck - I tried to google some ideas or solutions of my problem, but I found nothing interesting. I also tried to dedeuce the method of loading sounds while reading the Theora examples source. But I have no idea how to pass the audio to FMOD. I'm not a kind of an outstanding programmer , so I've got many troubles to deal with this problem.
I will be glad if you tell me how could I improve my VideoPlayer class to deal with video sound. Please, explain me what should I do to load audio from my clip and pass it to FMOD to be finally played.
Thanks
Theora & FMOD
-
- Posts: 7
- Joined: Thu Jul 02, 2015 10:13 pm
- Location: Wrocław, Poland
Theora & FMOD
Last edited by NoIdeaForUsername on Fri Jul 03, 2015 12:40 pm, edited 1 time in total.
Re: Theora & FMOD
ffmpeg is a library that can play a lot of different formats. But in my experience it's extremely hard to compile this lib on Windows (at least with VS 2013). Theora is the name of a library which can play exactly one format - ogg/theora. Ogg is the container (containing any kind of video/sound formats) and theora is the video format (and corresponding codec to play it). There is also ogg/vorbis. Which uses the same container (ogg) but vorbis is a sound format. You need that as well if you need sound. You still need one more tool - vorbis decodes the sound, but you also need a library to output it to the speakers. Personally I use OpenAL for that.
I've not done video+sound decoding together yet myself (only each on it's own). But you can look at my ogg/vorbis playing here: https://bitbucket.org/mzeilfelder/trunk_hc1/src
The src/oggstream.cpp/.h files are about streaming ogg to openal. And sound_openal.cpp./h is about using openal.
I've not done video+sound decoding together yet myself (only each on it's own). But you can look at my ogg/vorbis playing here: https://bitbucket.org/mzeilfelder/trunk_hc1/src
The src/oggstream.cpp/.h files are about streaming ogg to openal. And sound_openal.cpp./h is about using openal.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 7
- Joined: Thu Jul 02, 2015 10:13 pm
- Location: Wrocław, Poland
Re: Theora & FMOD
Ok, I'll take a look at this...
-
- Posts: 7
- Joined: Thu Jul 02, 2015 10:13 pm
- Location: Wrocław, Poland
Re: Theora & FMOD
Yeah, but I still need to make changes in the VideoPlayer class to pass the audio to FMOD instead of OpenAL. Anyway - thanks for your example - I will try to find a way to do that looking at the methods used there. But if you have some more experience with FMOD and you have some idea how to solve my problem - please help me.
Re: Theora & FMOD
Sorry, I only work with opensource libraries. Never used FMOD.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 7
- Joined: Thu Jul 02, 2015 10:13 pm
- Location: Wrocław, Poland
Re: Theora & FMOD
I still have a problem with getting this library work with FMOD. I will be grateful if someone could show me an example of loading audio from theora video with FMOD.
-
- Posts: 7
- Joined: Thu Jul 02, 2015 10:13 pm
- Location: Wrocław, Poland
Re: Theora & FMOD
I think I don't quite understand how to make the libtheoraplayer pass audio to the FMOD library... Should I only edit TheoraAudioInterface.h and overwrite methods written there?