Home
RecentChanges

Search:

» AviSynth is a powerful video FrameServer for Win32.

AviSynth Links:
»Download
»Learn to script
»FAQ
»Manual
»Discussion fora
»Project page
»External filters
»FeedBack

» You can add pages to this website immediately. No login required.
Edit this document

» AboutAviSynth

 

Avisynth 
Logo

AviEncodingUsingXviD

GUIDE NOT READY YET

I just copied everything from the DivX3.11 guide to ensure same look

Starting

  • Start nandub. (included in the GordianKnot package)
  • Open your .avs with 'File->Open'.

Audio

  • Open your audio file with the appropriate command in the audio menu, i.e. 'MP3 audio' or 'AC3 audio'. Even though nandub can handle Ogg/Vorbis audio, the VirtualDubMod team have found errors in nandubs handling of this form of audio, and you should use VirtualDubMod to mux the video with Ogg/Vorbis if that is your choise of audio.
  • Then select 'Audio->Interleaving'. For MP3 audio the preload and interleave boxes should be set to 500ms. For AC3 audio they should both be 64ms. These vaules will usually not result in asych audio. If DVD2AVI detected a delay in the audio you should set the delay box in this window to the appropriate value. DVD2AVI will add the delay value to the audio filename. It is also possible to have two audio streams in the same AVI, using the 'Secondary Stream' sub menu of the Audio menu.

Video

  • Select 'Video->Fast Recompress'. This will avoid converting the video to RGB before passing it to the encoder where it will be reconverted to YV12. (For a discussion on colorspaces, see the FAQ, section 3.)
  • Select 'Video->SBC Options->SBC settings'. In the first tab, choose your desired bitrate. Minimum desired bitrate is usually set to 460kbps, but this is too high, unless you have a desired bitrate of 1000kbps or higher. GordianKnot will always set this value to 270kbps, and this is usually a much more sensible choise of minimum bitrate. 'Keyframe Interval' will determine how fast you can seek in a movie. Decrease this value and you will be able to seek a little faster. Increase it and you will gain a few bits to use for video. Not much, as nandub automatically inserts keyframes when they are needed, but never closer than 'minimum keyframe distance'. This value is set to 24, which usually equals about 1s. There is no need to change this value unless you are trying for extremely high bitrates, and then it should be lowered only slightly.
  • Next tab, 'Bitrate Curve', includes a feature where you can lower the bitrate for the final minutes, when most films only have a credits list running. Here you set the start frame of those credits, and the bitrate you want to use for the end. Again this is by default set a little high, 350kbps, and again GordianKnot will use 270kbps. Personally I think that this value also can be too high, and prefer to set it to 1/3 of the desired bitrate, if the desired bitrate is lower than 800kbps. All other values can be left at default here, but if you think the video is too dark, then you can activate 'Luminance correction', which will brighten the video slightly. There is also two fields for a stats file. These will be filled in automatically when you do a two-pass encode, but if you want to make one pass at the time, then the first field, 'Collect In' must be used for the first pass, and the second, 'Encode Using', must be used for the second pass. In that case, make sure to select 'Optional data: Scene changes' also.
  • 'Motion' tab does not do anything anymore. this is a set of old features that has been left in, but is now obsolete as they are not needed anymore. They are remnants of pre RC releases of nandub.
  • 'Gauge' tab is more interesting. This controls the bit reservoir, i.e. how much bits that can be saved from one frame for use later. Still, unless an encode turns out to give you undersized/oversized file there is no real point in changing this, and if you have made a compression test with GordianKnot this is very unlikely.
  • 'Compression levels' tab does need some tweaking though. The first line, DRF, can be left at default if you are doing a low bitrate encode. However, if GordianKnot has indicated a BPP value larger than 0.2 you can safely change the max value to 8 or 10 (if you are close to 0.2BPP). All lines starting with 'use' are also obsolete remnants of earlier nandub versions. The last part, 'Keyframe Quality' is interesting. The default 4/31 is way too high. 2/4 will produce a much better looking video but if you are going for a low quality rip you can use 3/8 instead. Keyframes are usually much larger (bitwise) than normal frames, and the default is a way of ensuring maximum bitrate availble for as many frames as possible. This has the unfortunate side-effect that since the keyframe have a quite low quality, it will require lower DRF from the proceding normal frames, thus annihilating the gain in bitrate from using high DRF on a keyframe. I'm afraid you will have to do some experimenting on your own to find the optimal choise for your needs. In any case should maximum DRF exceed 16x, for either normal frames nor keyframes.
  • 'ECF' is a way of feeding nandub a manual override to it's internal choises. If you want you can use GordianKnot to create these files.
  • Finally OK the 'SBC Options' window.

Encoding

  • Now press Shift-F8 or select 'File->Two Passes'. First you will be asked for the name and path of the final AVI. Then you will be asked for a filename and path for a stats file. This file is used by nandub to save the information it gathers in the first pass for use in the second pass. By default the box 'Save to job list' will be checked, so the actual encode will not start when you have selected the two files to use.
  • To start the encode first select 'File->Job Control'. Then press the start button in the new window (not the one on your desktop ;).

Hints

  • If you are not satisfied with the final result, you can always go back to nandub, change the nandub-parameters you think was incorrect, load the stats file in the 'Bitrate Curve' tab of the 'SBC Options' window, and then use 'File->Save AVI' in order to only redo the second pass.
  • If you get a filesize much lower than you expected, load the stats file in GordianKnot and make sure you actually can reach the desired bitrate. This is not always the case, and then you should either rethink your audio bitrate or increase the size of your video.
  • Today, with GordianKnot able to do encodes using AVI input, there is no real need for doing manual encodes in nandub. It is much easier to let GordianKnot do everything for you. You may be able to tweak nandub into producing a slightly better looking video if you do it manually though, but I doubt that it is worth the effort.

SourceForge Logo

 


Edit this document | View document history
Document last modified Mon, 29 Dec 2003 22:01:14