Differences

This shows you the differences between the selected revision and the current
version of the page.


kbase:tranzaudiosimple 2008/02/26 13:36 kbase:tranzaudiosimple 2017/12/03 14:48 current
Line 1: Line 1:
 +====== Ogg Theora - Or, how to convert them and have them play correctly. ======
 +
Wintermute supports the use of Ogg Theora video files, which are very well compressed without losing much quality.  The problem I had was that none of the methods outlined anywhere I could find for converting an AVI/MOV file to Ogg Theora was actually working on a level I'd call "professional" - very frustrating. Wintermute supports the use of Ogg Theora video files, which are very well compressed without losing much quality.  The problem I had was that none of the methods outlined anywhere I could find for converting an AVI/MOV file to Ogg Theora was actually working on a level I'd call "professional" - very frustrating.
Line 5: Line 7:
So, I've taken it upon myself to make this small guide Roll Eyes.  This is the method I use to get Theora files into the engine that are small (a 2-min video file is 3MB-8MB, depending on resolution) and that work, as a big plus, with optional subtitles. So, I've taken it upon myself to make this small guide Roll Eyes.  This is the method I use to get Theora files into the engine that are small (a 2-min video file is 3MB-8MB, depending on resolution) and that work, as a big plus, with optional subtitles.
-Tools you'll need:+====Tools you'll need====
-Rad Video Tools +[[http://www.radgametools.com/bnkdown.htm|Rad Video Tools]] 
-Virtual Dub +[[http://virtualdub.sourceforge.net/|Virtual Dub]] 
-ffmpeg2theora +[[http://www.v2v.cc/~j/ffmpeg2theora/download.html|ffmpeg2theora]] 
-SubtitlesK5ky (Subtitle Software)+[[http://www.volny.cz/subtitlesk5ky/subtitlesk5ky.htm|SubtitlesK5ky (Subtitle Software)]]
And at least 10GB of free hard drive space (some temporary space for LARGE uncompressed video files). And at least 10GB of free hard drive space (some temporary space for LARGE uncompressed video files).
-What you need to do:+ 
 + 
 +====What you need to do====
1) Open RadVideo.exe and select the source file in the browser.  Click the button "Convert a File". 1) Open RadVideo.exe and select the source file in the browser.  Click the button "Convert a File".
Line 32: Line 36:
6) "ffmpeg2theora.exe" is a drag-and-drop utility, so drag you're Uncompressed, Resized AVI file onto the icon and wait for it to convert.  It will automatically save a .OGG file in the same directory as the original.  The .OGG file will be very small by comparison; for a test run, I used a 100MB file...it is now 300kb with no noticeable visual or audio loss.  Nice! 6) "ffmpeg2theora.exe" is a drag-and-drop utility, so drag you're Uncompressed, Resized AVI file onto the icon and wait for it to convert.  It will automatically save a .OGG file in the same directory as the original.  The .OGG file will be very small by comparison; for a test run, I used a 100MB file...it is now 300kb with no noticeable visual or audio loss.  Nice!
-(NOTE: .OGG files do not save the FPS (frames per second) in the property dialog...this can be important to know, so it might be a good idea to put the FPS in the comments section of the property dialog for future use.)+(**NOTE:** .OGG files do not save the FPS (frames per second) in the property dialog...this can be important to know, so it might be a good idea to put the FPS in the comments section of the property dialog for future use.)
(At this point, the video file is ready to be used in the engine using the PlayTheora command.  However, the subtitle stuff is pretty cool, and will make your game that much more professional.) (At this point, the video file is ready to be used in the engine using the PlayTheora command.  However, the subtitle stuff is pretty cool, and will make your game that much more professional.)
Line 40: Line 44:
Cool Basically, the "Compendium" window shows the entire sequence.  When you play the movie, there is a box at the bottom of the main window marked "Actual Frame:" - this shows the frame the video is on at any given point.  You put the "Actual Frame" values into the "From" and "To" text boxes.  For example, if a person in the movie starts saying "Hello" at frame 34 and ends at frame 45, you'd put 34 and 45 in the "From" and "To" boxes respectively, and then "Hello" into the subtitle box.  There are a lot of buttons, but the ones that you'll use a lot are the ones with two rectangles in them in the main window; these insert a new subtitle.  After you've inserted a few of subtitles, you can play back the movie and the subtitle will light up when it will show up during the movie, so you can be sure it works. Cool Basically, the "Compendium" window shows the entire sequence.  When you play the movie, there is a box at the bottom of the main window marked "Actual Frame:" - this shows the frame the video is on at any given point.  You put the "Actual Frame" values into the "From" and "To" text boxes.  For example, if a person in the movie starts saying "Hello" at frame 34 and ends at frame 45, you'd put 34 and 45 in the "From" and "To" boxes respectively, and then "Hello" into the subtitle box.  There are a lot of buttons, but the ones that you'll use a lot are the ones with two rectangles in them in the main window; these insert a new subtitle.  After you've inserted a few of subtitles, you can play back the movie and the subtitle will light up when it will show up during the movie, so you can be sure it works.
-(NOTE: You can also do SUB files with a simple text editor.  To do the above in a text editor, you'd insert "{34}{45}Hello") +(**NOTE:** You can also do SUB files with a simple text editor.  To do the above in a text editor, you'd insert "{34}{45}Hello") 
-(NOTE: It's also a good idea to fill the frames you don't have anything displaying with a space, so that you know nothing will show when it's not supposed to)+(**NOTE:** It's also a good idea to fill the frames you don't have anything displaying with a space, so that you know nothing will show when it's not supposed to)
An example .SUB file is as simple as: An example .SUB file is as simple as:
Line 55: Line 59:
And you are done!  Play the ogg file in game, watch the subtitles show up on cue (unless you have them turned off) and pat yourself on the back.  Since the subtitles are a separate file and not part of the movie, they can be turned off and also translated into different languages for localization.  Sure, you might get away with just using ffmpeg2theora on everything, but chances are you'll get garbage, it won't be the right size, the audio won't work, or everything will be out of sync.  This method ensures that the converted file IS the original taking up less space. And you are done!  Play the ogg file in game, watch the subtitles show up on cue (unless you have them turned off) and pat yourself on the back.  Since the subtitles are a separate file and not part of the movie, they can be turned off and also translated into different languages for localization.  Sure, you might get away with just using ffmpeg2theora on everything, but chances are you'll get garbage, it won't be the right size, the audio won't work, or everything will be out of sync.  This method ensures that the converted file IS the original taking up less space.
-NOTE: And remember to delete those Uncompressed AVI files after the conversion, or you will be using a good 10GB for every file.  Not good.+**NOTE:** And remember to delete those Uncompressed AVI files after the conversion, or you will be using a good 10GB for every file.  Not good.
I hope this was helpful, and have fun! I hope this was helpful, and have fun!
--CMK2901 --CMK2901
 +
 +
 
kbase/tranzaudiosimple.1204029368.txt.gz · Last modified: 2008/02/26 13:36 by Jyujinkai
Recent changes RSS feed Creative Commons License Driven by DokuWiki