Old Fashioned Pretzel Rods - Women Love the Rod!

Please login or register.

Login with username, password and session length
Advanced search  

News:

Current [OFPR] Server line-up  32 slot Office 24/7 and a  32 slot Dust2 24/7

Pages: [1]   Go Down

Author Topic: Making Video Tips 2  (Read 637 times)

0 Members and 1 Guest are viewing this topic.

CrazyFrog

  • Sergeant
  • *
  • Awesome Points: -56
  • Offline Offline
  • Gender: Male
  • Posts: 550
Making Video Tips 2
« on: February 03, 2008, 09:57:39 AM »

Demo --> WAV
 
In this part of the guide I intend to show how to record in-game sounds. What we need is an application capable of recording sounds, like the Windows Recorder for example. The program I have used is Creative Recorder, which happened to be bundled with my sound card. There are other applications that will suit our need as well, and one such application is one called OpD2d which can be found via http://www.opcode.co.uk/opd2d/ (tipcred to Gurk).

We'll begin by running the game in windowed mode. Start the game and bring down the console. In the console we simply write \r_fullscreen 0 and then press ENTER. The console tells us that the changes we just made wont take effect until we restart the game. So let's do that by typing, again in the console, \vid_restart and then press ENTER again. The game is now restarting (or actually the video system). The combination of Alt+Enter will accomplish the same thing. In case you would like a smaller window you could set \r_mode to something like 3 (512*384).

In order to record the in-game sounds we need to tell our recording application what source to use. In my case I chose an option called "What U Hear" which means that I'll be recording whatever passes through the speakers. On your system the option might be called something different.
If you use the application linked above, I think you will find the interface pretty much self explanatory.

Start the recording and then switch back to the game window. Start the demo and allow it to play through. When the demo is completed you can safely shut down the game and save the recorded audio file as a .wav-file which we'll later import. How to add sound is covered in the section Compression with Gordian Knot.
 

TGA to AVI
When looking in the folder containing our screenshots, we note that it now contains a whole lot of numbered image files. What we're gonna do now is to stitch all those images together och save them as an .avi-file. There are alot of programs capable of doing this, some are freeware and some are commercial products. Information on where to find such programs can be found in the links section. In this guide I'll use a free program called VirtualdubMod, included in the Gordian Knot Rip Pack installation.
Start VirtualdubMod and go to File --> Open Video File and browse to the folder containing the screenshots. Make sure that the box next to which it says Automatically detect and load additional segments is checked. Then select the first file in the sequence and click Open/OK. A small window labelled Image import filter opens up, showing the progress of the importing of images. When it's done you should see something similiar to what is shown in the below image.
 


If all we're interested in is to create an AVI-file (without audio) then we have to do nothing more than to save it as an AVI-file. What we might want to do however is to discard the sequences we do not want to include in the final movie. To do that we simply move the slider beneath the sequence to the location where we want to start cutting, press the left button in the red circle, move the slider to the end of the part we want to discard and then press the right button in the red circle. We then press DELETE and the images between our two markers will be discarded.

What we are going to do now is to save the matrial as an AVI-file. One thing we must do before we do that however, is to make sure that its saved using the same framerate as the value we chose for cl_avidemo, that is 25 in our case. Click Video and then Frame Rate. A small window like the one below opens up, and we set the framerate to 25 (or the value you used for cl_avidemo). This is a rather important step to remember, because if we leave it out we'll have an AVI-fil running at a speed different than that of the game demo file.



When we have made the above changes we go to Video and chose Full Processing Mode then we go to Video again and select Compression. In the window that opens up we select (Uncompressed RGB). Finally we go to File where we click Save as... Chose a name for the file and click OK. A window opens up showing the conversion process. When it's done we may open the AVI-file in the media player of our choice.
I have now described the entire process from recording a demo, outputting it to screenshots och from that create an AVI-file that anybody can watch in the available media players. Our AVI-file is uncompressed though, which means that in size it equals the screenshots it's made up of. It doesn't contain any audio track either. In the next step I'll show you how to add audio to the file as well as compressing it.

Gordian Knot - compressibility check and compressing

Applications needed:
Gordian Knot Rip Pack - http://gordianknot.sourceforge.net/
Gordian Knot Codec Pack - http://sourceforge.net/projects/gordianknot

