Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th October 2007, 21:11   #21  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,268
Quote:
Originally Posted by blausand View Post
at least [me] thought, the If you look at my second ScreenShot, you'll see a proof of inconsistency, though.
What your screenshot shows is the correct behavior. src2 is not modified, so when you do:
Code:
subtitle(src2.framecount))
you're showing the original framecount.

"info" shows your intended framecount because when you run a filter on a function (in this case, "src2.LengthenClip(1200)"), it returns a brand new clip and leaves the source clip unchanged. Remember, AviSynth is a functional-like language. Do not try to use imperative programming idioms where you try to set state.

If you were to do:
Code:
src2 = src2.LengthenClip(1200).info
src2.subtitle(string(src2.framecount))
you'd see the counts match.
stickboy is offline   Reply With Quote
Old 11th October 2007, 23:23   #22  |  Link
blausand
Registered User
 
blausand's Avatar
 
Join Date: Mar 2007
Posts: 15
Maybe it's time to move over...

Thanks, foxyshadis, for bringing some light into Avisynths behaviour here. I admit: I'm a bit of a noob to it.
Still i think, that this structure:
Code:
PutResultHere = BlankClip().DoSomethingToIt.AndThis.AndLenghenClip()
should work all through the chain before returning the result to PutResultHere. If it doesn't, however, this is a major difference in notation modes, right?

I'm moving over to a new thread now, stickboy shall not longer be bothered anylonger with my basic questions. Have a nice day!
blausand is offline   Reply With Quote
Old 12th October 2007, 03:25   #23  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,268
Quote:
Originally Posted by blausand View Post
Thanks, foxyshadis, for bringing some light into Avisynths behaviour here. I admit: I'm a bit of a noob to it.
Still i think, that this structure:
Code:
PutResultHere = BlankClip().DoSomethingToIt.AndThis.AndLenghenClip()
should work all through the chain before returning the result to PutResultHere.
It does work through the chain before assigning to PutResultHere. No clips are modified, however. Filters don't directly modify clips; they return new ones.
Quote:
If it doesn't, however, this is a major difference in notation modes, right?
There is no difference.
Code:
PutResultHere = BlankClip().DoSomethingToIt().AndThis().AndLengthenClip()
is the same as:
Code:
PutResultHere = AndLengthenClip(AndThis(DoSomethingToIt(BlankClip())))
and is the same as:
Code:
BlankClip()
DoSomethingToIt()
AndThis()
AndLengthenClip()
PutResultHere = last
stickboy is offline   Reply With Quote
Old 27th September 2008, 05:50   #24  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
stickboy, I've done some basic toying around with RemapFrames after I had a brainstorm over here
http://forum.doom9.org/showthread.ph...74#post1188174

The main problem I see with building a NLE on top of AviSynth is the Splicing. I think RemapFrames can fix the trim headache one would encounter when trying to do a multi track NLE. In essence it makes the trims independent of each other.

Code:
Base = ColorBars().BlankClip().ShowFrameNumber(x=10,y=30).ConvertToRGB32()
ClipA = ColorBars().BlankClip(pixel_type="YUY2").ColorYUV(showyuv=true).BilinearResize(640,480).ShowFrameNumber(x=10,y=30).ConvertToRGB32()
ClipB = ColorBars().invert().FlipVertical().Trim(0,999).ShowFrameNumber(x=10,y=30).ConvertToRGB32()

Base = RemapFrames(Base,sourceClip=ClipA,mappings="[20 50] [0 30]")
Base = RemapFrames(Base,sourceClip=ClipB,mappings="[100 150] [0 50]")
Base
Issues I see right now is selective filtering, transitions, audio, and error checking. What are your thoughts?
mikeytown2 is offline   Reply With Quote
Old 27th September 2008, 10:01   #25  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,268
I think selective filtering would be better off done with Trim or ApplyRange (or with ReplaceFrames/RemapFrames).

I agree that transitions and audio would be necessary for what you want, but:
1. Transitions are way outside the scope of RemapFrames. I have no idea how that'd even work.
2. Dealing with audio is more realistic, but it's also hard (which is why I haven't done it).

I think if you want to make a graphical NLE based around AviSynth, it'd probably be better just to stick with Trim and Splice. Independent Trims shouldn't be hard; you just need to make sure you only call Trim() on the source clips instead of chaining them.

Splice would need to be improved so that you can do:

Splice(a, b, c, d) without it internally creating a Splice(a, Splice(b, Splice(c, d))) chain (or maybe it's left-folding; I don't remember offhand).
stickboy is offline   Reply With Quote
Old 29th September 2008, 14:31   #26  |  Link
blausand
Registered User
 
blausand's Avatar
 
