Log in

View Full Version : Legal to encode with Xvid and distribute in commercial game?


wrfstudios
12th January 2009, 05:12
I read the FAQ and license agreement but want to make absolutely sure I am able to encode my video cut scenes using Xvid and distribute them in my commercial game?

I will also have to have a separate install for the xvid codec after my game is installed on player's computer.

Am I allowed to do this - or are their royalites required?

Thanks
Bill

Dark Shikari
12th January 2009, 05:13
You're probably better off, for the decoder, using one available under LGPL (libavcodec) so you can link it directly in your game rather than having to require the user to install it separately. libavcodec is also quite a bit faster.

wrfstudios
15th January 2009, 03:42
Thanks Dark Shikari for your response... I took a look at your suggestion and yes... it looks like that probably is the best way to do it...

However...

I am using more of a scripting authoring-type language and don't really have the coding - level access to the "movie-playing" portion of the code.

The code simply allows me to specify an .avi movie to load and play.

I was hoping I could simply recompile all my existing movies using the xvid codec and this would be legal. (even if the compressed movies are distributed with my game)

Of course I would need to distribute the xvid codec and automatically install the codec on the end-users computer after installing my game.

If I could just copy the xvid.dll (I am guessing - I dont know the exact file required) to the system directory and do the registry edit settings myself that would be perfect (so then the end-user wouldnt have to do a separate install for xvid - but xvid company might not like that???)

Is this legal?

Thanks
Bill

Dark Shikari
15th January 2009, 03:47
Thanks Dark Shikari for your response... I took a look at your suggestion and yes... it looks like that probably is the best way to do it...

However...

I am using more of scripting authoring - type language and don't really have the coding - level access to the "movie-playing" portion of the code.

The code simply allows me to specify an .avi movie to load and play.

I was hoping I could simply recompile all my existing movies using the xvid codec and this would be legal. (even if the compressed movies are distributed with my game)

Of course I would need to distribute the xvid codec and automatically install the codec on the end-users computer after installing my game.

If I could just copy the xvid.dll to the system directory and do the registry edit settings myself that would be perfect (so then the end-user wouldnt have to do a separate install for xvid - but xvid company might not like that???)

Is this legal?

Thanks
BillXvid is GPL. There is nothing anyone can do about you distributing distributing Xvid as long as you do so in compliance with the GPL.

Theoretically, there could be licensing issues with regards to the MPEG-LA, but I doubt they care.

LoRd_MuldeR
15th January 2009, 04:04
GPL allows you to use the software for free and for any purpose. This explicitly includes commercial purposes.

You can even modify Xvid, keep your modifications in private and only release content (videos clips) created by that modified version.

But as soon as you release any binary of your modified Xvid, you must make the modified sources available too!

And if you ever link Xvid to your own application, your application automatically becomes GPL'd and the sources must be made available.

(Also I think if you use Xvid for commercial purposes, you may need to pay patenting fees. Not to Xvid developers, but to MPEG-4 patent owners)

Brother John
15th January 2009, 16:19
And if you ever link Xvid to your own application, your application automatically becomes GPL'd and the sources must be made available.
That’s a very common view but it’s wrong. When you violate the GPL the only thing that happens automatically is you lose all rights the GPL grants you. I.e. you are no longer allowed to distribute the (changed or not) GPL software. Your own proprietary code is not affected by this.

You then have the choice:
– Correct the violation, put your code unter a GPL (compatible) licence and release the full source.
or
– Stop distributing the GPL software altogether and use something else to get the needed functionality.

But that’s a decision you have to make yourself. Code never can get GPLed automatically. There are some differences between GPL v2 and v3 in that regard, but in principle they work the same.

LoRd_MuldeR
15th January 2009, 17:06
That’s a very common view but it’s wrong. When you violate the GPL the only thing that happens automatically is you lose all rights the GPL grants you. I.e. you are no longer allowed to distribute the (changed or not) GPL software. Your own proprietary code is not affected by this.