As noted earlier our folder with the screenshots become large pretty fast, and our uncompressed AVI-file will be correspondingly large. Therefore we'll be looking for a way to decrease the size of our AVI-file whitout losing too much in visual quality. The key to accomplishing this is to use an application that can compress the file for us. There are many such programs available, one of them being the popular application by Avery Lee called VirtualDub. The application I'm going to use however is one called Gordian Knot (which incorporates the work of Avery Lee). Gordian Knot is a program package developed to make it easy to backup DVD movies, and it admits the possibility to resize video clips as well as aid in performing optimization tasks. Even if we're not interested in making DVD backups, Gordian Knot is well suited to our needs.

When coding a movie we are very often forced to make a trade-off between size and quality. The problem is that when using an application like VirtualDub by itself it's rather hard to tell in advance what bitrate to chose in order to achieve a certain quality. It's a game of making qualified guessings. Not so with Gordian Knot though.

Before we start our compression we need to install Gordian Knot and a package containing some codecs. First install Gordian Knot Rip Pack and then Gordian Knot Codec Pack. We will not need all the different codecs and applications included in the two packages for this guide, but rather than detailing every application, what it does and so on, I simply recommend installing it all. Personally they have never caused me any problems what so ever, but for safety's sake I recommend creating a system restore point (if your system supports it) in case you would run into problems.
During installation of the DivX3 codec Windows will probably protest by saying that the codec has not been through Microsoft's compatibility test, and that it therefore may cause harm to your system now or in the future. This can, even if I take no responsibility for problems arising, safely be ignored and the installation request accepted.

The codec pack contains among other things the latest version of the DivX codec, which contains adware. the adware application will occasionally attempt to access the internet. In case you are concerned with your privacy you can block the applicaton's access attempts by means of a firewall application, for example the free app ZoneAlarm - http://www.zonealarm.com/store/content/home.jsp . Some parts fo the adware can not be removed without also causing the codec not to function. For more details about how to protect yourself, I suggest visiting this thread - http://forum.doom9.org/showthread.php?s=&threadid=19583  over at the Doom9 forum.

There are at least two things besides making DVD backups that Gordian Knot is good for, and they are

1) to perform compressibility checks for the purpose of in advance giving a hint as to what quality will be acheived at a particular bitrate and resolution

and

2) to perform the entire encoding process in 2-pass mode, with or without adding an audio track.

I will describe both steps in turn. All the different steps in the compressibility test and the encoding process are described in the list below and every list item corresponds to a number marked in the images referred to in the different steps.

Compressibility check

Begin by starting Gordian Knot

Begin by starting GordianKnot - http://www.bonetweb.com/dna/movie_guide/images/gknot.jpg . The different steps are shown here - http://www.bonetweb.com/dna/movie_guide/images/bitrate.jpg  and here - http://www.bonetweb.com/dna/movie_guide/images/resolution.jpg .

1.The first thing we do is to name the project. Push the button "Rename" and enter a name and then press ENTER.

2.Click on "Open" and browse to the location of our AVI-file. A new window - http://www.bonetweb.com/dna/movie_guide/images/frameno.jpg will open in which you can see the imported video file. Keep that window in the background, but don't close it. At the bottom left in the main window you can see the framerate and frame count of the clip.

3.Check the radio button indicating that we wish to use the DivX5 codec.

4.If we know that we wish to use an audio track in the form of an .mp3-file, we indicate that by checking the button labelled "1x vbr-mp3."

5.In the dropdown meny we also set the bitrate we wish to use for our audio track. This is just for bitrate calculation purposes, and wont affect the actual bitrate of the audio track.

6.This field is useful when we wish to set the final size for our movie. In step 12 we perform the compressibility check, which means that the codec will test how much the source clip can be comressed. A number is returned which in turn will determine the value shown in field 6 (not shown until after step 12). 100% means that the codec is at its maximum, and a bitrate increase (which is synonymous with increased size) will not produce better visual quality. Between 60% and 80% seem like a good figure, but I suggest you experiment by changing the value in field 7.

7.This is were we set the size we want our final file to have. If we don't check the radio button in step 4 and set a bitrate in step 5 but afterwards add an audio track our final file size will exceed the value in field 7. A typical full song lenghted MP3-file is rather small in size compared to the video track, so it's not the end of the world if the button isn't checked and no bitrate set.

8.Make sure this value is the same as the resolution of the source clip.

9.This is the hight-width ratio of the source file pixels. I assume the ratio is 1:1, so check the corresponding radio button.

10.Pull the slider in order to set the resolution of the final clip. The value in field 6 is affected by the resolution. It is therefore important to decidec what resolution to use before moving on to step 12 as well as setting the file size (since it too is affected by the value in field 6.)

11.Switch to the window opened in step 1. Click on "View" and then "Resize" to see the clip in the resolution set in step 10. Then click on "File" and "Save&Encode" which will open up a new window - http://www.bonetweb.com/dna/movie_guide/images/save_encode1.jpg . Under the header "Resize" there is a number of different options. I use Lanczos , but as always I recommend that you experiment a little in order to find the one best suited for your needs.

12.Check the button next to "Use" and then click "Edit." A new window will open up having the title "Avisynth Comp.test Frameserver." Find the line that says UnDot() and add on a new line above it the text ConvertToYV12() and then press the button "Comp Check." A small window with the label "Press 'OK' to start a DivX5 compressibility check now. Please wait a few minutes, you can not use Gordian Knot until encoding is finished" opens up. Click on OK. A new application (VirtualDubMod) is started and it will run a short compressibility test and then close again. If we now look in field 6 we'll find that a number has appeared. Change the value in field 7 to something that gives a value in field 6 within the range we wish to use - that is 50% to 100% (the optimal value is something that may be debated, but once found it should hold true for most files).

13.Switch back to the window opened in step 2, and once again click on "Save & Encode" and in the new window that opens on "Edit." Again look for the line that says UnDot() and insert on a new line above ConvertToYV12() and then click on "Save & Encode." Chose were to save the AVISynth-script (yourmovie-avs). A new window - http://www.bonetweb.com/dna/movie_guide/images/save_encode1_2.jpg  should open up. Click on "Select" and find the audio track you wish to use. As you will note, most formats are acceptable. I'll chose an existing MP3-file and select the radio button labelled "Just Mux." This means that Gordian Knot will simply add the audio track without doing anything with it. If we know that the audio and video track are out of synch, we can correct that now by entering a value (in milliseconds) in the field called "Delay." This value tells Gordian Knot how much to move the audio track in relation to the video track. If the sounds are late compared to the video track events, we check the box "negative."
We can also chose to add an uncompressed WAV-file, for example our in-game sound, and tell Gordian Knot to encode it as an MP3 track. This is done by checking one of the MP3 radio buttons and entering a bitrate. VBR = variable bitrate, CBR = constant bitrate.

14.Click the tab labelled "DivX5" and a window looking something like this - http://www.bonetweb.com/dna/movie_guide/images/save_encode2.jpg should open up. Click the button "First Pass" and another window looking like this - http://www.bonetweb.com/dna/movie_guide/images/firstpass_divx5.jpg opens up. If we made a compressibility check then the suggested bitrate is already set. Make sure the field "Variable Bitrate Mode" is set to "Multipass, 1st pass" and then click the button "Select Profile Wizard" and then "Disable Profile Wizard" in the window that opens. This way we wont have to deal with the preset DivX profiles associated with hardware compatibility issues (for those who definately wish their creations to play on DivX capable hardware players I suggest using one of the profiles of course). Click "Next" and then check the box "Use GMC" as well as "Use Bidirectional Encoding." Click OK. Move the "Performance / Quality" slider to "Slow" and then click "OK." Now click the button labelled "Nthpass" upon which a window looking like the previous one opens up. Make sure all the settings are the same except for "Variable Bitrate Mode" which should be set to "Multipass, nth pass." In case we'd like to encode using more than two passes we simply increase the number in the dropdown menu "Number of passes" to the number of passes we'd like to use. When "Performance / Quality" is set to "Slow" more than two passes is hardly required.

15.Click the button "Add job to encoding queue." We are presented with the question whether or not to start the encoding. Answer "Yes" upon which VirtualDubMod opens up and the encoding process begins. Wait until the encoding is finished before closing Gordian Knot. You can now browse to your encoded file and open it up in the media player of your choice.

I hope it helped You and If you have any question ask me in here and I'll answer.

Sorry if there is some mistakes but English isn't my first language.





Logged

Pages: [1]   Go Up
 

Page created in 0.778 seconds with 23 queries.