Log in

View Full Version : filesize prediction after decimate


wim
15th December 2003, 17:50
how do i help gknot get the filesize right when i have added something like a Decimate or SelectEven() in the avs? i have seen the ivtc correct framerate checkbox work and get the filesize when dropping 5 frames back to 4, but what about a more general case? i am encoding a movie which is really 12 fps with duplicates every second frame, i figure it is a waste of space to encode every frame twice, better to do the avi at 12 fps (?). but when i drop every second frame, the filesize goes crazy (it doubled last time)

i have searched the forum for decimate/filesize but didn't find an answer...i had also came across this once before when dropping 25 frames back to 24.

wim
26th April 2004, 09:27
anyone?

manono
26th April 2004, 11:12
Hi-

After you've edited the .avs to make it 12fps (or 25->24fps), save it, and then open that in GKnot, instead of the original .d2v. The bitrate will then adjust itself for the new framerate.

I haven't done anything exactly like your two examples, but I've done silent films at every framerate between 15 and 26fps, and my suggestion works for them.

Sorry, but I must have missed your original post of 4 months ago.

wim
20th May 2004, 03:10
hi manono, i couldn't get this working yet. here's what i tried..
i have a dec.avs containing:

LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec3.dll")
mpeg2source("C:\waking life (100m)\movie 16-9\film.d2v")
SelectEven()

this gets the frames i want, the d2v was force-filmed which worked beautifully but there are dupes every second frame (and for some reason the Even() frames appeared to be slightly cleaner than the Odd() frames)

then i have a film.avs containing:

LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec3.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\undot.dll")
avisource("C:\waking life (100m)\movie 16-9\dec.avs")
crop(4,8,712,460)
BicubicResize(576,304,0.333,0.333)
Undot()

the first frameserve works but the second one doesn't, it is just
100 minutes of green screen.

stupidly, i did the encode before checking the framserver was working and the output 1:40:06 long avi file was only 6 meg, but it still took 5 hours to encode :rolleyes:

jggimi
20th May 2004, 08:11
Nested .avs files doesn't currently work with YV12 colorspace. Add a "Converttoyuy2()" to the first script, and that should get rid of your green screen phenomenon.

manono
20th May 2004, 09:01
Hi-

Sorry, my fault. I didn't mean for you to encode from the second one, but just to use it to get the bitrate. Encode from your first .avs (after also including the crop, resize, and Undot). Or try jggimi's suggestion.

You sure take a long time before following up on your posts. :)

wim
22nd May 2004, 11:06
hi

thanks for the advice, i just lumped all in one avs and used the "add job" button on the encoder tab in gknot. that kind of worked (filesize was still a couple meg over, but much closer than i was getting before)

the colourspace trick worked aswell with the nested frameserver...i didn't try to encode with changed colourspace because i read it is slooow, but one question for future reference if i ever need to nest avs again, is there any quality hit in jumping between colourspaces or is it only a speed loss?

manono
22nd May 2004, 11:52
Hi-

There's a theoretical quality loss when converting colorspaces. Question 7 from the YV12 FAQ (http://forum.doom9.org/showthread.php?s=&threadid=37276) says:

- no color conversions:
The colour information doesn't get interpolated (so often) and thus stays more realistic.

But having said that, the difference must be small, because I can't see it.

There could be several reasons why you came out oversized I suppose, but the one that springs to mind is the overhead. In addition to filling in the audio size, in the Interleaving & AVI-Overhead box, did you make sure to tick the correct line?

stephanV
22nd May 2004, 12:18
Originally posted by manono
Hi-

There's a theoretical quality loss when converting colorspaces. Question 7 from the YV12 FAQ (http://forum.doom9.org/showthread.php?s=&threadid=37276) says:

- no color conversions:
The colour information doesn't get interpolated (so often) and thus stays more realistic.

But having said that, the difference must be small, because I can't see it.


you can make colorspace conversion visible though :)
try this avisynth script:


a = $000000 #background color
b = $ff0000 #text color
c = 16 #fontsize
d = "Colorspace conversions are not lossless ;-)" #text

clip = blankclip (color=a)
subtitle(clip,d,-1,-1,0,framecount(clip)-1,"arial",c,b,a)


then add e.g. 'converttoyv12' and check again. you'll see the text is a little bit smeared out now.
you can toy with the values for a, b, c and d for different colors and text (it is less visible with larger font size)

wim
23rd May 2004, 08:14
Originally posted by manono
There could be several reasons why you came out oversized I suppose, but the one that springs to mind is the overhead. In addition to filling in the audio size, in the Interleaving & AVI-Overhead box, did you make sure to tick the correct line?

of course i counted overhead.. i'm n00b but not that n00b. :)
the couple of meg doesn't matter, i 'overburned' cd in nero and i'm finished with this rip now. after several months on the hd!
why it take so long, i'm a perfectionist abt quality, i had procrastinated this one for a long time and it's just being finished now because i started to run out of hd space hehe. my replies are slow because i don't have so much time for divx this year, 5th year of my degrees so i've got to work a lot on my thesis..

thanks for your help manono