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 28th February 2015, 17:16   #21  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,115
Thanks for the quick update, I tried v0.3, it fixes the things I mentioned above but unfortunately with window=50, zoom>=1.30 I get access violations (had not tried this combination before).

Quote:
That histogram example looks nothing like waveform's output
I know, I should of been a little more clear.

Quote:
for speed reasons all waveform does is shift the underlying pixel values one bit to the right.
This must be the color differences I'm seeing. color_yuv=$508080, left is correct, waveform output is not (at least the background). I guess I'll try to compensate for the color shift before waveform.
Reel.Deel is offline   Reply With Quote
Old 2nd March 2015, 08:30   #22  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,413
Quote:
Originally Posted by Reel.Deel View Post
3) Can anything be done to make waveform scroll a bit more smoothly?
You could bump the framerate way up.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order.
foxyshadis is offline   Reply With Quote
Old 18th November 2015, 21:40   #23  |  Link
BlockABoots
Registered User
 
Join Date: Dec 2012
Posts: 163
Is there anyway to adjust the sensitivity of the waveform?, im trying to use this to help me sync up my video game capture. Im using the firing of a gun to sort audio sync issues out, but the only thing is at the moment the waveform is picking up alot of 'background noise' from the game, ideally i would like to lower how much wavform picks up so it only really detects the gun firing and thus make it easier to sync the video up, is this possible?
BlockABoots is offline   Reply With Quote
Old 18th November 2015, 22:04   #24  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,806
Only by filtering the audio before calling waveform, perhaps with SuperEQ.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 18th November 2015, 22:15   #25  |  Link
BlockABoots
Registered User
 
Join Date: Dec 2012
Posts: 163
Quote:
Originally Posted by davidhorman View Post
Only by filtering the audio before calling waveform, perhaps with SuperEQ.
Thats an idea, what freq would i want to select though for cutting out background noise??
BlockABoots is offline   Reply With Quote
Old 18th November 2015, 23:56   #26  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,413
Use a free software called Sonic Visualiser; load a saved capture of the audio and use Layer->Add Spectrogram. This will show you the frequencies you're working with, from there you'll know how to adjust it to isolate one sound, or just visually find it (impulses are usually easy to see).
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order.
foxyshadis is offline   Reply With Quote
Old 2nd January 2016, 15:31   #27  |  Link
`Orum
Registered User
 
Join Date: Sep 2005
Posts: 166
What is this licensed under?

I only ask as I've made some minuscule changes to update this for AviSynth 2.6 / AviSynth+, mainly because I wanted a 64-bit version of it. I've succeeded in doing so, and was going to upload it for others, but I can't legally do so without a license permitting me to do so.

If you (i.e. davidhorman) would prefer a patch and to compile/release your own binaries, that's fine too, it's literally adding 2 lines of code and changing 1 more. I'll post it if you want, and thanks for the great filter!
__________________
My filters: DupStep | PointSize

Last edited by `Orum; 2nd January 2016 at 15:33.
`Orum is offline   Reply With Quote
Old 2nd January 2016, 16:25   #28  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,806
Hi Orum,

Please go ahead and consider waveform to be GPLv2.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 3rd January 2016, 20:12   #29  |  Link
`Orum
Registered User
 
Join Date: Sep 2005
Posts: 166
Thanks. I've uploaded a zip containing the legal info, doc, and x64 and x86 bit builds--though I believe your x86 build works just fine even with AviSynth 2.6 / AviSynth+, I wasn't sure and it was trivial to include. Let me know if you have any issues with what I did and I'll rectify them.

You can download it here.

Please note that you must have the Visual C++ Redistributable for Visual Studio 2015 installed for it to work.
__________________
My filters: DupStep | PointSize
`Orum is offline   Reply With Quote
Old 5th July 2018, 19:47   #30  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,806
For what it's worth, I've added a hastily-complied x64 waveform.dll to the zip file:

http://horman.net/waveform0.3.zip

Edit: ...having completely forgotten that `Orum had already ported it. Oh well!
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 29th September 2018, 17:36   #31  |  Link
xekon
Registered User
 
