Can Bmac play Quicktime or Flash movies?

BlitzMax Forums/BlitzMax Programming/Can Bmac play Quicktime or Flash movies?

Grey Alien(Posted 2007) [#1]
Well the topic title says it all. My artist says he can make a much better intro if I can just play one of those formats instead of me having to code the animation "by hand".

Is there any native support or maybe add on mods? thanks!


ImaginaryHuman(Posted 2007) [#2]
There is no native support. Someone did a flash module but I don't think I've seen quicktime support yet - sorry I can't remember who made the flash one.

You could also design your own animation format.


Picklesworth(Posted 2007) [#3]
Assuming this animation is done with Flash (which is what it sounds like), I believe that program will also export AVIs.


TartanTangerine (was Indiepath)(Posted 2007) [#4]
I wrote a dll that enables you to play and interact with flash movies - it's windows only though.


Grey Alien(Posted 2007) [#5]
Hmm very interesting. Thing is I need Mac too so you think maybe I should just play an avi instead? Are they well compressed, I wouldn't have thought so...


ImaginaryHuman(Posted 2007) [#6]
AVI is a compressed standard, but I never personally liked the quality of most AVI's. I think MPEG is nicer.


xlsior(Posted 2007) [#7]
AVI is a compressed standard, but I never personally liked the quality of most AVI's. I think MPEG is nicer.


.AVI doesn't have anything to do with compression -- it's merely a container format. The actual movie compression, features and anything else are 100% dependent on the codec used to do the compression.

The 'standard' codecs that come with windows aren't very good at all, but some external ones like Divx (kind of on its way out) and XViD are pretty nice.

So... when using AVI you have an additional hurdle in that the target machine also needs to have the codec on there that was used to compress the video file... Without the codec the video can't be rendered.
The advantrage of MPEG is that pretty much any machine is mpeg-capable out of the box.


Grey Alien(Posted 2007) [#8]
I see so can BMax do MPEG if it can't do AVI?


xlsior(Posted 2007) [#9]
I see so can BMax do MPEG if it can't do AVI?


Kinda -- if you can embed windows media player for example (which ought to be possible), it will be able to play mpeg out of the box, but not most of the avi codecs you'd want to use.

There's also a couple of 3rd party libs around that can do MPEG, such as Chris Camacho's mpeg player.

[By the way: Check your email...]


PantsOn(Posted 2007) [#10]
see this thread... i got mpeg working a few weeks back (cross platform)
http://www.blitzbasic.co.nz/Community/posts.php?topic=71915

There is going to be un update soon to the MPEG module


Grey Alien(Posted 2007) [#11]
xlsior: got it thanks, don't know if it'll do Mac, will test soon.


PantsOn: very interesting, so it works on Mac too coo. Do I need to have a decoder installed or something?


PantsOn(Posted 2007) [#12]
you just need the module.
The lib is part of the module archive.

It only plays mpeg1video and mpeg2video. You might need to use ffpemg to convert to true mpeg video.
no sound yet.. but there is a workaround in the examples.


Grey Alien(Posted 2007) [#13]
The videos won't have sound so it's likely I'll have to play it separately anyway, hope it stays in sync!


PantsOn(Posted 2007) [#14]
give it a go.... syncronisation is already built in ;-)


xlsior(Posted 2007) [#15]
Pantson: are their any licensing restrictions (GPL, ...?) in your module?


PantsOn(Posted 2007) [#16]
it uses libmpeg2

heres the deal in the readme.

libmpeg2 is a free library for decoding mpeg-2 and mpeg-1 video
streams. It is released under the terms of the GPL license.
The project homepage is at http://libmpeg2.sourceforge.net/




UnderwoodNullium(Posted 2007) [#17]
I wrote a dll that enables you to play and interact with flash movies - it's windows only though.



May I please download the source for that .dll please?


Koriolis(Posted 2007) [#18]
@PantsOn: Gasp, that's really too bad about the GPL thing, because then we can't use your module for anything that goes commercial (unless we're ready to release the code, which rules out pretty much any commercial project).
Thank you for making this module available for free. Too bad for the license, that's a real bugger to me.


PantsOn(Posted 2007) [#19]
now that I didn;t realise..
http://www.gnu.org/licenses/gpl-faq.html#GPLCommercially

If I use a piece of software that has been obtained under the GNU GPL, am I allowed to modify the original code into a new program, then distribute and sell that new program commercially?
You are allowed to sell copies of the modified program commercially, but only under the terms of the GNU GPL. Thus, for instance, you must make the source code available to the users of the program as described in the GPL, and they must be allowed to redistribute and modify it as described in the GPL.



thats a bugger


xlsior(Posted 2007) [#20]
But does that apply to the entire program, or 'just' the MPEG routines themselves?

Furthermore -- if one would compile the MPEG lib into a seperate DLL and open up just a couple of functions (like a 'loadmpeg' and 'plaympeg') which are called from your application, then is it sufficient to 'just' provide the source of the actual MPEG dll itself to comply with the GPL requirements?

Or related to that, if you have the mpeg features linked in through a seperate module which is used by the app (and compiled into the same .exe), is it sufficient to just provide the source to the module in question?

(I do know that you don't actually need to distribute the source itself with any copy of the program, as long as the GPL license itself is included referencing the library, and you respond to a 3rd party's request for a copy of the code if anyone asks you)


PantsOn(Posted 2007) [#21]
in a nutshell... not sure.

Would like to know the ins and outs.. as I'm looking at an avi module for cross platform use.


Grey Alien(Posted 2007) [#22]
I'm pretty sure dll would be totally safe. As for module, not sure but I reckon that someone would have a hard time complaining that you didn't give them the source to your game but you gave them the complete source to the MPEG module.


PantsOn(Posted 2007) [#23]
does a program modify the original source code if you are using my module?
My module modified the source code..
hmmmmmm


Koriolis(Posted 2007) [#24]
As far as I know the *whole* program that links (statically) against a GPL library is affected by terms and conditions of the GPL. This is why it's often called "viral".
For the sake of making it more flexible, the FSF released an additional license, the LGPL, that basically removes this "viral" aspect as long as you link *dynamically* with the GPLed library.
But here it's the GPL, not the LGPL so it's not even worth trying to modify the module to link dynamically agains a DLL.


Grey Alien(Posted 2007) [#25]
wow, bummer.


PantsOn(Posted 2007) [#26]
yeah... i'm going to have to try and a free mpeg lib now.
total bummer


PantsOn(Posted 2007) [#27]
found this..
http://www.fsf.org/licensing/licenses/gpl-faq.html#GPLPluginsInNF

Can I apply the GPL when writing a plug-in for a non-free program?
If the program uses fork and exec to invoke plug-ins, then the plug-ins are separate programs, so the license for the main program makes no requirements for them. So you can use the GPL for a plug-in, and there are no special requirements.

If the program dynamically links plug-ins, and they make function calls to each other and share data structures, we believe they form a single program, which must be treated as an extension of both the main program and the plug-ins. This means that combination of the GPL-covered plug-in with the non-free main program would violate the GPL. However, you can resolve that legal problem by adding an exception to your plug-in's license, giving permission to link it with the non-free main program



so all i have to do is declare permission for use in non-free programs. is that correct?


Koriolis(Posted 2007) [#28]
No. The statements above say that even if your mod was linking dynamically to libmpeg2, the GPL still consider that the combination "my commercial program" + "the dynamically linked libmpeg2" would constitute a single programme, and thus "my commercial program" would have to comply to the GPL (read: realease the source). When they say "However, you can resolve that legal problem by adding an exception to your plug-in's license, giving permission to link it with the non-free main program", I'm pretty sure that "You" means the guy writing the GPL library, and that's not you. Only the people writing libmpeg2 are in the position to add such an exception to the GPL.


xlsior(Posted 2007) [#29]
so all i have to do is declare permission for use in non-free programs. is that correct?


Doesn't seem so, since your module is still a derivative work of the original creators that released it under the GPL - by building on their base code, you do not have the authority to give additional permissions that the original code did not have.


Brucey(Posted 2007) [#30]
Indeed... anything that uses GPL must also be GPL, whether you compile in the source, statically link to the source, or link dynamically to the source.

So, unless you make the mpeg module a stand-alone thing that your app can call in some way, anything that uses it will have to be GPL too.


Grey Alien(Posted 2007) [#31]
Here's an idea, seeing as the license seems to be very restrictive and will be a bummer for lots of us wanting to use it, why not contact the original authors and see if they'll make an exception and allow you to make a dll, and have people who use the dll not have to offer their game's source code for free as that's just crazy.


PantsOn(Posted 2007) [#32]
I have already asked the original authours regarding the explicit permisssion and I am still waiting a reply.


TaskMaster(Posted 2007) [#33]
I think you might find that a lot of the people that release stuff like that GPL, do it because they WANT other people to have to release their code also GPL.

A lot of those Linux developers (but not just Linux) really believe in the idea of code being free...


jhans0n(Posted 2007) [#34]
I'd be shocked if they gave you permission to do that. You're probably better off looking for a different library.

Personally, I've always thought of the GPL as being a bit hypocritical. It attempts to accomplish its goal to make code "free" by restricting the code's usage with a burdensome license.

If I want my code to be free, I will make it public domain. Then anyone can use it for any purpose without restriction.


PantsOn(Posted 2007) [#35]
even XVID is under GPL..

the theora library license is as follows...

Please see the file COPYING for the copyright license for this software.

In addition to and irrespective of the copyright license associated
with this software, On2 Technologies, Inc. makes the following statement
regarding technology used in this software:

On2 represents and warrants that it shall not assert any rights
relating to infringement of On2's registered patents, nor initiate
any litigation asserting such rights, against any person who, or
entity which utilizes the On2 VP3 Codec Software, including any
use, distribution, and sale of said Software; which make changes,
modifications, and improvements in said Software; and to use,
distribute, and sell said changes as well as applications for other
fields of use.

This reference implementation is originally derived from the On2 VP3
Codec Software, and the Theora video format is essentially compatible
with the VP3 video format, consisting of a backward-compatible superset.



sounds like a winner to me.
I'm going to investigate this library.


Winni(Posted 2007) [#36]
Brucey, this GPL restriction is also a catch with your MySQL libraries. You have to GPL your entire application if you link the MySQL client libraries. According to MySQL AB, you even have to open source your application if you implement their protocol. Unless, of course, you purchase a commercial licence from them. Or you use one of the open source licences under their FLOSS exception, but then you still HAVE TO open source your application.


xlsior(Posted 2007) [#37]
So... if instead of linking in the MySQL mod as normaly, you do the following:
1) Create a stand-alone .exe whch acts as a server, listening to an incoming port to requests from the local computer
2) a parent app spawns the server process
3) any SQL request is done by opening a TCP connection to the local SQL server ap, which returns the results

Am I correct in assuming that this way only the SQL proxy server .EXE itself would be subject to the GPL restrictions, and external apps that use TCP/IP to communicate with it would not be affected?
After which the source code for the proxy service would need to be publically available upon request, etc, but the actual game/application/whatever which uses it to communicate with a database would not need to be GPLed itself?


Winni(Posted 2007) [#38]
Yes, xlsior, that would be the "legal workaround" if you don't want to purchase a commercial MySQL licence.

If this makes when there is the more advanved PostgreSQL server available under the BSD licence, that is another question. (Don't get me wrong, I really do like MySQL and think it is an excellent product.)