View Full Version : Trim and video separators
devhercule
11th July 2014, 15:41
Hi everyone, it is my first post here.
I have to concatenate a set of segments from a video and visualize them. for example, a video having 2000 frames (0..1999).
i want to visualize only 3 segments from this video. I use Trim to do this, the code is below:
A = FFAudioSource("video.mp4")
V = FFVideoSource("video.mp4")
AudioDub(V, A)
ShowFrameNumber(scroll=true,x=30,y=30)
ShowTime(x=80,y=50)
Trim(150,350)++Trim(900,1200)++Trim(1350,1700)
How can i insert a separator frame or a separator video before each segment, containing an information about the position of this segment in the whole video?
i need to draw a visual information and not an information to read. a progress bar for example or a progress sector.
thank you
raffriff42
11th July 2014, 19:10
i need to draw a visual information and not an information to read. a progress bar for example or a progress sector.
This (http://forum.doom9.org/showthread.php?p=1626756#post1626756) might do:
https://www.dropbox.com/s/tjattns0iyu8gq4/fingerprint_p25_PGSWL.jpg?raw=1
This script (http://forum.doom9.org/showthread.php?p=1626756#post1626756) creates a timeline with a kind of video & audio "fingerprint" in the lower margin that slowly builds from left to right as the video plays. You should be able to cut segments as needed.
You could simply cut your scenes together with the "fingerprint" always visible, separating them with plain black segments, or use the fingerprints alone somehow in your separator clips.
EDIT
An alternative would be to animate a box of some kind to emulate a progress bar - look into ZoomBox (http://forum.doom9.org/showthread.php?p=1111789#post1111789).
devhercule
13th July 2014, 17:20
Hi raffriff42,
Thank you for your reply. I'm really beginner with avisynth. I red the post you have mentionned. it is very interesting. But what i need to do is more simple.
I want to visualize a progress bar indicating the position of the current segment in the video.
I didn't know how to use fingerprint to do this :(
Thanks
raffriff42
13th July 2014, 19:59
A = FFAudioSource("video.mp4")
V = FFVideoSource("video.mp4")
AudioDub(V, A)
ShowFrameNumber(scroll=true,x=30,y=30)
ShowTime(x=80,y=50)
C=Last
Animate(C, 1, C.FrameCount, "simple_bar",
\ 1.0, Float(C.Width-32))
Trim(150,350)++Trim(900,1200)++Trim(1350,1700)
return Last
##################################
function simple_bar(clip C, float "width")
{
return C.draw_bar(Round(width), 16, 16, C.Height-32, $ffd455, 1.0)
}
##################################
### Add translucent colored bar
### requires Avisynth 2.60
##
function draw_bar(clip C,
\ int "wid", int "hgt",
\ int "x", int "y", int "color", float "opacity")
{
wid = Max(0, Default(wid, C.Width))
hgt = Max(0, Default(hgt, C.Height))
x = Default(x, 0)
y = Default(y, 0)
color = Default(color, $ffffff)
opacity = Float(Default(opacity, 1))
box = BlankClip(C.ConvertToYV24(),
\ color=$ffffff,
\ width=wid,
\ height=hgt)
mask = BlankClip(C, color=$0)
\ .Overlay(box, x=x, y=y)
\ .ConvertToY8()
\ .ColorYUV(levels="TV->PC")
return C.Overlay(BlankClip(C, color=color),
\ mask=mask, opacity=opacity)
}
devhercule
13th July 2014, 20:16
I tried to understand your code and to execute it. an error message is displayed : "I don't know what C means"
i created a file .avs and i opened it using virtualDub.
it hangs at the animate function call. can you fix it?
raffriff42
13th July 2014, 20:21
Sorry devhercule, it should be fixed now.
devhercule
13th July 2014, 20:30
Thank you very much raffriff42 for your quick reply
a new error appears :(
"There is no function named ConvertToYV24"
Is there a library to include?
raffriff42
13th July 2014, 20:38
Avisynth Version 2.6 is required for that function. You can use ConvertToRGB24 instead, if you don't want to upgrade.
devhercule
13th July 2014, 21:02
I had the same problem with "ConvertToY8" so i upgrated with avisynth2.6 and it's ok. The script works perfectly :)
I'm really thankful for you raffriff42, it was very helpful for me :) thank you (Y)
devhercule
14th July 2014, 13:24
Hello,
I would like to add some improvements on the display.
Is it possible to insert a transition between two segments. to avoid the sudden change from a segment to another? like a slowly merge for example.
And during the transition, the progress bar move and progress quickly from segment i position to segment i+1 position.
I wonder if it is possible to do this
Thank you
raffriff42
14th July 2014, 14:48
If I can simplify your specification a bit, this might do: Trim(150,350+30).Dissolve(Trim(900,1200+30), 30).Dissolve(Trim(1350,1700), 30)
devhercule
15th July 2014, 11:14
Yes
the video is now more pleasant to watch :)
thank you
devhercule
15th July 2014, 11:53
two last questions:
1) can i make a border for the whole progress bar?
2)can i insert a percentage of the yellow progress in the whole progress bar?
StainlessS
15th July 2014, 13:07
Here something to entertain you until RaffRiff42 comes out to play (I'm sure he will want to change a little).
##################################
function simple_bar(clip C, float "width",Int "border",int "BordCol")
{
return C.draw_bar(Round(width), 16, 16, C.Height-32, $ffd455, 1.0,border,BordCol)
}
##################################
### Add translucent colored bar
### requires Avisynth 2.60
##
function draw_bar(clip C,
\ int "wid", int "hgt",
\ int "x", int "y", int "color", float "opacity",Int "border",int "BordCol")
{
wid = Max(0, Default(wid, C.Width))
hgt = Max(0, Default(hgt, C.Height))
x = Default(x, 0)
y = Default(y, 0)
color = Default(color, $ffffff)
opacity = Float(Default(opacity, 1))
border=Default(border,2)
bordcol=Default(bordcol,BitXor(color,$FFFFFF))
box = BlankClip(C.ConvertToYV24(),
\ color=color,
\ width=wid,
\ height=hgt)
box=(wid>border*2) ? box.LetterBox(border,border,border,border,bordcol) : box
C2 = C.Overlay(box,x=x,y=y,opacity=opacity)
C2 = C2.Subtitle(String(Round(wid/(C.width-64.0*2)*100))+"%",x=x+wid+4,y=y-2)
return C2
}
avisource("D:\avs\test.avi")
ShowFrameNumber(scroll=true,x=30,y=30)
ShowTime(x=80,y=50)
C=Last
Animate(C, 1, C.FrameCount, "simple_bar",
\ 1.0, Float(C.Width-64))
#Trim(150,350)++Trim(900,1200)++Trim(1350,1700)
return Last
devhercule
15th July 2014, 13:24
Hi StainlessS,
I tested your code and i have a small modification. the expected border is a static border that represent 100% of the video (100% of the whole progress bar and not only the white part). it was to have an idea of the whole video. is this possible to do
Thank you :)
StainlessS
15th July 2014, 13:42
Oh, I see what you mean now.
I'm sure RaffRiff42 will be along shortly, he'll maybe want to put back the mask stuff that I ripped out to make it easier/quicker, as I dont have too much time.
Also, I'm guessing he'll want to redfine the functions, adding additional requirements after complete, results in hacks to get something to work.
Have to leave now, good luck.
devhercule
15th July 2014, 13:45
Ok thanks :)
raffriff42
15th July 2014, 13:52
Here you go :) (EDIT the result is pretty much the same as StainlessS's. I like his moving % readout)
https://www.dropbox.com/s/sgaal9rubr9xvkk/drawbar2_PGSWL.jpg?raw=1A = FFAudioSource("video.mp4")
V = FFVideoSource("video.mp4")
AudioDub(V, A)
ShowFrameNumber(scroll=true,x=30,y=30)
ShowTime(x=80,y=50)
C ##Last=C
ShowFrameNumber(scroll=true,x=30,y=30)
ShowTime(x=80,y=50)
C=Last
Animate(C, 1, C.FrameCount, "simple_bar",
\ 1.0, C.Width-32)
ScriptClip(Last, """
Subtitle(StrinF(100.0*current_frame/framecount)+"%",
\ x=32, y=Height-32, size=14, text_color=$0, halo_color=$ff000000)
""")
Trim(150,350+30).Dissolve(Trim(900,1200+30), 30).Dissolve(Trim(1350,1700), 30)
return Last
##################################
function simple_bar(clip C, float "width")
{
return C.draw_bar(
\ x=16, y=C.Height-32,
\ wid=Round(width), hgt=16,
\ color=$ffff00, opacity=1,
\ border=2, border_color=$0,
\ border_opacity=1)
}
##################################
### overlay translucent colored box with border
##
## requires Avisynth 2.6
## version 2
##
function draw_bar(clip C,
\ int "x", int "y", int "wid", int "hgt", int "color", float "opacity",
\ int "border", int "border_color", float "border_opacity")
{
wid = Max(0, Default(wid, C.Width))
hgt = Max(0, Default(hgt, C.Height))
x = Default(x, 0)
y = Default(y, 0)
color = Default(color, $ffffff)
border = Default(border, 1)
border_color = Default(border_color, $0)
opacity = Float(Default(opacity, 1))
border_opacity = Float(Default(border_opacity, 1))
box = BlankClip(C, pixel_type="YV24",
\ width=wid, height=hgt, color=color)
bdr = BlankClip(C, pixel_type="YV24",
\ width=wid+2*border, height=hgt+2*border, color=border_color)
return C.Overlay(bdr, x=x-border, y=y-border, opacity=border_opacity)
\ .Overlay(box, x=x, y=y, opacity=opacity)
}
#######################################
## format a Float as a String with (by default) 2 decimals
function StrinF(float f, int "decimals")
{
decimals = Min(Max(0, Default(decimals, 2)), 8)
return String(f, "%0."+String(decimals)+"f")
}
devhercule
15th July 2014, 14:03
Thank you raffriff42
i want to draw a static border that dont depend of the progress of the video. its a fixed border that represent the 100% of the video. inside this border, the progress move.
is that possible?
raffriff42
15th July 2014, 14:11
...
ShowTime(x=80,y=50)
draw_bar(
\ x=14, y=C.Height-34,
\ wid=Width-28, hgt=20,
\ color=$0, opacity=1)
C=Last
...
devhercule
15th July 2014, 14:21
thank you very much raffriff42
StainlessS
15th July 2014, 14:46
An alternative (as I've already done it now), still unfinished but works.
avisource("D:\avs\test.avi")
ShowFrameNumber(scroll=true,x=30,y=30)
ShowTime(x=80,y=50)
C=Last
Animate(C, 0, C.FrameCount-1, "simple_bar",
\ 0.0, 1.0)
#Trim(150,350)++Trim(900,1200)++Trim(1350,1700)
return Last
##################################
function simple_bar(clip C, float "perc",Int "border",int "BordCol")
{
return C.draw_bar(perc, 16, 42, C.Height-32, $ffd455, 1.0,border,BordCol)
}
##################################
### Add translucent colored bar
### requires Avisynth 2.60
##
function draw_bar(clip C,
\ float "perc", int "hgt",
\ int "x", int "y", int "color", float "opacity",Int "border",int "BordCol")
{
perc = Max(0.0, Default(perc, 1.0))
hgt = Max(0, Default(hgt, 16))
x = Default(x, 0)
y = Default(y, 0)
color = Default(color, $ffffff)
opacity = Float(Default(opacity, 1))
border=Default(border,2)
bordcol=Default(bordcol,BitXor(color,$FFFFFF))
wid=Round((C.Width-2*x-border) * perc)
bg=BlankClip(C.ConvertToYV24(),color=bordcol,width=C.Width-2*x,height=hgt)
bg=(wid>border*2) ? bg.Overlay(BlankClip(C.ConvertToYV24(),color=color,width=wid,height=hgt-border*2),x=border,y=border) : bg
C2 = C.Overlay(bg,x=x,y=y,opacity=opacity)
C2 = C2.Subtitle(String(Round(perc*100))+"%",x=C.Width-x+2,y=y-2)
return C2
}
Really got to dash now.
devhercule
15th July 2014, 15:30
yes it is very a good solution, its works and it satisfy what i need. but it will be greater if i can draw just a blue border empty. which will be empty inside to be able to see the original video frame behind.
Anyway, it is good solutions what you posted raffriff42 and StainlessS. thank you :)
StainlessS
15th July 2014, 16:40
Such a task master but nothing wrong with knowing what you want.
I guess rr42 will want to bring back the masking stuff, and might be good to wrap up in a single function with a nested function to do the non animate scripting.
(Currently mobile)
devhercule
15th July 2014, 17:31
ok :)
raffriff42
15th July 2014, 18:15
Maybe you should study our scripts and figure out what we did, and how we did it. Read the documentation (http://avisynth.nl/index.php/Main_Page) regarding the functions we called. Change things and see what happens. That's how you learn to Avisynth.
devhercule
15th July 2014, 19:33
That's exactly what i did. I learned many things from your scripts :)
raffriff42
15th July 2014, 19:43
Well I couldn't resist, I had to do it :) This is the last time though.
https://www.dropbox.com/s/o1iiamykc2dbdbh/drawbar3_PGSWL.jpg?raw=1
A = FFAudioSource("video.mp4")
V = FFVideoSource("video.mp4")
AudioDub(V, A)
ShowFrameNumber(scroll=true,x=30,y=30)
ShowTime(x=80,y=50)
C=Last
ShowFrameNumber(scroll=true,x=30,y=30)
ShowTime(x=80,y=50)
draw_box(B=Last,
\ x=16, y=C.Height-32,
\ wid=Width-32, hgt=16,
\ color=$0, opacity=1,
\ border=2, border_color=$00ff00,
\ border_opacity=1)
C=Last
Animate(C, 1, C.FrameCount, "simple_box",
\ 1.0, C.Width-32)
ScriptClip(Last, """
Subtitle(StrinF(100.0*current_frame/framecount)+"%",
\ x=32, y=Height-32, size=14, text_color=$0, halo_color=$ff000000)
""")
Trim(150,350+30).Dissolve(Trim(900,1200+30), 30).Dissolve(Trim(1350,1700), 30)
return Last
##################################
function simple_box(clip C, float "width")
{
return C.draw_box(
\ x=16, y=C.Height-32,
\ wid=Round(width), hgt=16,
\ color=$ffff00, opacity=1,
\ border=0, border_color=$0,
\ border_opacity=1)
}
##################################
### overlay translucent colored box with border
##
## @ C - base video
## @ B - video source for box; if supplied, overrides box color
## (size, framerate etc must be same as clip C)
## (color format must be xxxxx EDIT no restriction)
## @ x, y - top left corner of box, not including border
## @ wid, height - width & height of box, not including border
## @ color - box color (only applies if argument 'B' missing)
## @ opacity - box opacity (0.0 to 1.0, default 1.0)
## @ border - border width (default = 0; no border)
## @ border_color - border color
## @ border_opacity - border opacity
##
## requires Avisynth 2.6
## version 3 (FKA "draw_bar")
##
function draw_box(clip C, clip "B",
\ int "x", int "y", int "wid", int "hgt", int "color", float "opacity",
\ int "border", int "border_color", float "border_opacity")
{
wid = Max(0, Default(wid, C.Width))
hgt = Max(0, Default(hgt, C.Height))
x = Default(x, 0)
y = Default(y, 0)
color = Default(color, $ffff00)
border = Max(0, Default(border, 1))
border_color = Default(border_color, $0)
opacity = Float(Default(opacity, 1))
border_opacity = Float(Default(border_opacity, 1))
box = BlankClip(C, pixel_type="YV24", color=color)
bdr = BlankClip(C, pixel_type="YV24",
\ width=wid+2*border, height=hgt+2*border, color=border_color)
mask = BlankClip(C, pixel_type="Y8", color=$0)
mask = mask.Overlay(mask.Invert.Crop(0, 0, wid, hgt), x=x, y=y)
mask = mask.ColorYUV(levels="TV->PC")
return C.Overlay(bdr, x=x-border, y=y-border, opacity=border_opacity)
\ .Overlay((IsClip(B) ? B : box), mask=mask, opacity=opacity)
}
#######################################
## format a Float as a String with 2 decimals
function StrinF(float f, int "decimals")
{
decimals = Min(Max(0, Default(decimals, 2)), 8)
return String(f, "%0."+String(decimals)+"f")
}
StainlessS
15th July 2014, 22:21
Lovely job RaffRiff, and what cheerful and summery colours too.
devhercule
16th July 2014, 08:47
Perfect :)
Thank you very much (y)
devhercule
16th July 2014, 09:20
Here is the previous script modified with my personnalized display. I modified the opacity of the bar to be able to see behind it in the case where i have subtitle:
A = FFAudioSource("tsonga_ferrer.mp4")
V = FFVideoSource("tsonga_ferrer.mp4")
AudioDub(V, A)
#ShowFrameNumber(scroll=true,x=30,y=30)
#ShowTime(x=80,y=50)
C=Last
Animate(C, 1, C.FrameCount, "simple_bar", 1.0, Float(C.Width-100))
ScriptClip(Last, """Subtitle(StrinF(100.0*current_frame/framecount)+"%", x=width-55, y=Height-24, size=12, text_color=$ffd455, halo_color=$ff000000)""")
Dissolve(Trim(0,200), Trim(1350,1700), Trim(13350,13700), Trim(99150,99400), Trim(150000,150300), Trim(170000,170300), Trim(190000,190300), Trim(192000,192278), 12)
return Last
function simple_bar(clip C, float "width")
{
return C.draw_bar(Round(width), 7, 30, C.Height-20, $ffd455)
}
function draw_bar(clip C, int "wid", int "hgt",int "x", int "y", int "color")
{
wid = Max(0, Default(wid, C.Width))
hgt = Max(0, Default(hgt, C.Height))
x = Default(x, 0)
y = Default(y, 0)
color = Default(color, $ffffff)
bdr = BlankClip(C.ConvertToYV24, color=$000000, width=C.Width-100, height=hgt)
box = BlankClip(C.ConvertToYV24, color=$ffffff, width=wid, height=hgt)
mask = BlankClip(C, color=$0).Overlay(box, x=x, y=y).ConvertToY8().ColorYUV(levels="TV->PC")
return C.Overlay(bdr, x=x, y=y, opacity=0.4).Overlay(BlankClip(C, color=color), mask=mask, opacity=0.5)
}
function StrinF(float f, int "decimals")
{
decimals = Min(Max(0, Default(decimals, 2)), 8)
return String(f, "%0."+String(decimals)+"f")
}
With your last code and in changing the opacity, i cant see the frame behind, because there is a black hidden box behind.
I want just to modify the opacity of the bar and the border to have an idea on the video frame behind.
If we can fix your last code and modify the opacity of the progress bar, it will be good. Otherwise, i'm satisfied with your last version this, i'm pleased with it and thankfull for you :)
StainlessS
16th July 2014, 10:14
Just change the args in RaffRiff's script here
draw_box(B=Last,
\ x=16, y=C.Height-32,
\ wid=Width-32, hgt=16,
\ color=$0, opacity=0.1,
\ border=2, border_color=$00ff00,
\ border_opacity=0.1)
Works pretty good.
And for next time, provide a jpeg with eg simulated progress bar, so people dont have to keep guessing what you want and have to start from scratch several times over.
devhercule
16th July 2014, 11:44
the modification you propose works on the border and not on the progress bar. I tried to change the opacity of the progress bar in RaffRiff's script, but it dont work
return C.draw_box(
\ x=16, y=C.Height-32,
\ wid=Round(width), hgt=16,
\ color=$ffff00, opacity=0.1,
\ border=0, border_color=$0,
\ border_opacity=1)
i attached an example for the expected bar. i get it with a previous version of the script that dont include a border. with the las script of RaffRiff i couldnt fix it
raffriff42
16th July 2014, 13:31
Here is the previous script modified with my personnalized display. I modified the opacity of the bar to be able to see behind it in the case where i have subtitle:
...
With your last code and in changing the opacity, i cant see the frame behind, because there is a black hidden box behind.
I want just to modify the opacity of the bar and the border to have an idea on the video frame behind...That won't work, due to the way that script (http://forum.doom9.org/showthread.php?p=1686905#post1686905) was written. My early versions put up a solid black box for the border, then overlaid the colored bar over it; this works OK for opacity=1.0, but not so well for opacity<1.0 (the black box shows through). StainlessS's version (http://forum.doom9.org/showthread.php?p=1686891#post1686891) (with a clever employment of LetterBox for the border), and my own version 3 (http://forum.doom9.org/showthread.php?p=1686945#post1686945), do not have that problem.
devhercule
16th July 2014, 13:41
yes i understand :)
thank you for all
StainlessS
16th July 2014, 14:21
devhercule, if you wait just a little I've almost done a Progress Bar indicator function, self contained,
and configurable so you can produce pretty much anything you want. (mostly stolen from RR42 code).
devhercule
16th July 2014, 14:23
looool ok :)
StainlessS
16th July 2014, 14:56
Here, have not done too much testing but think it should be OK, say so if not (there are no checks on arg validity).
avisource("D:\avs\test.avi")
ProgressBar()
return Last
##################################
### Overlay Progress Bar, by StainlessS. http://forum.doom9.org/showthread.php?p=1687012#post1687012
##
## @ clp - base video
## @ x, y - top left corner of Entire Progress bar including border, default 0,0
## @ wid, hgt, Width and height of Entire box, including border, Default clp.Width-x-64, 24
## @ color - Background color, default , $FF0000, Red
## @ opacity - Background opacity (0.0 -> 1.0, default 0.1=almost transparent)
## @ bar_color - Progress Bar color, Default $FFFF00, Yellow
## @ bar_opacity - Progress Bar opacity (0.0 to 1.0, default 0.2)
## @ bord - Border width (default = 2)
## @ bord_color - border color, default $00FF00, Green
## @ bord_opacity - border opacity, default 0.2
## @ decimals, Subtitle percentage indicator decimal digits. Default 2 (-1 = No subtitle indicator)
## @ track, Default False. If true Subtitled Percentage indicator tracks Progress bar. False, shown RHS of progress bar.
##
## requires Avisynth 2.6
##
Function ProgressBar(clip clp, int "x", int "y", int "wid", int "hgt", int "color", float "opacity",
\ int "bar_color", float "bar_opacity", int "bord", int "bord_color", float "bord_opacity",Int "Decimals",Bool "Track") {
clp
myName="ProgressBar: "
Function ProgressBar_Anim_LO(clip clp,clip bar,clip bgd,Float Perc,int x,int y,int bord,Float opbar,Float opbgd,Int decimals,bool Track){
clp
wid = bgd.Width wbar = wid*Perc wbgd = wid-wbar
(Round(wbar)>0) ? Last.OverLay(bar.Crop(0,0,Round(wbar),-0),x=x,y=y,opacity=opbar) : Last
(Round(wbgd)>0) ? Last.OverLay(bgd.Crop(0,0,Round(wbgd),-0),x=x+Round(wbar),y=y,opacity=opbgd) : Last
xt=Max(32.0,Min(wid-64.0,x+wbar-32.0+2.0))
(decimals>=0 && !Track) ? Last.Subtitle(String(Perc*100.0, "%0."+String(decimals)+"f")+"%",x=x+wid+bord+2,y=y) : NOP
(decimals>=0 && Track) ? Last.Subtitle(String(Perc*100.0, "%0."+String(decimals)+"f")+"%",x=xt,y=y) : NOP
Last
}
x = Default(x, 0) y = Default(y, 0)
wid = Max(0, Default(wid, Width-x-64)) hgt = Max(0, Default(hgt, 24))
color = Default(color, $FF0000) opacity = Float(Default(opacity, 0.1))
bar_color = Default(bar_color, $FFFF00) bar_opacity = Float(Default(bar_opacity, 0.2))
bord = Max(0, Default(bord, 2)) bord_color = Default(bord_color, $00FF00) bord_opacity = Float(Default(bord_opacity, 0.2))
decimals = Min(Default(decimals, 2), 8)
Track=Default(Track,False)
Assert(x>=0 && x<Width,myName+"Invalid x coord")
Assert(y>=0 && y<Height,myName+"Invalid y coord")
Assert(wid>0 && x+wid<=Width,myName+"Invalid wid")
Assert(hgt>0 && y+hgt<=Height,myName+"Invalid hgt")
brd = Last.BlankClip(pixel_type="YV24", color=bord_color,width=wid,height=hgt)
brdmsk = Last.BlankClip(pixel_type="YV24", color=$FFFFFF,width=wid,height=hgt)
\ .Overlay(Last.BlankClip(pixel_type="YV24", color=$0,width=wid-2*bord,height=hgt-2*bord), x=bord, y=bord)
\ .ColorYUV(levels="TV->PC")
Last.Overlay(brd,x=x,y=y,mask=brdmsk,opacity=bord_opacity)
bgd=Last.BlankClip(pixel_type="YV24", color=color,width=wid-2*bord,height=hgt-2*bord)
bar=Last.BlankClip(pixel_type="YV24", color=bar_color,width=wid-2*bord,height=hgt-2*bord)
ix=x+bord iy=y+bord
Animate( 0, FrameCount-1, "ProgressBar_Anim_LO",
\ bar,bgd,0.0,ix,iy,bord,bar_opacity,opacity,decimals,Track,
\ bar,bgd,1.0,ix,iy,bord,bar_opacity,opacity,decimals,Track)
}
all three sections are processed separately, ie the progress bar is not overlaid on the background.
EDITED: Added coord checks.
EDIT: Added Track arg.
raffriff42
16th July 2014, 20:22
Nicely done, very tweakable. :cool:
(one thing, "tracking" readout position moves too far to the left) /* xt=Max(0.0,... */
xt=Max(30.0,...
devhercule
17th July 2014, 09:54
Really perfect, nothing to report. that's what i need
In addition it is more light, because sometimes with previous version i had some freezes in the video display (with trim and dissolve). The fluidity was not very good. But now it is ok. The script is perfect for me :)
Thank you very much :)
StainlessS
17th July 2014, 15:39
Thankyou RaffRiff.
Post #38 updated, made tracking percentage movement a little smoother (Subtitle x position can be float in v2.6).
StainlessS
17th July 2014, 16:47
Oops, post #38 updated again, (I broke last version).
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.