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. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 | Link |
|
Formerly davidh*****
![]() Join Date: Jan 2004
Posts: 2,820
|
Waveform v2.0.2 - anti-aliasing and support for all colourspaces
![]() Waveform v2.0.2
Waveform is a rewrite of my old Waveform plugin with the following improvements:
Code:
waveform
========
An Avisynth plugin to display audio waveforms on video clips.
Usage
=====
Waveform(
(clip)
(float) window = 0
(float) height = 1/3
(float) zoom = 1
(bool) under = false
(bool) smooth = false
(bool aa = true
)
Parameters:
-----------
window (0):
The number of frames either side to display a waveform for
height (1/3):
>= 1 : height in pixels of waveform overlay
< 1 : total height of waveform display as a fraction of video height (default: 0.333)
zoom (1):
Scale up waveforms
under (false):
Display the waveform underneath the video instead of superimposed on it
smooth (false):
Smooth out waveforms
aa (true);
Anti-aliasing
![]() Last edited by wonkey_monkey; 4th March 2024 at 23:58. Reason: Title version correction |
|
|
|
|
|
#3 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,407
|
Ooh Luvely Jubely, and version on the zip, outstanding.
__________________
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 ??? |
|
|
|
|
|
#5 | Link | |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,407
|
Updated WaveForm_Filmstrip(Bool Under="False") # As Wonkey suggestion,
also removed marks arg as no longer supported in v0.3 x64 or Waveform v2.0. Works now with older version waveform and newer v2.0 Code:
Function WaveForm_FilmStrip(clip c,int "Window",Float "Height",Bool "Under",Float "Zoom",Float "SubSize",Bool "ShowAudio",Int "W",Int "H") {
/* Waveform_FilmStrip:- by StainlessS @ Doom9 ::: https://forum.doom9.org/showthread.php?p=1965005#post1965005
Where ShowAudio=True, Requires WaveForm v2.0 plugin (c) Wonkey_Monkey, https://forum.doom9.org/showthread.php?t=182866
[Wonkey_Monkey, The Prince formerly known as David.]
WARNING - Marks arg no longer a setting in WaveForm v0.3 x64 or v2.0 - so removed from WaveForm_FilmStrip
Also, Made Under default False as Suggested by Wonkey.
WaveForm_FilmStrip(clip c,int "Window"=0,Float "Height"=0.333,Bool "Under"=FALSE,Float "Zoom"=1.0,Float "SubSize"=0.0,Bool "ShowAudio"=True,Int "W"=-1,Int "H"=W_Based)
Window, Default 1 (0 <= Window <=3), Filmstrip thumbnail Images across = 2 * Window + 1.
Height, Default 0.333=1/3 of FilmStrip Height. See Waveform docs for more.
Under, Default False, If True, then audio graph stacked under video, else overlay over video.
Zoom, Default 1.0. Amplify audio signal for viewing (1.0=No Amp).
SubSize, Default 0.0(0.0 <= SubSize <= 1.0). Suggest 0.0(No Frame Number) to about 0.5. : 1.0=biggest size for current clip Height (probably too big).
ShowAudio, Default True. If False, Switches OFF WaveForm Display, Shows FilmStrip Only.
W, Default -1. Governs width of thumbnail images making up the FilmStrip.
-ve) Entire FilmStrip width (multiple thumbnail images based on Window arg) will be about same [smaller or equal] as input clip width.
0) Each FilmStrip thumbnail image is SAME size as input clip, result could be a quite wide clip.
Else) Each FilmStrip thumbnail image Width is set by W (best Mod 2).
H, Default based off W. (Suggest Dont supply H arg, let it default based on W arg. Can call with H=Undefined where will behave as if defaulting).
IF H is Supplied ie not defaulted THEN H = Supplied H # could be -ve, 0, or +ve(explicit height).
else if W <= 0, then H = W, ELSE H = input clip height Aspect Ratio Scaled to match W.
Here, H could be -ve, 0, or +ve, defaulted or non defaulted.
Where H,
-ve) FilmStrip height scaled down to Aspect Ratio match FilmStrip width of individual thumbnail images.
0) Each FilmStrip thumbnail image Height is SAME size as input clip height.
Else) Each FilmStrip thumbnail image Height is set by H (best Mod 2).
*/
Window=Default(Window,0) Height=Max(Default(Height,0.333),0.0) Under=Default(Under,false) SubSize=Default(SubSize,0.0) ShowAudio=Default(ShowAudio,True)
W=Default(W,-1) H=Default(H,W<=0?W:Int(W.Float/c.Width*c.Height)/2*2)
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) WW=(W<0)?c.Width/(Frms*2)*2:(W==0)?c.width:W HH=(H<0)?c.Height/(Frms*2)*2:(H==0)?c.Height:H
sc=(WW!=c.Width||HH!=c.Height) ?c.BiCubicResize(WW,HH,b=-0.5,c=0.25) :c 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 bc=sc.BlankClip(Length=1,Color=$000000)
p1c=bc+sc p2c=bc+p1c p3c=bc+p2c
n1c=sc.FrameCount>1?sc.Trim(1,0)+bc:bc n2c=n1c.FrameCount>1?n1c.Trim(1,0)+bc:bc n3c=n2c.FrameCount>1?n2c.Trim(1,0)+bc:bc
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).DelayAudio(0.0)
return (ShowAudio && HasAudio) ? WaveForm(window=Window,height=Height,under=Under,zoom=Zoom) : Last
}
Code:
#AviSource("D:\G.avi")
Colorbars.Trim(0,-100)
WINDOW = 3 # Frames Wide = 2 * WINDOW + 1
HEIGHT = 0.33 # Audio graphs height, 0.333 = 1/3 of result filmstrip image height.
UNDER = false # 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.5 # Suggest 0.0(off) to about 0.5. (0.0 <= SubSize <= 1.0) : 0.0 = No Frame Number, 1.0=biggest size for current clip Height (probably too big).
SHOWAUDIO = True # Default True. If False, Switches OFF WaveForm Display, Shows FilmStrip Only.
W = 264 # Default -1, (or 0 or +ve). -1 = Normal Downscale behaviour, filmstrip width ~= input clip width.
#H = Undefined # Undefined, Let W govern height of thumbnail images (or just dont use h=H in function call, same as h=Undefined).
###### 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 ######
WaveForm_FilmStrip(window=WINDOW,Height=HEIGHT,under=UNDER,zoom=ZOOM,subSize=SUBSIZE,ShowAudio=SHOWAUDIO,w=W) #,h=H)
Return Last
![]() EDIT: Or with client settings Code:
WINDOW = 1 # Frames Wide = 2 * WINDOW + 1 HEIGHT = 0.33 # Audio graphs height, 0.333 = 1/3 of result filmstrip image height. UNDER = false # True, then audio graphs stacked under video, else overlay over video. ![]() EDIT: This posted elsewhere, repost here Quote:
__________________
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; 31st July 2022 at 15:42. |
|
|
|
|
|
|
#6 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,407
|
Wonkey, can you check out whats happening here, [weird horizontal lines] {ALSO: See above post}
Code:
#AviSource("D:\G.avi")
Colorbars.Trim(0,-100)
WINDOW = 1 # Frames Wide = 2 * WINDOW + 1
HEIGHT = 0.33 # Audio graphs height, 0.333 = 1/3 of result filmstrip image height.
UNDER = false # True, then audio graphs stacked under video, else overlay over video.
ZOOM = 0.7 # Amplify audio signal for viewing (1.0=No Amp).
SUBSIZE = 0.5 # Suggest 0.0(off) to about 0.5. (0.0 <= SubSize <= 1.0) : 0.0 = No Frame Number, 1.0=biggest size for current clip Height (probably too big).
SHOWAUDIO = True # Default True. If False, Switches OFF WaveForm Display, Shows FilmStrip Only.
W = 264 # Default -1, (or 0 or +ve). -1 = Normal Downscale behaviour, filmstrip width ~= input clip width.
#H = Undefined # Undefined, Let W govern height of thumbnail images (or just dont use h=H in function call, same as h=Undefined).
###### Can Remove this lot ######
TONE = true # Replace Colorbars tone with selected TONETYPE tone
TONETYPE ="SINE" # 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 ######
WaveForm_FilmStrip(window=WINDOW,Height=HEIGHT,under=UNDER,zoom=ZOOM,subSize=SUBSIZE,ShowAudio=SHOWAUDIO,w=W) #,h=H)
Return Last
![]() I'de never used v2.0 as Waveform_Filmstrip did not work because of removed Marks arg. [old v0.3 x86 did not produce the lines, I think] EDIT: TONECHANS=4 produces 1 line, 5=2 lines, 6=3 lines. TONECHANS=9 ![]() TONECHANS=9 UNDER=TRUE
__________________
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; 2nd March 2022 at 21:44. |
|
|
|
|
|
#8 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,407
|
Tanks WubbleYou Em,
Seems to have done the trick. EDIT: Perhaps I should add an anti-alias aa arg to WaveForm_FilmStrip(Bool "aa"), and just pass it as named arg to WaveForm(aa=aa), [without any default in WaveForm_FilmStrip(), just use Waveform default]. Anyways, if anybody wants it do as described in this edit.
__________________
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; 2nd March 2022 at 23:19. |
|
|
|
|
|
#9 | Link |
|
Registered User
Join Date: Sep 2008
Posts: 365
|
Is there a download mirror available? http://horman.net/avisynth/download/waveform2.0.1.zip does not work for me, it just times out...
__________________
(i have a tendency to drunk post) |
|
|
|
|
|
#10 | Link |
|
Registered User
Join Date: Jan 2018
Posts: 2,170
|
Work well for me, but here a ggdrive link
https://drive.google.com/file/d/1Rmb...w?usp=drivesdk |
|
|
|
|
|
#11 | Link |
|
.
![]() Join Date: Oct 2001
Location: Germany
Posts: 7,857
|
works here, may be https://easyupload.io/q8g8va works for you,..
(*gig* kedautinh12 was faster) |
|
|
|
|
|
#12 | Link |
|
Registered User
Join Date: Sep 2008
Posts: 365
|
Thanks for sharing kedautinh12 and Selur, I was able to get the plugin now.
Not sure why I get connection timeout against the original link, I didn't do much troubleshooting other than testing 2 different browsers...
__________________
(i have a tendency to drunk post) |
|
|
|
|
|
#16 | Link | |
|
Registered User
Join Date: Oct 2018
Location: Germany
Posts: 1,097
|
Quote:
So forget it for now... Sorry.
__________________
Live and let live |
|
|
|
|
|
|
#17 | Link |
|
Registered User
Join Date: Mar 2011
Posts: 216
|
Nice to see an updated version, I really like audio displayed in waveform.
I was wondering if it would be possible to add something to make it very obvious when an audio channel is silent, like changing the color of the background or the line or something like that. When it's near silent, it can take a bit to see when not zoomed in too much and with hd+ width and it's something I do a lot so would be nice to have a faster way to figure it out.
__________________
AMD Ryzen 9 5950X and EVGA RTX 3080 with G.skill 64Gb 3600 (2 16x2 kit) on Asrock X570 Taichi with Samsung 980 Pro 500Gb NVMe SSD running Win10 x64 on LG 34GN850-B 34.0" 3440 x 1440 160 Hz |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|