Part 3
The bitrate should already been set from using the calculator. Unlike in regular DivX encoding this interval has only one function: If after the number of seconds you set there (10 in our example) there has been no keyframe inserted by the scene change detection mechanism a keyframe will be inserted. If there is a keyframe inserted by the SCD (scene change detection) this counter will be reset.
Minimum allowed bitrate is the minimum bitrate the movie will ever use. Values below 300 can lead to very nasty results so be careful with these settings. The minimum allowable bitrate is applied after the bitrate curve has been calculate, scaled, smoothed, etc. In the debugger output you won't see this value but the value before this is being applied.
Internal SCD will help the program insert keyframes when the basic detection misses by analyzing a frame and making it a keyframe if it's composed of more than Internal SCD % keyblocks. Space KFs gives a minimum spacing for 2 consecutive keyframes. Higher values mean less keyframes. A value of 100 disables this feature. Note that the Internal SCD is based on motion levels. If motion exceeds this treshold (motion 300 = 100%) a frame is encoded as keyframe. This can lead to a large amout of keyframes placed very closely together if you have scenes with much motion. Hence many people actually prefer to switch this feature off by setting the value to 100% and use the alternate SCD instead (see later on).
Finally Encoding errors prevention & Quality Control: Nandub offers you 3 different modes here. None does nothing and that's what I use unless my first try gets screwed up badly (freeze frame or really badly looking frames). When you set it to Antifreeze Nandub will prevent freeze-frames (that are frames where the video suddenly freezes and audio goes on). Full finally is the regular quality control mode which has a major impact on the encoding performance. Each compressed frame will get decompressed and compared to the source one. The resulting value will be between 0 and 95dB. If the value is lower than Shit, the frame will be recompressed as keyframe and it will be tested against the original again. A suggested value for Shit is 16 and for Min quality 28-30. When the value is lower than Min. quality Nandub will try to recompress the frame as delta frame but using a lower compression level. You can speed up the process greatly by leaving Min. quality at 0 and just use the shit value. Leaving min quality at 0 also helps when you get oversized files.
The last variable is Motion modulation. The parameter indicates how strongly the anti-shit feature will be applied at a certain motion level. Let's have an example: You entered 16 as Shit and 30 as min quality. At motion level 0 you'd get 16 Shit and 30 min quality. At motion level 150 you'd get Shit = 12 and min quality = 22.5 and at motion 300 you'd get Shit = 8 and min quality = 15. As you can see, the values at motion 300 are the values you entered times motion modulation (16*0.5=8 ;). The parameters are also scaled linearly, so at 1/2 max motion you have 3/4 of the shit and min quality values you entered. Another example: Say you enter 25% modulation. At motion 0 you still get shit 16 and min quality 30. At motion 150 you get shit 14 and min quality 26.25 and at motion 300 you get 12 for shit and 22 for min quality respectively.
And for all the people who didn't get the hint here's a nice little formula (I didn't look in the sources but the values sound reasonable):
Shit = Shit - modulation*Shit*motion/300. Min quality works the same way.
During the first pass Nandub measures how much motion there is in a certain frame. The motion is being plotted on a scale from 0-300, where 0 is no motion at all and 300 the highest amount of motion. Span indicates the area which is being analyzed to find this measure. ( means from 8 frames before the current frame till 8 frames after the current frame. If you set this value too high (more than twice of the suggested value) Nandub might miss a fast peak in motion completely and furthermore it would also slow down encoding quite a bit.
Sensitivity indicated how sensitive the the motion detection is. Values between 10 and 15 are suggested here. The lower the value the higher the sensitivity.
For those who prefer a bit more info about the concept of a motion event: In a delta frame there are keyblocks and delta blocks. A motion event is a certain amount of a frame being recalculated to keyblocks (note the similar concept with anti shit re-calculating a delta frame and make it a keyframe). Sensitivity in fact means how many blocks have to be recalculated to account for a motion event. If you didn't understand this, don't worry, it's not crucial to work the program, it's just some background info for the interested.
The Fast Motion and Low Motion settings indicate when the codecs will be morphed between low and fast (high) motion. Since the only real difference between DivX Low motion and DivX high motion is different compression settings it's safe to only use Low motion by setting the fast motion slider to 300.
Crispness modulation: Crispness has an influence of an unsharp filter in the DivX codec and on the compression levels being used. When motion is equal to 0 crispness will be 100, on the other hand when motion is up to 300 the value you enter under cripsness modulation will be used. In our example crispness will be 100-30 (the value entered by you in the crispness modulation box) = 70. The 2nd effect of the cripsness setting (influencing compression levels - Enable BR modulation in the program). Noisy movies could require a higher value (for instance: Papillon = 50%)
Enable BR modulation will make influence the bitrate reservoir according to the detected motion in the first pass, and not set DRFs directly. BR modulation should be enabled for 1 CD rips in any case. For 2 CD rips you can deactivate it. If you decide to activate motion based curve modulation in the Bitrate Curve tab (this is suggested) then you MUST NOT not enable BR modulation.
Collect in gives path and name of the stats file that's being generated during encoding. Encode using gives path and name of your first pass stats file. You can use the Collect in line to generate a stats file for the 2nd pass as well for research purposed. Stats file contain data which allows the program to plot a bitrate graph. This curve is scaled to correspond to the selected bitrate.
Motion based curve modulation: This is basically a replacement for Crispness modulation in the above screen. If you enable this value (set something larger than 0%) you should deactivate the Bitrate reservoir modulation. A suggested value is 25%. It is possible that this modulation gives better results (according to the people who devised it and some who have been using it in the Maras hacks). Basically what it does is modulate the bitrate curve according to motion. Let's say you have motion 300, and modulation 30%. If your bitrate is 600 it subtracts 30% of 600 (180) off the curve resulting in a bitrate of 520. If you have motion level 150 it subtracts 30/2=15% from the bitrate so it's a linear factor.
|