Advanced Video Codec Plugin - Not real, but I'd like to make it...

Started by CMK2901, Sun 17/09/2006 15:53:51

Previous topic - Next topic

CMK2901

Hi everyone,

While experimenting with video files in AGS, I've come to find it very restricting.  My biggest beef is that the video volume is not affected by the game volume, but I would also like a way to put optional subtitles over video, and just have a bit more control.

Now, I'm dipping into an area which I know absolutely nothing about: DLL programming, video codecs, and video files.  So forgive me if what I suggest below is complete rubbish and not even slightly plausible.  Just let me know, though, so I don't waste my time.  ;)

So, I've downloaded the DLL template file and have it compiling and running a blue line across my screen.  That much I've figured out.  What I was thinking of doing is plugging a free, open source codec into the DLL so that I can (and correct me if I'm wrong) coordinate the game and video volume, and maybe even set up a system that allows the play of subtitles based on a movie files position.

Being completely DLL and plugin illiterate (though somewhat trained in programming), I can only guess at the audacity and ignorance of this post.  I guess I just want someone with some experience to let me know if this would be at all possible.  ???
Science Fiction
Currently writing and developing technology/techniques
Story/Puzzles: 48%
Graphics: 5%
Overall: 5%

scotch

It's quite possible to provide a video rendering plugin, I have partly worked on one before. What I wanted was to be able to play videos on room backgrounds. I don't really have time to make it unfortunately... perhaps someone else will.

It's quite tricky though, and I wouldn't attempt it if you aren't quite experienced in C/C++ programming because these open source video libraries tend to have quite complicated and badly documented APIs. The choices would be libavcodec, which can play many types of video and audio (including divx/xvid and mp3), but is quite large in file size and due to the formats it supports has patent issues, or libtheora which only plays theora (a good high compression codec but little used), but is small and has no legal issues.

Even a specially made codec that supported looping and such would be fine by me, as long as it had good enough compression to use in high res games.

CMK2901

Yes, I did see Theora.  It looks pretty good.  I'm hoping I can almost just create some wrapper classes in the DLL, something like PlayTheora(name, loop, skip_code), and hand off the movie to the video code.  I'm kind of hoping that I can get away with less code creation than code rearrangement.  We'll see.  :)

The fact that Theora is little used can be viewed as a positive, I think.  It means that people are less likely to mess with the video files in the distributed game; they'd have to pick up a player and such, in comparison to .wmv, which would just play.

Time to get neck deep in some code...if I'm not back in 2 days, just wait longer.
Science Fiction
Currently writing and developing technology/techniques
Story/Puzzles: 48%
Graphics: 5%
Overall: 5%

SMF spam blocked by CleanTalk