digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Automated file prediction? (http://www.digitalfaq.com/archives/avisynth/2606-automated-file-prediction.html)

Fiz 02-18-2003 05:43 AM

Thanks Ren for trying this, :D it took me hours to try and get a working formula and even then I was confused :? . You are right, the number of frames per sample WILL be different. Its the only way I can get almost exactly 10% of the number of frames sampler would produce.

For example, Sampler(length=24) produces 2280 frames (perfectly divisible by 24) for my sample. I want to get as close to 228 frames. To do that I tried this first.

Code:

oldfps = framerate
AssumeFps(oldfps * 10)
Sampler(length=24)
AssumeFps(oldfps)

This was based on my theory from this thread:
http://www.kvcd.net/forum/viewtopic.php?t=2820

where doubling the frame rate will halve the number of total frames in Sampler. Therefore multiplying by 10 will give only 10%!!

What I found was that because the length was 24, the closest number of frames I was getting was 240 instead of 228 (because it is a multiple of 24).

Quote:

Originally Posted by ren
Also I don't think the sample length changed from 24 because I put the line ShowFrameNumber and the frame numbers were like this (0..23), (15465..15488), (30930..30953)...

Thats why I was trying the strange formula so that the length is slightly adjusted and so is the framerate. The fps are not just exactly 10 times faster, but something that will allow me to get as close to 228 as possible. That is why the length changes as well.

If I haven't lost you so far... 8O As with everything, the bigger the sample the more accurate your analysis. That's why I think it's a difficult trade off. It may work well in fewer cases than when using just Sampler, in which case lengthy encodes could have been prevented!

Quote:

Originally Posted by ren
edit: oops I just read that you said once sampler is run than the fps returns to normal this is too complicated for me

When I bump the fps up, I run sampler and then set the fps back to what it was. e.g.

oldfps = framerate # my case 25
AssumeFps(oldfps * 10) # 250 fps now!
Sampler(length=24) # Sampler makes movie 10 times shorter!
AssumeFps(oldfps * 10) # back to 25 fps now!


Let me know the results and maybe others can test this as well. (I'm at work and can't do any encodes today :cry: )


All times are GMT -5. The time now is 06:43 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.