Join Date: Mar 2007
Posts: 15
I'm glad to see that there's life in the development of AviSynth! Recently, i've come to use Avisynth for what it's name suggests ever since: The synthesis of video, in an artsy context. (see Flash-Clips on silvertree.de !)
I wonder if there is a possibility to write frames of a lower resolved clip into higher resolved clips DIRECTLY as D3D-rectangles ,
instead of instantiating an auxiliary clip by adding borders to the small one to make it match the size of the big one and then layeroing the two? So for extensive scripting synthesis, this is a question of ioptimized code... Any ideas?
greetings from cologne, germany.
blausand
blausand is offline   Reply With Quote
Old 29th September 2008, 15:00   #27  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,405
Quote:
Originally Posted by blausand View Post
I wonder if there is a possibility to write frames of a lower resolved clip into higher resolved clips DIRECTLY as D3D-rectangles ,
instead of instantiating an auxiliary clip by adding borders to the small one to make it match the size of the big one and then layeroing the two? So for extensive scripting synthesis, this is a question of ioptimized code... Any ideas?
You can do this with StackHorizontal/StackVertical to construct the larger clip in sections. If doing it in a generic way you just have to be careful about the special cases (when the smaller clip lies along one or more edges of the larger).
Gavino is offline   Reply With Quote
Old 22nd September 2013, 19:28   #28  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 617
I updated RemapFrames: RemapFrames 0.4.1

Added remf, remfs, rfs, rfs_merge and rfs_transform:
  • remf, remfs and rfs are shortcuts for RemapFrames, RemapFramesSimple and ReplaceFramesSimple with slight differences. The mappings parameter comes before filename for a more compact "inline" call. These parameters are completely optional; when none of them is specified, an empty string is assumed. And when an empty string is detected, the filter is completely bypassed (no extra memory use). Also, these versions don't check aggressively the frame ranges. If a referenced frame doesn't exist, it's simply ignored or its index is replaced with the closest valid frame index. This allows working on partial ranges of a clip with a unique set of mappings.
  • rfs_transform is a helper function transforming a set of mappings for ReplaceFramesSimple using an arithmetic operation. This is useful when one needs to substitute frames after a framerate change or any kind of timeline manipulation.
  • rfs_merge is a helper function merging several mappings for ReplaceFramesSimple together. It just concatenates these strings and inserts spaces in between, but it is probably more convenient than a simple concatenation because it handles properly the undefined strings. If all strings are undefined, the result is also an undefined string.
__________________
dither 1.27.2 for AviSynth | avstp 1.0.3 for AviSynth development | fmtconv r22 for Vapoursynth | trimx264opt segmented encoding

Last edited by cretindesalpes; 16th January 2014 at 23:35. Reason: Small update : 0.4.1
cretindesalpes is offline   Reply With Quote
Old 15th February 2019, 03:44   #29  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 751
These filters look interesting but proper documentation is necessary if we're to avoid accidentally erasing our hard drives or nuking Russia or something equally disastrous.
__________________
If I ask "How do I do X?" or "what happens if I do X?", and X is a very bad thing that no one would ever normally do, assume that I already know this, and that I have Katie reasons for asking anyway.
Katie Boundary is offline   Reply With Quote
Old 15th February 2019, 07:36   #30  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,356
At least some have their own pages on the AviSynth wiki with pretty good explanations and examples for their use. For example, here's the page for RemapFrames:

http://avisynth.nl/index.php/RemapFrames

Which were you thinking of trying out? I've only used a few but use ReplaceFramesSimple about every day of my life.
manono is offline   Reply With Quote
Old 15th February 2019, 17:37   #31  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 751
Quote:
Originally Posted by manono View Post
Which were you thinking of trying out? I've only used a few but use ReplaceFramesSimple about every day of my life.
ApplyEvery/DeleteEvery
__________________
If I ask "How do I do X?" or "what happens if I do X?", and X is a very bad thing that no one would ever normally do, assume that I already know this, and that I have Katie reasons for asking anyway.
Katie Boundary is offline   Reply With Quote
Old 15th February 2019, 17:47   #32  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,333
The original version has html documentation, usage examples
(v0.3.1)

http://www.avisynth.nl/users/stickboy/ApplyEvery.zip
poisondeathray is offline   Reply With Quote
Old 15th February 2019, 19:05   #33  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,033
I added 32/64 bit builds of ApplyEvery with updated AVS2.6 headers to my collection.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 28th April 2020, 17:18   #34  |  Link
Floatingshed
Registered User
 
Join Date: Nov 2008
Posts: 311
Can anyone help with a link to RemapFrames 64 bit please? The wiki link is dead.
Thanks.
Floatingshed is offline   Reply With Quote
Old 28th April 2020, 17:36   #35  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,425
Remapframes x86 and x64, just above your post in Groucho's Avisynth Stuff.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 28th April 2020, 18:14   #36  |  Link
Floatingshed
Registered User
 
Join Date: Nov 2008
Posts: 311
Great, thanks very much.
Floatingshed is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:54.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.