Video still missing in BlitzMax....

BlitzMax Forums/BlitzMax Programming/Video still missing in BlitzMax....

Tachyon(Posted 2009) [#1]
After all these years, I cannot believe that a good video module is still absent in BlitzMax! Many attempts have been made- Brucey even got pretty close apparently. But still, there is nothing stable enough for commercial use? Who is going to be a hero and fix this??

I admit I am not smart enough, technically speaking, to wrap a module or I'd be happy to donate the time.

[edit] I'm talking video with sound. Doesn't count unless both are working.


N(Posted 2009) [#2]
Who is going to be a hero and fix this [so I may benefit without having helped myself]??
Cough up some money, since obviously it hasn't been in anyone's best interests to do it for free. Money is a fantastic motivator for getting what you want.


Tachyon(Posted 2009) [#3]
Cough up some money, since obviously it hasn't been in anyone's best interests to do it for free. Money is a fantastic motivator for getting what you want.

No problem! I'd certainly buy a module if one were available (trust me, I have purchased many products from you fine BlitzMax people over the years.)

But that's the problem- no one has yet produced anything! Someone here could probably make a few bucks if they'd release a working, cross-platform video wrapper and continue to support it.


N(Posted 2009) [#4]
Why make one and release it for X price when you can make much more money doing it under contract? Fund development, don't just say "well, I'll give you the money after you do all the work for me and set a really low price."

Unless you're willing to shell out ~$700 for a video decoding module. Edit 83: My point is that I don't want a few bucks (and most other people probably don't either), I want something that'll pay the rent. I'm not going to pay the rent with 5 people buying a $20 video module (speaking hypothetically - I'm not interested in developing a video module myself).


_Skully(Posted 2009) [#5]
Ya, and what kind of video's would need to be supported... just AVI? MPG? ...


degac(Posted 2009) [#6]
Commercially speacking the creation of a such module is a bet on the future.
Even MaxGui (or Leadwerks Engine in some way) had the same 'limit'.
So if you see only the point 'I need X users buying a $20 video module' to make it profitable, neither BlitzMax does exist.

I think a different approach is (BRL or someone else) take the 'risk' to create a 'multimedia module' (video-audio loading/saving/streaming and webcam maybe - of course multiplatform) and place as an 'officially sponsored' module for BlitzMax - with the assurance that BRL - if the original creator of the module left - will grab the source/development without 'losing everything' - granting supports (and of course revenue for the new users).
A faster poll in this forum and you should could have an idea of how many users are interested in a such module and how much they would pay.

So only at this point you can have an idea of the investment/return on it you can afford.

Of course this is only my idea.

PS: personally I would pay a media-module.


JoshK(Posted 2009) [#7]
It's not really BRL's problem to provide a bunch of multimedia modules. They provide the language, and any module will arise from the community if there is a demand.


xlsior(Posted 2009) [#8]
Pantsonhead made a nice module that can play back Ogg theora in Blitzmax...
http://www.pantson.com/mods/Theora/index.php

And another one that can do MPG, but unfortunately it's under GPL so you can't really use that one for a commercial game
http://www.pantson.com/mods/MPEG/index.php

Brucey's OFX module can communicate with webcams, as can the windows-only ESCAPI dll that floated around here some time ago.

I also see some references to Quicktime under Brucey's ofx module, but no idea what exactly that supports and how complete it is.


DavidDC(Posted 2009) [#9]
Brucey's wrapped a wxWidgets module that does video plus sound - wxMediaCtrl is its name I think. Of course you need to be in a wxMax framework - but that wouldn't matter for a loader I imagine.


LT(Posted 2010) [#10]
Pantson's Theora module looks good, but doesn't support sound and that's what the original poster requested. I haven't checked out the module yet, but the video quality in the sample is really nice. I'd be willing to pay for a complete module for commercial use - but not $700!

I'd certainly consider splitting the cost up with other people, though.


ImaginaryHuman(Posted 2010) [#11]
You could try making your own video codec too which is something I hope to get to eventually.


Brucey(Posted 2010) [#12]
I'd say the avbin module is probably the most capable of all of them - since itself wraps ffmpeg - and thereby giving access to countless file formats (including ogg and mpg).

It's currently just a plain implementation, which means you need to code all the video/audio synching yourself - which is what the example does.

However, done properly, I envisage a C++ threaded engine driving both the audio and video, with BlitzMax dipping into the data-streams as required. I'd probably lean on Boost (write once, run all platforms) for threading support.
For audio playback, a "plugin"-based module system would be preferred - that is, you could choose to have OpenAL / etc output the sound by importing a particular module.
The video stream would be available as a set of Pixmaps, to do with what you wished.

Well, that's the idea :-p


matibee(Posted 2010) [#13]
Funny you should mention ffmpeg as I'd just looked it up. What's the score with its licensing? http://ffmpeg.org/legal.html
I kind of got bored trying to understand it - I just kept thinking "surely there must be an alternative to this carp!"

In fact Brucey, we're both in trouble now for mis-spelling its name :o


Yeshu777(Posted 2010) [#14]

But still, there is nothing stable enough for commercial use?

I'm talking video with sound. Doesn't count unless both are working.



I simply used TProcess and "mplayer" on Ubuntu to play full screen videos with sound to complete a recent commercial project.

See here...

Under New Products - New Redemption "Goldmine"

http://www.harrylevy.com/homeflas.htm?

4 PC's, each running a BMax app, displaying wins & playing videos - linked to an embedded controller via RS232.

Best Regards,


Arowx(Posted 2010) [#15]
Is there a flash player as flash can play video and animation?


theHand(Posted 2010) [#16]
@Arowx
see here.

\/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/
If anything Brucey's avbin module should be worked on (and not just by Brucey), ffmpeg IS the future (of video).
And, yeah, we have wxWidgets (wxMax) to play video cross platform natively. It is stable, what more do you want for free? So many major businesses use wxWidgets that is a mainstay for them, and it will only improve because of that (you need only look at the history of C to understand why it is still used so much today).


The only thing I don't understand is why Brucey didn't name avbin something like ffMax, or ffMAXpeg. :P


Brucey(Posted 2010) [#17]
So many major businesses use wxWidgets that is a mainstay for them

Except, everyone who uses BlitzMax, uses it for games.
Remember, BlitMax is a GAMES programming language, not a programming language :-p


theHand(Posted 2010) [#18]
Well if you want video video you should expect to go all out :3


degac(Posted 2010) [#19]

Except, everyone who uses BlitzMax, uses it for games.


I think this is a 'ironic' sentence...

Anyway I think media support should be present in BlitzMax not only for games: just think to an help with video, or an integration with database for document management, or a audio/video recorder for internal telephony, or analisys of manufactured piece via sound analisys and checking with original sample and so on...

Media support for games is only the base...


theHand(Posted 2010) [#20]
Then go work for Mr. Sibly.


TartanTangerine (was Indiepath)(Posted 2010) [#21]
Hello - I saw this and thought I'd share a little dll a wrote back in 2006 that enables Blitmax to embed Flash (or Web pages). No reason why you can't use it to play .swf or .wmv or .mpg files.

http://www.indiepath.com/public/iFlash.rar

Have fun.


Zeke(Posted 2010) [#22]
cool Indie.. but for now you need to set graphics driver to dx7 (default is dx9) also default url wont work..., but this works fine.. :D and i would be cool if you can share dll source code to bmax community.


GfK(Posted 2010) [#23]
It'd be nice if you could get rid of the right-click context menu.


TartanTangerine (was Indiepath)(Posted 2010) [#24]
I'll have a dig around but I'm afraid I can't spend any time constructing a post on here that makes no sense to C programmers. Fact is.. if you know C or C++ and the Windows API this should be a sinch (or use Google - where do you think I learnt it).

Tim.


Bremer(Posted 2010) [#25]
If you are ok with the 12.5kb size of the MPlayer exe, then you could wrap that. It works with sound as well. I used it a long time ago, so not sure if the latest bmax version does anything so that it wouldn't but I doubt it since its basically just a call to an external program.

I have not checked anything in regards to the license though.

It can be downloaded from here: http://www.mplayerhq.hu/design7/news.html

It available for multiple platforms.


jhans0n(Posted 2010) [#26]
I'm having trouble with mplayer on OS X. I can make Blitzmax spawn an mplayer window, but for some reason it always comes up as a separate window even if I pass it the Blitzmax app's window handle via the -wid switch. If I could get it to properly embed it in the window, wrapping the rest would be pretty easy.


LT(Posted 2010) [#27]
@ImaginaryHuman - Is it "eventually" yet? :D


ImaginaryHuman(Posted 2010) [#28]
Umm, no ,lol

Good video formats are really complicated and use all kinds of sophisticated techniques. I could see writng somethin simple like usin zip for compression of simple delta frames?

LZMA is actually even nicer/faster than zip. I think maybe there is some code in the codearchives?

If the compression is high enough versus the cpu time needed to decompress, you could probably do reasonable resolution video at a decent rate of playback?

I'm kinda thinking back to the old days before `video formats`, when there were only `animation formats` using delta frames.


ImaginaryHuman(Posted 2010) [#29]
I'm trying to use the LZMA module on the code archives but it isn't working properly. I got it to compile the test example but it says it's compressing to some crazy small amount, and if I set the data to all random numbers it compresses like 2.5 megs down to 14 bytes, which is impossible. Does anyone have it working?


ImaginaryHuman(Posted 2010) [#30]
Has any one any advice about how to get the LZMA module to work properly? Or to explain why I'm seeing numbers which don't make sense?


JoshK(Posted 2010) [#31]
If you think it's a good idea for someone else to make it and offer it as a low-cost product, you should have no problem paying someone to make it just for you, then selling it yourself. After all, you believe they will recoup their costs, so why not take the risk on yourself?