This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Avisynth srestore & filter order
#37
(23.01.2021, 09:12)Selur Wrote:
Quote:Another question I have is how to implement, let's say, SelectEvery(3,1,2,2,3) in Hybrid?
...
works perfectly as standalone part of avs script
That call does not make any sense, no clue what you intended this to do.
"SelectEvery(3,1,2,2,3)"
with http://avisynth.nl/index.php/Select
would be translated into:
1. chunk the source into parts consisting of 3 frames
In that group of 3 frames
2. throw away the first frame (frame 0)
3. keep the second frame (frame 1)
4. repeat the third frame (frame 2)
5. use the forth frame,... <- this can't work since the chunk size is 3, which is why Hybrid will not calculate a new frame count/rate for such settings.

You can see the script Hybrid generates in the Avisynth Script View.

Here's an example of how SelectEvery works:
-------------------------------------------------------
SelectEvery->Cycle to "3"
and SelectEvery->Offsets to "0 0 2 2"
would generate: 'SelectEvery(3,0,0,2,2)' inside the script.
This would:
1. chunk the source into parts consisting of 3 frames
In that group of 3 frames
2. repeat the first frame (frame 0)
3. throw away the second frame (frame 1)
4. repeat the third frame (frame 2)

so with a clip of 12 frames: f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 and a frame rate of 24fps
the following would happen:
1. chunking
f0 f1 f2  f3 f4 f5  f6 f7f 8  f9 f10 f11
2. applying the offsets
f0 f0 f2 f2 f3 f3 f5 f5 f6 f6 f8 f8 f9 f9 f11 f11
the frame count changed from 12 to 16 ( = 12*4/3) and the frame rate changed from 24 to 32 (= 24 * 4/3) fps.

Here's an example how SelectRangeEvery works:
-----------------------------------------------------
Using:
SelectRangeEvery->Every 4
SelectRangeEvery->Length 3
SelectRangeEvery->Offset 0
and a clip of 12 frames: f0 f1 f2 f3 f4 f5 f6 f7f 8 f9 f10 f11 and a frame rate of 24fps
This would generate 'SelectRangeEvery(every=4,length=3,offset=0)' inside the Avisynth script.
Which would tell Avisynth to:
1. chunk the clip int parts of size four ( f0 f1 f2 f3  f4 f5 f6 f7f  8f 9f 10f 11f)
2. in each of those chunks only keep the first 3 frames
f0 f1 f3 f4 f5 f6 8f 9f 10f
so frame count changed from 12 to 9 (=12*3/4) frames and frame rate changed from 24 to 18 (= 24 * 3 /4) fps.
With a clip of 5000 frames you would get 18fps and 3750 (=5000*3/4) frames.

When using:
SelectRangeEvery->Every 4
SelectRangeEvery->Length 2
SelectRangeEvery->Offset 2
and a clip of 12 frames: f0 f1 f2 f3 f4 f5 f6 f7f 8 f9 f10 f11 and a frame rate of 24fps
This would generate 'SelectRangeEvery(every=4,length=3,offset=4)' inside the Avisynth script.
1. chunk the clip int parts of size four ( f0 f1 f2 f3  f4 f5 f6 f7f  8f 9f 10f 11f)
2. throw away the first two (= Offset) frames of each chunk ( f2 f3  f6 f7f  10f 11f)
3. keep the next 2 (= Length) frames
so the frame count would change from 12 to 6 (=12 * 2 / 4) frames and frame rate changed from 24fps to 12  (12 * 2 / 4) fps.
With a clip of 5000 frames you would get 12fps and 2500 (=5000*2/4) frames.

Quote:Whatever I've tried, including "Custom" - doesn't work (works perfectly as standalone part of avs script).
Seeing your example 'SelectEvery(3,1,2,2,3)' I doubt that:
a. you tested with a working SelectEvery-call
b. you made sure to tell Hybrid how the custom section changed the frame rate and frame count.

Cu Selur
You right, I messed up.
The proper value should be SelectEvery(4,1,2,3,3) and it perfectly works in Hybrid with SelectEvery->Cycle to "4" and SelectEvery->Offsets to "1 2 3 3"
This is the result of my "fulling around" https://drive.google.com/file/d/1l95mBsN...sp=sharing of the original https://drive.google.com/file/d/16xWG09P...sp=sharing (download and play from HD other then use browser player)
Reply


Messages In This Thread
Avisynth srestore & filter order - by serg - 19.01.2021, 18:32
RE: Avisynth srestore & filter order - by serg - 23.01.2021, 21:29

Forum Jump:


Users browsing this thread: 4 Guest(s)