Join Date: Jul 2011
Posts: 217
Awesome Plugin! Any Hope for a Vapoursynth port?
xekon is offline   Reply With Quote
Old 30th September 2018, 18:43   #32  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,806
Quote:
Originally Posted by xekon View Post
Awesome Plugin! Any Hope for a Vapoursynth port?
I was under the impression that VapourSynth has no audio support (or if it does, it's rudimentary and there is no built-in, standard way to do it).

Either way, the source code is there, but I have no interest in VapourSynth yet so it won't be me making the port.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 22nd January 2019, 17:13   #33  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,030
Wonkey,

Perhaps you would like to improve on this and include in the zip, not much tested.

SEE POST #41 for updated script:

Code:
Colorbars
WINDOW    = 1        # Frames Wide = 2 * WINDOW + 1
HEIGHT    = 0.333    # Audio graphs height, 0.333 = 1/3 of result filmstrip image height.
UNDER     = True     # True, then audio graphs stacked under video, else overlay over video.
ZOOM      = 1.0      # Amplify audio signal for viewing (1.0=No Amp).
SUBSIZE   = 0.2      # Suggest 0.0(off) to about 0.5. (Range:- 0.0 <= SubSize <= 1.0) ::: 0.0 = No Frame Number,  1.0=biggest size for current clip Height (probably too big).
###### Can Remove this lot ######
TONE      = false    # Replace Colorbars tone with selected TONETYPE tone
TONETYPE  ="NOISE"   # Pick from:- "Silence", "Sine", "Noise", "Square", "Triangle" or "Sawtooth"
TONECHANS = 5        # Tone Channels Count (test channels display)
#
(TONE)    ? AudioDub(Tone(Length=FrameCount/FrameRate,Type=TONETYPE,Channels=TONECHANS))  : Last
###### End Of Can Remove   ######

Return WaveForm_FilmStrip(window=WINDOW,Height=HEIGHT,under=UNDER,zoom=ZOOM,subSize=SUBSIZE)

Function WaveForm_FilmStrip(clip c,int "Window",Float "Height",Bool "Under",Float "Zoom",Bool "Marks",Float "SubSize") {
    Window  = Default(Window,0)             Height  = Max(Default(Height,0.333),0.0)
    Under   = Default(Under,True)           SubSize = Default(SubSize,0.0)
    Assert(0 <= window <= 3,"WaveForm_FilmStrip: 0 <= window <= 3")
    Assert(0.0 <= SubSize <= 1.0,"WaveForm_FilmStrip: 0.0 <= SubSize <= 1.0")
    Frms    = 1 + (2*Window)
    sc      = c.BiCubicResize((c.Width+Frms)/(Frms*2)*2,(c.Height+Frms)/(Frms*2)*2,b=-0.5,c=0.25)
    scSubsSz = Round(sc.Height*SubSize)
    SSS="""Subtitle(String(current_frame,"%.0f"),""" + String(scSubsSz,"SIZE=%.0f,") + String((sc.Height-scSubsSz)/2.0,"Y=%.0f") + """,align=8)"""
    sc = (scSubsSz!=0) ? sc.ScriptClip(SSS)  : sc
    p3c   = sc.SelectEvery(1,-3)    p2c   = sc.SelectEvery(1,-2)    p1c   = sc.SelectEvery(1,-1)
    n1c   = sc.SelectEvery(1,1)     n2c   = sc.SelectEvery(1,2)     n3c   = sc.SelectEvery(1,3)
    FilmStrip=Select(Window,sc,StackHorizontal(p1c,sc,n1c),StackHorizontal(p2c,p1c,sc,n1c,n2c),StackHorizontal(p3c,p2c,p1c,sc,n1c,n2c,n3c)).AudioDubEx(c).Trim(0,-c.FrameCount)
    Return FilmStrip.WaveForm(window=Window,height=Height,under=Under,zoom=Zoom,marks=Marks)
}
EDITED:

EDIT: With WINDOW=2 and TONE=True

EDIT: Under=False

WINDOW=3 [filmstrip 7 images wide]


EDIT: Inside Function, round'ed Subtitle Y postion, else cause problems in v2.58(which must be type Int).
__________________
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 ???

Last edited by StainlessS; 27th January 2019 at 15:10. Reason: Update
StainlessS is online now   Reply With Quote
Old 22nd January 2019, 17:30   #34  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,806
Code:
sc    = BiCubicResize(FWid,FHit) #.ShowFrameNumber
First improvement: never use bicubicresize with default parameters! It blurs:

https://forum.doom9.org/showthread.php?t=175681

Granted it's not going to make much difference in this case, but I am morally opposed to bicubicresize for this reason.

I don't think this functionality should be incorporated into waveform. A separate filmstrip plugin would be nice, and has benefits of its own without waveform - then just a shim of an Avisynth function is required to tie them together with the same Window.

Why didn't you use under=true?

Edit: dammit now I'm going to have to write a filmstrip plugin because otherwise I won't stop thinking about writing a filmstrip plugin.
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 22nd January 2019 at 17:35.
wonkey_monkey is offline   Reply With Quote
Old 22nd January 2019, 17:49   #35  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,030
OK, fixed to
Code:
sc    = BiCubicResize(FWid,FHit,b=-0.5,c=0.25) #.ShowFrameNumber
From here:- https://forum.doom9.org/showthread.php?t=174496
Quote:
Bicub_b, BicubicResize() b and c args. (If supplied as args, BEST SUPPLY BOTH Bicub_b and Bicub_c)
Bicub_c Default:-
DownSize b = -0.5, c = 0.25, Groucho2004,Didée:- https://forum.doom9.org/showthread.p...16#post1802716
Upsize, b = 0.0, c = 0.5, Catmull-Rom spline, sharp.
Avisynth BicubicResize() defaults are:- b=1.0/3, c=1.0/3
I meant to just include avs in zip, it does a fair job, mod as you will (change resizer if you will).
EDIT: Script should be sufficient for a filmstrip, dont bother with new plugin, more work for little return.

EDIT:
Quote:
Why didn't you use under=true?
Mod as you will.
__________________
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 ???

Last edited by StainlessS; 22nd January 2019 at 18:02.
StainlessS is online now   Reply With Quote
Old 22nd January 2019, 20:26   #36  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,806
Oh okay, sure, I can include it when I get round to fixing the left/right swap. But I think I may have written a filmstrip plugin by then, because the idea won't go away now...

warp was a diversion from another project. Right now I'm writing another diversion from that project, and now there's another on the list (but I don't blame you). I hate my brain sometimes.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 22nd January 2019, 20:40   #37  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,030
Quote:
because the idea won't go away now...
Thanks muchly, now I know how to screw with your head
__________________
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 online now   Reply With Quote
Old 22nd January 2019, 20:47   #38  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 726
Waveform. And Filmstrip. I like it. We're getting closer to Vegas ;-),
then morph the filmstrip tiny when off center, apple taskbar, drool... ;-)
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're working on that issue. Synce invntoin uf lingöage..."

Last edited by Emulgator; 22nd January 2019 at 20:52.
Emulgator is offline   Reply With Quote
Old 22nd January 2019, 23:35   #39  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,030
Post #33 updated, moved Subtitling into function.

EDIT: Added Height, and Under args.

EDIT: How would Vegas et al, show non existing end frames, where eg WINDOW=1 (3 images wide),
at Filmstrip result frame 0, would image & audio for image representing frame previous to frame 0
be shown same as image for frame 0, or would it be eg BLACK/GREY and with silent audio,
or something else ???

eg this one, what should left image contain ? [current frame is center image 0 with hi-lited audio]


EDIT: Wonkey [NoteToSelf: Must remember to get my vowels right],
I thought there was a problem in WaveForm, as it shows audio for frame prior to frame 0
Code:
#AviSource("D:\G.avi")
Colorbars

Trim(0,-100)                        # Does NOT fix AUDIO [Should trim/pad audio to same length as video]

FIXAUDIO = False                    # On showing Frame 0, IF TRUE, Nullifies audio for frame=-1
(FIXAUDIO) ? ShowFrameNumber : NOP  # If ShowFramenumber, nullifies audio for non existing frame [returns null audio for invalid audio ranges]
WaveForm(Window=1)
FIXAUDIO= TRUE fixes problem and shows null audio at frame -1 [ShowFrameNumber filter fixes caching problem in Colorbars],
not sure if there is a slight problem in AVS/+ due to caching audio for ColorBars
[obviously frame -1 cannot have any audio, (or can it, what about unaligned splice, does audio always start @ 0 ???, or what about DelayAudio(NegativeNumber))].
Using AviSource instead of colorbars produces no audio for frame -1, and so does not need above fix.
Avs valid frame range limiting limits video frames 0 -> Framecount-1, If out of range frame requested, returns frame number nearest to out of range frame.
Audio should be similarly limited, but should return null audio where out of audio sample range [methinks].
Trim should both limit overlength audio and pad underlength audio, I use it all of the time for that purpose.

Not sure if this subject has come up before, think I recall someone asking about which filters can actually force a proper audio trim() [as in ShowFrameNumber above], but with least overhead and effect.
[bit daft having to have a filter that behaves exactly like trim should do, perhaps we need a Trim(Bool DontReallyTrimAudio) arg, and make default to DontReallyTrimAudio=False ]

FIXAUDIO=False [Frame = -1 has audio]

FIXAUDIO=True [Frame = -1 has null (silent) audio]
__________________
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 ???

Last edited by StainlessS; 23rd January 2019 at 15:23.
StainlessS is online now   Reply With Quote
Old 26th January 2019, 21:11   #40  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,030
EDIT: Wonkey, x64 dll (v0.3 zip) seems not to have the Marks arg, perhaps an older version dll.
Update on WaveForm_FilmStrip(),
Frames prior to frame 0, and after FrameCount-1, shown as black, and without frame numbering.
Colorbars AUDIO prior to frame 0, and after FrameCount-1, now shows as silent, was driivng me nuts that Trim was not trimming audio [or rather that it was not making invalid audio silent].
[DelayAudio(0.0) does a proper trim on the audio, thank goodness].
EDIT: Added ShowAudio arg.

EDIT: SCRIPT_REMOVED: See post 41

Showing @ frame 0 where Window=2.
__________________
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 ???

Last edited by StainlessS; 27th January 2019 at 13:23.
StainlessS is online now   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 02:36.


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