Video codecs
Hi! Sorry if this is not the right forum for this question, but I don''t find any other that''s more apropriate.
My group and I are developing a game and want to include some AVI cutscenes in it. The questions are:
- What codec do you recommend we use to encode the video so that it has the best balance possible between quality and file size?
- If I use a codec, do I have to pay any kind of license? Can I distribute them with my game?
- How do I install the codec in the gamer''s system in a way that''s transparent to them? Is it enough to copy some file to some Windows'' directory or in the same directory as the video?
I''ll really appreciate any help. Thanks.
Mariano Ruggiero
Lead Programmer
ONIRIC GAMES
Mariano RuggieroONIRIC GAMESLatestGame: TIME OF WAR
>>What codec do you recommend we use to encode the video so that it has the best balance possible between quality and file size?
That depends on a lot of things.
What medium are the cutscenes being stored on (Harddrive, CDROM)? With CDROM, especially if you are targeting Pentium 1 systems, you need to take into consideration maximum bandwidth. Codecs can often have variable bitrates, so that low action pieces require less and high action requires more (and the entire video averages somewhere in between). However if your source device can''t handle the bitrate of the high action scenes the video will stutter.
What is the target minimum requirements (CPU), and what other things will you be doing while cut scenes are playing? Modern MPEG4 codecs (WMV, DivX, Xvid, etc) offer high compression, but they also require beefer CPUs. I would not attempt playing a 640x480x30fps video on anything less then a 500mhz system (and depending on the bitrate it could be higher). If you are integrating cutscenes into the game itself you also need to consider the CPU time used for those tasks.
>>If I use a codec, do I have to pay any kind of license? Can I distribute them with my game?
That depends entirely on what codec you choose. A codec like WMV would be free, and would already be present on most systems (and could be auto downloaded). A codec like DivX would be free to the end user, but you could not distribute it with your commercial game without buying a licence (you''d either have to pay or direct people to manually download and install it). You should really find the copyright and licening documation for what codec you are interested.
>>How do I install the codec in the gamer''s system in a way that''s transparent to them? Is it enough to copy some file to some Windows'' directory or in the same directory as the video?
Again, this depends on the codec (as well as how you intend to use it). The most simple codecs require only that a codec DLL be copied and a few registry entires be added (i.e. HuffYUV) to tell the system what the codec FourCC is, what it''s called and where the DLL is. Something like DivX, or a DirectShow codec, can require more. However an important thing you should realize is that codecs are system components. Many users will not be pleased when you install a codec without asking them, potentally screwing up their computer and preventing them from playing back some of their normal video files. (and this will happen. See any number of problems caused by "codec packs" and the installing of DivX 4 vs DivX 5.02 vs DivX 5.10). (for instance I know one game that installs a playback version of some of the Indeo codecs, which of course overwrites my developer versions, preventing me from opening Indeo encoded videos in an editor)
That depends on a lot of things.
What medium are the cutscenes being stored on (Harddrive, CDROM)? With CDROM, especially if you are targeting Pentium 1 systems, you need to take into consideration maximum bandwidth. Codecs can often have variable bitrates, so that low action pieces require less and high action requires more (and the entire video averages somewhere in between). However if your source device can''t handle the bitrate of the high action scenes the video will stutter.
What is the target minimum requirements (CPU), and what other things will you be doing while cut scenes are playing? Modern MPEG4 codecs (WMV, DivX, Xvid, etc) offer high compression, but they also require beefer CPUs. I would not attempt playing a 640x480x30fps video on anything less then a 500mhz system (and depending on the bitrate it could be higher). If you are integrating cutscenes into the game itself you also need to consider the CPU time used for those tasks.
>>If I use a codec, do I have to pay any kind of license? Can I distribute them with my game?
That depends entirely on what codec you choose. A codec like WMV would be free, and would already be present on most systems (and could be auto downloaded). A codec like DivX would be free to the end user, but you could not distribute it with your commercial game without buying a licence (you''d either have to pay or direct people to manually download and install it). You should really find the copyright and licening documation for what codec you are interested.
>>How do I install the codec in the gamer''s system in a way that''s transparent to them? Is it enough to copy some file to some Windows'' directory or in the same directory as the video?
Again, this depends on the codec (as well as how you intend to use it). The most simple codecs require only that a codec DLL be copied and a few registry entires be added (i.e. HuffYUV) to tell the system what the codec FourCC is, what it''s called and where the DLL is. Something like DivX, or a DirectShow codec, can require more. However an important thing you should realize is that codecs are system components. Many users will not be pleased when you install a codec without asking them, potentally screwing up their computer and preventing them from playing back some of their normal video files. (and this will happen. See any number of problems caused by "codec packs" and the installing of DivX 4 vs DivX 5.02 vs DivX 5.10). (for instance I know one game that installs a playback version of some of the Indeo codecs, which of course overwrites my developer versions, preventing me from opening Indeo encoded videos in an editor)
October 31, 2003 12:20 PM
You should take a look at what''s availble from rad tools. http://www.radgametools.com/
Mmmh, I dont see a mention of Bink.
Bink generates files that are executables, so that the user dont have to install any fancy codec to see them
You can see a lot of .bik files, which AFAIK are just Bink videos without the EXE in them.
The point is, go and look for BINK video, as it''s one of the solutions that the industry seem to have been using for quite some times now.
Sancte Isidore ora pro nobis !
Bink generates files that are executables, so that the user dont have to install any fancy codec to see them
You can see a lot of .bik files, which AFAIK are just Bink videos without the EXE in them.
The point is, go and look for BINK video, as it''s one of the solutions that the industry seem to have been using for quite some times now.
Sancte Isidore ora pro nobis !
-----------------------------Sancte Isidore ora pro nobis !
quote: Original post by ahw
Mmmh, I dont see a mention of Bink.
Bink generates files that are executables, so that the user dont have to install any fancy codec to see them
You can see a lot of .bik files, which AFAIK are just Bink videos without the EXE in them.
The point is, go and look for BINK video, as it''s one of the solutions that the industry seem to have been using for quite some times now.
Sancte Isidore ora pro nobis !
The poster right above you mentioned Bink. Keep in mind that you can only use Bink for your game with a licence, which costs several thousand dollars.
well, hey, I never said he could afford it, I just said it *existed*, eh ?
After that, if he is brave enough, maybe he can come up with a similar concept using an existing and cheap codec ?
Sancte Isidore ora pro nobis !
After that, if he is brave enough, maybe he can come up with a similar concept using an existing and cheap codec ?
Sancte Isidore ora pro nobis !
-----------------------------Sancte Isidore ora pro nobis !
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement