As theres more and more people asking how to do encoding to get good results I decided to write this.
1-pass encoding seems to be the preferred method for most people encoding their ingame videos. However 1-pass encoding is whats called CBR or constant bitrate encoding. Every frame in the video is granted the same amount of video data in the resulting file.
Hows this bad then? Well consider a part of your rvr video where you just stand still and nothing moves. The constant bitrate gets wasted, frames are granted more data than they actually need.
This is where 2-pass encoding comes in. 2-pass encoding is VBR (variable bitrate). First the program of your choice does a testrun of the video to see how the bitrate should vary to get the best possible result considering data per frame. The second pass then actually encodes the video using this information. This way the black screen or no movement part of the video doesnt use so much data.
And now for the tutorial. For this example ill use a short video i made as an example.
What youll need:
1: virtualdub
2: xvid
3: your sourcevideo
I wont go into details but ill just say, try to avoid repacking your video, always keep your video in a lossless format so that you dont loose videodata.
A good method is using HUFFYUV
Always avoid repacking your video, and even try to capture to a lossless format (fraps does this for example). Data is lost at every single re-encode stage, so once again, avoid it.
1: open your video in virtualdub
2: set audio compression to "full processing mode" and "source audio", unless you already packed it to mp3
3: set video compression to full processing mode and open the compression menu
4: set compression settings
FIRST select xvid as codec
SECOND press configure
THIRD set encoding type to twopass - 1st pass
FOURTH select your video profile, my example video is 1280x720 so ill use HDTV profile, for normal resolution videos you should use "advanced simple @ L5"
FIFTH press the "more..." button of the encoding type and set a filename where the first pass statistics should be saved
5: add the job to the compression queue by selecting file -> save as avi
select a filename and tick the checkbox to not start the job now but to add it to the queue
6: set compression settings again
FIRST set encoding type to twopass - 2nd pass
SECOND press the encoding type "more..." button to open the filesize info
THIRD fill out the information about the audio in the video, either set it to vbr/cbr accordingly, or give the exact size of the audio mp3 that will be included
FOURTH set your videos runtime and FPS
FIFTH set the size you want for your video, i personally like to use "warez" releases as reference. A ~40min Lost episode 1280x720 takes about 1.2GB
so my 1min 32second video at the same resolution would be 1.2*1024/40*1.5 = 46.08. So 46MB, so i set the size to 50000Kb (~50MB). For smaller resolution files a good reference would be around 200MB per 15min of video, or more as the resolution increases.
7: same as step 5
8: start the queue, press F4 to open the job control menu
FIRST press start to start the encoding process, get some cookies and enjoy
1-pass encoding seems to be the preferred method for most people encoding their ingame videos. However 1-pass encoding is whats called CBR or constant bitrate encoding. Every frame in the video is granted the same amount of video data in the resulting file.
Hows this bad then? Well consider a part of your rvr video where you just stand still and nothing moves. The constant bitrate gets wasted, frames are granted more data than they actually need.
This is where 2-pass encoding comes in. 2-pass encoding is VBR (variable bitrate). First the program of your choice does a testrun of the video to see how the bitrate should vary to get the best possible result considering data per frame. The second pass then actually encodes the video using this information. This way the black screen or no movement part of the video doesnt use so much data.
And now for the tutorial. For this example ill use a short video i made as an example.
What youll need:
1: virtualdub
2: xvid
3: your sourcevideo
I wont go into details but ill just say, try to avoid repacking your video, always keep your video in a lossless format so that you dont loose videodata.
A good method is using HUFFYUV
Always avoid repacking your video, and even try to capture to a lossless format (fraps does this for example). Data is lost at every single re-encode stage, so once again, avoid it.
1: open your video in virtualdub
2: set audio compression to "full processing mode" and "source audio", unless you already packed it to mp3
3: set video compression to full processing mode and open the compression menu
4: set compression settings

FIRST select xvid as codec
SECOND press configure
THIRD set encoding type to twopass - 1st pass
FOURTH select your video profile, my example video is 1280x720 so ill use HDTV profile, for normal resolution videos you should use "advanced simple @ L5"
FIFTH press the "more..." button of the encoding type and set a filename where the first pass statistics should be saved
5: add the job to the compression queue by selecting file -> save as avi

select a filename and tick the checkbox to not start the job now but to add it to the queue
6: set compression settings again

FIRST set encoding type to twopass - 2nd pass
SECOND press the encoding type "more..." button to open the filesize info
THIRD fill out the information about the audio in the video, either set it to vbr/cbr accordingly, or give the exact size of the audio mp3 that will be included
FOURTH set your videos runtime and FPS
FIFTH set the size you want for your video, i personally like to use "warez" releases as reference. A ~40min Lost episode 1280x720 takes about 1.2GB
so my 1min 32second video at the same resolution would be 1.2*1024/40*1.5 = 46.08. So 46MB, so i set the size to 50000Kb (~50MB). For smaller resolution files a good reference would be around 200MB per 15min of video, or more as the resolution increases.
7: same as step 5
8: start the queue, press F4 to open the job control menu

FIRST press start to start the encoding process, get some cookies and enjoy