Well, if you link Xvid (or any other GPL'd code) to your own proprietary application, you actually have extended Xvid with your own code. Hence you have modified a GPL'd application and you must make the modified sources available - which now include your own application code. If you don't do that, it's a GPL violation. Plain and simple. The violation can be resolved by releasing your application under GPL (and hence making your sources available), stop any distribution of the modified version or remove all GPL'd code from your project. What is described here is the "viral" aspect of GPL, which enforces the Copyleft principle (make sure that free code remains free), but also has been criticized by various people...

Dark Shikari
15th January 2009, 17:07
Well, if you link Xvid (or any other GPL'd code) to your own proprietary application, you actually have extended Xvid with your own code. Hence you have modified a GPL'd application and you must make the modified sources available - which now include your own application code. If you don't do that, it's a GPL violation. Plain and simple. The violation can be resolved by releasing your application under GPL (and hence making your sources available), stop any distribution of the modified version or remove all GPL'd code from your project. What is described here is the "viral" aspect of GPL, which enforces Copyleft (keep free code free), but also has been criticized by various people...Read his post again until you understand what he actually said.

LoRd_MuldeR
15th January 2009, 19:59
Read his post again until you understand what he actually said.

Is it really necessary the quote any post I make, if you got nothing to add to the discussion? :rolleyes:

You can use PM for that kind of commentary...

wrfstudios
16th January 2009, 05:37
Thanks for all the responses people - I have to admit that "MPEG-4 patent thing" kind of concerns me a little though.

I feel like I am missing something since I have done several searches on the internet... but cant really find a solid solution.

I contacted DivX Licensing (no word back yet)... but...

All I am looking for is a one-time fee low-cost codec (up to $500) that I can legally use to compress/encode my movies and legally distribute and install codec with my game.

I really would prefer not to have to enter into some sort of expensive licensing agreement. I thought for sure there would be other small-timer developers looking for low-cost solutions like me...

Any suggestions?

Thanks
Bill

Dark Shikari
16th January 2009, 05:41
Thanks for all the responses people - I have to admit that "MPEG-4 patent thing" kind of concerns me a little though.

I feel like I am missing something since I have done several searches on the internet... but cant really find a solid solution.

I contacted DivX Licensing (no word back yet)... but...

All I am looking for is a one-time fee low-cost codec (up to $500) that I can legally use to compress/encode my movies and legally distribute and install codec with my game.

I really would prefer not to have to enter into some sort of expensive licensing agreement. I thought for sure there would be other small-timer developers looking for low-cost solutions like me...

Any suggestions?

Thanks
BillThis is where Bink Video (http://www.radgametools.com/sales.htm) makes all their money :p There's a big market for royalty-free video compression stuff for games.

A lot of more recent Japanese games (examples: Ever17, Fate/Stay Night) are still using MPEG-1 for cutscenes.

burfadel
16th January 2009, 10:07
Doesn't Bink work on a different system though, its not actually compressed video but rendered? Thus allowing changes in the scene around the main 'acting' stage.

kunkie
16th January 2009, 10:35
Thanks for all the responses people - I have to admit that "MPEG-4 patent thing" kind of concerns me a little though.


Have a chat with MPEG-LA. They are very helpful and will explain everything you need to do:

http://www.mpegla.com/m4v/

If you don't want to go down that road you can try Theora:

http://en.wikipedia.org/wiki/Theora

Dark Shikari
16th January 2009, 16:06
Doesn't Bink work on a different system though, its not actually compressed video but rendered? Thus allowing changes in the scene around the main 'acting' stage.No, Bink is just another video format. It's a rather bizarre one that basically consists of "throw tons of crap together and see if it works." Much like Bink Audio.

wrfstudios
16th January 2009, 19:07
Thanks again everyone for the responses...

And I must apologize in advance for my ignorance in the field of codecs...

Since I was under the impression that I could find a dll file that just needed to be placed into the windows/system32 directory and add a couple entries to the registry and that was it... Installed!

This is how you do it when installing... for example the cinepak codec - of course cinepak is "already" installed on all windows computers

Once installed it is shown in my movie software as one of the codecs I can use to compress my movies...(and as described above very simple to install on end-users computer if necessary)


Here's my situation...

(and why I apologized - because I must be missing something)

I have downloaded theora and extracted... I cant even begin to find the actual codec admist all the directories and folders - it contains bunch stuff, c libraries, tools, etc. (I just want the codec dll file, right?)

I did a search for Mpeg-1 codec - A bunch of stuff comes up - alot looks like mpeg players, etc. but not exactly sure what it all is and if I can actually just a download simple dll file.

I know you guys are probably tired of this topic - but thought I would ask if anyone knows of a simple solution. (i.e. simple as a cinepak codec installation)

Thanks
Bill

kunkie
16th January 2009, 19:45
I guess one way you could do this is by by getting the DLLs from the CAB archive here:

http://www.xiph.org/dshow/

You'd need to register them in your installer program. Also you won't need all of the DLLs in that package, just the theora related ones. Of course you'd need to put the Licence(s) text in that box that nobody reads. :-)

(working on the assumption here that the system you use for playback will work with DirectShow)

Brother John
18th January 2009, 11:29
(Sorry for the late answer. Mail notification didn’t work for some reason.)

The violation can be resolved by releasing your application under GPL (and hence making your sources available), stop any distribution of the modified version or remove all GPL'd code from your project.
Exactly. But as I explained, YOU as as violator have to make that choice yourself. It doesn’t happen automatically.

@wrfstudios
From my limited understanding of the whole licencing mess:
DivX: If you buy the codec that already includes all MPEG licencing and gives you the possibility to produce properly licenced MPEG-4 video with DivX.
Xvid: Is GPL software that can be used freely without charge. But you’ll have to take care of MPEG licencing yourself.

LoRd_MuldeR
18th January 2009, 19:43
Sure, the violator himself must become active to resolve the violation. But a violation should never happen. So why can such violation happen at all?

Yes, it can happen because an application needs to be released under GPL, as soon as you include any GPL'd code into the application. And that need arises automatically.

...unless the developer suddenly stops all distribution of his application at the moment he adds the GPL'd code, of course. But that's not really an option here ;)

Brother John
18th January 2009, 20:24
an application needs to be released under GPL, as soon as you include any GPL'd code into the application. And that need arises automatically.
That’s true. But that’s not what you said in your first post. And it doesn’t mean that the proprietary author doesn’t have any other choice than to put his code under GPL.

LoRd_MuldeR
18th January 2009, 21:19
That’s true. But that’s not what you said in your first post. And it doesn’t mean that the proprietary author doesn’t have any other choice than to put his code under GPL.

After all a developer got exactly two choices:
* Add GPL'd code to your application and distribute your application under GPL from now on
* Do not add any GPL'd code to your application

Adding GPL'd code to your application, just to have a (temporary) GPL violation and then remove that code again, isn't a real option. Is it?
Stopping any distribution of your application is not a reasonable option either ...

hajj_3
23rd January 2009, 18:50
would it not be better to use x264 and lame mp3 codec or something, maybe include vlc player on your cdr and install that on their pc to play the video(s). I would have thought lame mp3 encoder would be royalty free and x264 should be with the exception of mpeg4 which xvid would also require. x264 is better quality and xvid if you didnt already know. fairly sure you'd have to pay for AAC, nero's AAC is free for users not sure about commercial purposes though.

Dark Shikari
23rd January 2009, 18:51
would it not be better to use x264 and lame mp3 codec or something, maybe include vlc player on your cdr and install that on their pc to play the video(s). I would have thought lame mp3 encoder would be royalty free and x264 should be with the exception of mpeg4 which xvid would also require. x264 is better quality and xvid if you didnt already know. fairly sure you'd have to pay for AAC, nero's AAC is free for users not sure about commercial purposes though.H.264 is not royalty-free, nor is mp3.

Inventive Software
23rd January 2009, 19:30
If you want it to be truly royalty-free, use Theora and Vorbis. If you don't want to pay big fees, Bink Video is a good option.

LoRd_MuldeR
23rd January 2009, 19:30
would it not be better to use x264 and lame mp3 codec or something, maybe include vlc player on your cdr and install that on their pc to play the video(s). I would have thought lame mp3 encoder would be royalty free and x264 should be with the exception of mpeg4 which xvid would also require. x264 is better quality and xvid if you didnt already know. fairly sure you'd have to pay for AAC, nero's AAC is free for users not sure about commercial purposes though.

The are software implementations of MP3 and H.264 that can be used for free and for any purpose, because they are released under (L)GPL. This applies to x264 and LAME, for example.

However the audio/video formats themselves, MP3 and H.264 for example, are patented. So if you use x264/LAME for commercial purposes, then you still may need to pay patenting fees!

You don't need to pay anything to the x264/LAME developers, but to the patent holders. That's the crux...

emptyeighty
23rd January 2009, 23:51
Of course I would need to distribute the xvid codec and automatically install the codec on the end-users computer after installing my game.
Whatever you do, _please_ don't go around registering random DirectShow filters with your game. Depending on what the user has installed, a filter with higher merit than yours (ffdshow) can take over decoding of your videos. Or you're taking over (and possibly breaking) your user's video playback (esp. WMP).

If you want repeatable results, use some self-contained solution. Maybe mplayer works for you. Just stay far away from DirectShow.