Movies?

BlitzMax Forums/BlitzMax Programming/Movies?

taxlerendiosk(Posted 2004) [#1]
I know that currently there is no PlayMovie-type commands available for BlitzMax, but if anyone has insight into it I'd like to know what the likely possibilities are for the near future. I'm currently interested in playing short, cutsceneish clips, fullscreen (not to a texture or with anything else going on on the screen etc.), using something like the XViD codec (and OGG for sound). For people who know about this kind of thing, does it sound like something I'll have to wait ages for? What about multiplatform issues?


ImaginaryHuman(Posted 2004) [#2]
I guess they would have to eventually support formats that are cross-platform. Full quicktime support would be nice, but I'm sure also some people prefer windows media player.


AdrianT(Posted 2004) [#3]
Don't like quicktime myself as the player is bleh!, and the alternatives aren't great either. However playing movies would definately be a good move, just hope we don't get stuck with something just because its crossplatform.


podperson(Posted 2004) [#4]
QuickTime's player is completely irrelevant, I think. It works at least as well as any competitor, has a nice API, and runs cross-platform. Certainly, for my purposes, QuickTime support is essential, so if no-one else does it, I probably will :)

As an aside:

QuickTime gives you Flash support (usually one version behind, but then so are most browsers...)
QuickTime gives you support for almost all common 2D graphics file formats.
QuickTime gives you streaming download support.
QuickTime gives you a cross-platform GUI library (with native widgets).
And much, much more.


Diordna(Posted 2004) [#5]
I don't remember if it's available for Linux or not, but I'm sure you wouldn't need to use Quicktime to get movie support. Just look at the source for MPlayer, which is available for just about everything.

Then again, Quicktime is nice for all those things mentioned by podperson.


Kanati(Posted 2004) [#6]
Just do mpg2 and divx and be done with it.


bradford6(Posted 2004) [#7]
keep an eye on this
http://sourceforge.net/projects/dirac

It's alpha now, but backed by the BBC, I am sure we'll see some news soon


AdrianT(Posted 2004) [#8]
@podperson

were talking about movies, and being stuck with a particular player that a large portion of users don't like just to support a ok codec doesn't seem that great an idea to me.

It's cool that these days you usually get to choose from real, MP and QT. I actually find both MP and Real are more reliable than QT on my pc, allthough to be honest I don't like either of those all that much.

--
I'd prefer something like DIVX and dirac sounds interesting too. At the end of the day anything that requires you to download extra software is a bit of a problem, and with indie games your initial download size is a pretty big deal too.

not sure what video formats are standard and viewable on all players without having to download and install extras.


flaith(Posted 2004) [#9]
try and use vlc from www.videolan.org , for a lot of platform, and free.


Diordna(Posted 2004) [#10]
Earth to Evak! Quicktime is not just a player! It is a library. Using it gives you support for MPG, AVI (sometimes), MPEG, MP3, AAC, WAV, Flash, anda bunch of other stuff basically for free.


AdrianT(Posted 2004) [#11]
I know all about quicktime thanks diodora, but I thought we were talking about movies. Plus the popularity of quicktime has been diminishing the last couple of years with real and WMV becoming more popular.

I'm just saying I'd rather see a video format used that doesn't require downloading software to preview on other platforms, and all but forces you to use its native media player exclusively.


Diordna(Posted 2004) [#12]
Yes. We are both talking about movies. Quicktime is a library that plays movies. So is Media Player. So is Real. None of them force you to use their player, but no other player will play their particular format. The only difference with Quicktime is that it lets you play *many* formats, not just wmv or ram. Furthermore, it stands out in that it runs just as well on Windows as it does on its native OS X platform. WMV and Real files play much more slowly on Macs. So you could also say that WMV and Real are diminishing on Macs just as you claim that Quicktime is diminishing on Windows, a claim which you have cited no evidence to back up.

Anyways, back to my original idea - the open-source cross-platform MPlayer plays many formats very nicely. Just peek at its source.


AdrianT(Posted 2004) [#13]
Anyway, being a 3D artist my main interest in movie support within Bmax would be in regards to animated textures, which were poorly supported in previous blitz languages.

As for FMV I'd simply use realtime cut scenes created reusing existing art assets exported via b3dpipeline complete with animated cameras and lighting.

I know there isn't currently a b3d pipeline exporter for bmax, but I have an idea of where the future lies in that regard and it looks pretty rosy :)


Hotcakes(Posted 2004) [#14]
So is Media Player.

Actually Media Player is a different story to the other two. MPlayer really is just a player. It is a 13meg player (and that's just the install file). You can download the codec pack seperately in 900k. Media Player is not smart enough to play anything that isn't covered by a codec, except of course the windows media format which is supported via dlls. But that comes in the codec pack, seperately to the player itself. It is possible to use windows media 9 codecs on media player 7 and above...

I actually find both MP and Real are more reliable than QT on my pc,

I've seen direct comparisons of the three formats and I must say Real are showing their age. In a low bitrate stream the colouring in a realmovie file is atrocious. Other formats just got spotty/blocky. QT is a little blockier than MP, which is my personal fav of the three, at least on Windows. But, I believe the world should install XviD and an ogg codec and everything would be peachy =]

None of them force you to use their player, but no other player will play their particular format.

Any decent player on Windows will support windows media format out of the box. It is completely free for them to do so. I'm not sure about QT (so long as the player is installed) and I'm pretty sure Real keep very tight lipped on their technologies. Nevertheless, Winamp has plugins that can enable all three. So it's not impossible.


AdrianT(Posted 2004) [#15]
Only way I know of to play quicktime on another player other than the QT player is with a popular freeware tool called Quicktime alternative. It installes the old media player classic with some extra codecs that will allow it to play most quicktime files.


Hotcakes(Posted 2004) [#16]
The popular (well, popular before v2.8) Winamp plugin called VidAmp plays QT files perfectly. I believe it references dlls from your Quicktime installation. However, since v2.8 of Winamp it clashes with Winamp's built in video player... and I can't for the life of me find an equivalent plugin (or update). The author seems to be dead. No one else has achieved it to my knowledge, so maybe QT are just as tight lipped as Real are =]

FYI, the excellent Tara plugin for Winamp will play all manner of Real files, local and streamed. The version on the Winamp pages sucks, the version at http://www.bigfoot.com/~tarav/plugin is .1 more recent - but adds some good bugfixes and allows you to configure just which files it does and doesn't play (allowing you to stop it from clashing with WAv2.8's built in video dooby). Very good stuff.

There must be a reference (although probably out of date) for these formats somewhere on the web. These two authors *probably* didn't reverse engineer these programs to learn how to work them...


AdrianT(Posted 2004) [#17]
yeah there's a real alternative player too I believe. I'm not familiar with ogg as far as video goes, but if its as good as the audio and cross platform that may well be the way to go.


Hotcakes(Posted 2004) [#18]
Well, ogg is ogg. It's comparable to mp3s at higher bitrates, except no licensing involved so a better idea to begin with.

Then when you get to lower bitrates, ogg shines over mp3 by a long shot. This is obously good for small clips in net releases or streaming. The differance in quality is noticable, but is still listenable, something mp3 cannot boast.

oggs most commonly get muxed into an avi stream, which produces what is known as an .ogm (ogg movie) file. These files are played exactly like an avi file in every player I have tried. .ogms can also be muxed with subtitle and chapter information.

As ogg is one of the two currently supported sound formats in BMax at this time, it is obviously cross platform ;] It is not a video format though, so there is still the more serious issue of the video format. Which brings us pretty much back to the beginning of this tangent =]


podperson(Posted 2004) [#19]
The basic obstacle to creating completely cross-platform video support is codecs, some of which are very proprietary indeed. When QuickTime can't play a wmv file, it's because of the codec. Likewise when Mediaplayer can't play a QuickTime file. And likewise when (as I often find) Mediaplayer can't play a wmv file.

Codecs also determine the quality. If QuickTime is "blockier" it's the codec being used, not the architecture.

Incidentally, almost all new codecs (e.g. DivX) are based on MPEG4, which in turn is based on QuickTime's architecture. Despite this, many MPEG4 movies won't play back through QuickTime because they use custom codecs.

QuickTime is the oldest of the video formats (by far -- far older than Real) and still the most full-featured: being a typical Apple architecture, it supported things like localization support, unlimited layers, unlimited soundtracks, etc. in version 1.0, and integrated multiple text tracks in 1.5 (they just defined a new track type).

Aside from new codecs, the only major things they've added since 1991 is a virtual machine to support interactivity, unicode support, and an embedded Flash engine.

Ideally it would be nice to have one format you can dependably use without the end-user having to download anything and which works well in a production environment (such as is the case with ogg audio files). I'd like to see this in Max. It would also be nice to have QuickTime support for cases where users will be willing to install QuickTime since you get an enormous amount of functionality through QuickTime (stuff you don't get from ANY other video format).

E.g. I'd like to use Max as a replacement for Macromedia Director. One thing Director has is great QuickTime support. Using QuickTime I can create a single video of a person explaining something in English, Italian, and French (the correct sound track is automatically selected), and which shows Chinese or Arabic subtitles when played back on a Chinese or Arabic computer. (It can also have an embedded Flash interface, and it can be fully interactive on its own, and embed VR scenes and navigable objects -- but I have no use for these features.)


skidracer(Posted 2004) [#20]
I'll be having a look at Ogg-Theora soon which is the video part of Ogg-Vorbis, it's going beta soon and looks to be an excellent fit for BitzMax.


AdrianT(Posted 2004) [#21]
Sounds good to me skidracer ;)


flying willy(Posted 2004) [#22]
Go for it lad


Hotcakes(Posted 2004) [#23]
Sounds like a very nice solution indeed. I should look into this Theora...


TommyBear(Posted 2004) [#24]
@skidracer
Maybe you and me should write a movie module for BMX? What ya think? :)

Tommy.


taxlerendiosk(Posted 2004) [#25]
Wow, cool stuff skidracer. Just knowing there are people already planning specific stuff is good enough for me...


skidracer(Posted 2004) [#26]
I've had a quick look and it looks pretty straighforward to implement (already got it building with no compiler errors).

IMHO the main criteria for picking the primary BlitzMax video decompressor should be:

1. open source / patent free / cross platform
2. good quality
3. low processor overhead

However like every other movie compression format I've seen OggTheora uses YUV color space not RGB so it's not ideal in regards to the low processor requirement as we obviously want to stream to textures not video overlay buffers and it doesn't look like OpenGL supports YUV pixel formats.

If there is nothing out there (and I doubt there is) that uses RGB color space and satisfies the first 2 requirements that are worth looking then it all looks pretty straightforward.

BTW, TommyBear, thanks for the offer, will let you know if I need a hand.


TommyBear(Posted 2004) [#27]
Yep no probs :) I'll be a little busy with ODE :)


Hotcakes(Posted 2004) [#28]
So, assuming Theora is the supported video codec of choice, just how long til it's in our hands with a syncmods update? You sound like it's practically already done - so minutes, days, weeks, months before BRL make it official?


AntonyWells(Posted 2006) [#29]
Any progress Skid? Only been a year. :)


DannyD(Posted 2006) [#30]
Any update Skid ? :)


DannyD(Posted 2006) [#31]
Any update ?


smilertoo(Posted 2006) [#32]
I'd like to see linux support dropped; seems to be stuff bmax should have thats missing cos its hard to do in linux...a niche OS that most users expect to get stuff free for, not a great market for potential game sales.


gameshastra(Posted 2007) [#33]
Any Updates..?


PantsOn(Posted 2007) [#34]
I've done an MPEG player for BMAX (cross platform)

see here...
http://www.blitzbasic.co.nz/Community/posts.php?topic=71915

There will be an update soon, which includes
1) general fixes to code.
2) seek through non seekable streams (ie online movies)
3) increase in playback speed so that bigger resolutions can play at normal speed.
4) uses images as well, so that aplha/scale and rotation can easily be used.


gameshastra(Posted 2007) [#35]
Thank you, but i dont know how to use your module in Blitzmax. can you please tell me, whats the procedure to import your module into BlitzMax?.


PantsOn(Posted 2007) [#36]
you will need mingw to compile the library.
I have not included the compiled module in this version.

I have another version that I need to release, I will have to release it with compiled librarys