PDA

View Full Version : Poor 31x Keyframe Quality


moggis
9th December 2001, 16:12
Hi, I'm trying to encode Iron Monkey using Nandub. Some keyframes of the movie compress to 31x even when I set the Min/Max compression to 2/3 - does anyone know why this would happen?

Thanks!


This is the profile I used:

VirtualDub.audio.SetSource(0);
VirtualDub.audio.SetMode(0);
VirtualDub.audio.SetInterleave(1,500,1,0,0);
VirtualDub.audio.SetClipMode(1,1);
VirtualDub.audio.SetConversion(0,0,0,0,0);
VirtualDub.audio.SetVolume();
VirtualDub.audio.SetCompression();
VirtualDub.audio2.SetSource(0);
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(3);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetDivX(950,10);
VirtualDub.video.SetQualityControl(2,16,0,50);
VirtualDub.video.SetMotionDetection(8,10,300,300);
VirtualDub.video.SetCrispness(30,0);
VirtualDub.video.SpaceKF(24);
VirtualDub.video.InternalSCD(100);
VirtualDub.video.SetMinKBPS(320);
VirtualDub.video.SetCurveFile("C:\\Temp\\Iron\\Iron.stats");
VirtualDub.video.SetCurveMcFactor(25);
VirtualDub.video.SetCurveCompression(25,3);
VirtualDub.video.SetCurveFilter(0,2500);
VirtualDub.video.SetCurveCredits(0,350);
VirtualDub.video.SetLumaCorrectionAmp(1,10,30);
VirtualDub.video.SetCurveRedist(1);
// VirtualDub.video.CalcCurveCompression();
VirtualDub.video.SetCompLevelsMain(2,8);
VirtualDub.video.SetCompLevelsA(300,3,16);
VirtualDub.video.SetCompLevelsB(300,4,16);
VirtualDub.video.SetCompLevelsC(300,5,16);
VirtualDub.video.SetCompLevelsD(300,6,16);
VirtualDub.video.SetCompLevelsE(300,7,16);
VirtualDub.video.SetCompLevelK(2,3);
VirtualDub.video.SetBitsReservoir(0,35,30,70,45,0);
VirtualDub.video.SetLowBrCorrection(1,1);
VirtualDub.video.NoAVIOutput(0);
VirtualDub.video.GenStats("",1);
VirtualDub.video.SetEncodingControl("");
VirtualDub.video.filters.Clear();
VirtualDub.video.filters.Add("null transform");
VirtualDub.video.filters.Add("resize");
VirtualDub.video.filters.instance[1].Config(640,360,3);
VirtualDub.video.filters.Add("subtitler");
VirtualDub.video.filters.instance[2].Config(1, "C:/Temp/Iron/Iron1.ssa");
VirtualDub.subset.Delete();
VirtualDub.brc.Set( 0, 700 );
VirtualDub.brc.Set( 1, 1 );
VirtualDub.brc.Set( 2, 128 );
VirtualDub.brc.Set( 3, 0 );
VirtualDub.brc.Set( 4, 0 );

Zarxrax
10th December 2001, 20:15
I've experienced that same problem. The only way I know of to fix it is to lower the anti-shit setting. I wish I knew what caused it, and if there was some way around it other than modifying the anti-shit.

moggis
11th December 2001, 16:09
I tried anti-shit settings of 16/30/50 but I still get keyframes at 31x compression :(

Zarxrax
11th December 2001, 16:55
Yeah you might need to go lower than that. For example on something I'm encoding right now I get 31x keyframes with anti-shit set to 15 or higher. I got to set it down to 14 to get rid of them (and then I see lots of errors in the final video).

LotionBoy
20th December 2001, 22:56
This is really interesting, because I've never had this problem. I usually encode with anitshit 16,1 and with keyframe set to (2,31) and I never get keyframes above 5x. And I don't see anything in your profile that would cause it. I'd say, try the settings above and see if you get the same problem. The only thing I could think that could be causing it, is that the max-Keyframe DRF setting is a hack that is not guarenteed to work right, and that could be causing problems. Maybe encoding with it set to 31 would fix the problem? shrug, worth a shot I guess.

LotionBoy

Zarxrax
21st December 2001, 00:46
Nope I've tried setting the max Keyframe DRF to 31 and it still happens. The way I understand it, is the anti-shit encodes a frame as a 2x keyframe, then looks at it and decides it doesnt look good enough, so reencodes it as a 3x keyframe, and does this over and over till it gets to 31x. This makes sense, because I have looked at the graph while it is encoding before, and when it gets to these parts, it will go REALLY slow. Undercut made a new version of nandub that fixes this problem, I really suggest you try it out :)

LotionBoy
21st December 2001, 18:46
if that is what is happening, it is because your PSNR is set too high. Drop the min quality setting a bit, because you have it set so high and the source is so bad that it cannot match that quality. You might also want to throw some filters on the source to clean it up, because it that is happening, it is kinda noisey.

Haven't seen the Undercut version. Is there a place I can get it?

LotionBoy

FrEEwilL
22nd December 2001, 02:27
Zarxrax, you got the point. i've also experienced this problem
soon after undercut's revised antishit algo was introduced,
and found that looping limit can cause such a case. this is related
to antishit value, not min quality value. if certain (DF) frame got
caught by antishit, nandub tries to raise DRF and if it fails,
it advances to KF loop from 2 to 31. on a very rare case, it still
fails even if it continues to 31. therefore it ended with 31x (or very high DRF) KF. to be safe, it should have been reset to some
reasonable value or its initial DRF when it fails to cure shits
(or need to limit the loop itself in order to prevent it from
going too high).

Zarxrax
22nd December 2001, 03:10
Here, check out this thread:
http://rilanparty.com/vbb/showthread.php?s=&threadid=11146

moggis
29th December 2001, 14:34
Thanks for the link Zarxrax! :)