View Single Post
Old 22nd January 2019, 18:13   #33  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
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 16:10. Reason: Update
StainlessS is offline   Reply With Quote