Log in

View Full Version : custom subtitles


terryhamel
27th October 2007, 14:27
I've hours of speeches and have been using the subtitle function to show the words. I'd like to have a darker, semi-transparent bar, graphic or video underneath the words to help contrast the words to the speech. When I got to the overlay function, I noticed a few things:


the overlay is for the duration of the clip. I'd like to it to be start and end frame based. It'd be even better if I could control a fadeIO time for the overlay instead of on/off

the overlay function changed my 15k frame clip to 80k frames per virtualdub, which is what I'm using to see the results. When I comment out the overlay function, it's back to normal.

the overlay function introduced a .25s delay when frame advancing - seems pretty slow compared to other s/w I've used on the same computer. Could this be due to converting and/or changing colormodes?


While I'm on the subject, I was trying to write a "wrapper" function for the subtitle function so I could set all the parameters once and only pass the string and start/end frames. Bonus to fadeIO the function. Couldn't get either to go.

I've read the online and bundled docs to AVIASynth 2.57 at least 20 times and it doesn't flow well from newbie to advanced - more like quicknewbie-skip-past-intermediate-go-straight-to-advanced. There's pockets of missing information, which I'm sure is why I'm not able to get this to go, so here I am searching the forums and begging for help. :(

[P]ako
27th October 2007, 20:35
Why don't you use a format like .ASS or .SSA for you subtitles? With .ASS you can change the style (the parameter is borderstyle) so it adds an opaque box under the text.

---> BorderStyle. 1=Outline + drop shadow, 3=Opaque box

Then add a {\fad(200,200)} if you want a fadein and fadeout effect. Also, you may change the transparency of the terciary colour to achieve the desired effect.

IanB
27th October 2007, 22:36
Function Foo(Clip c, String txt, Int I, Int J) {
return C.Subtitle(Text=txt, X=100+I, Y=300+J, Size=24, text_color=$40A040)
}
...
Trim(0, 1234) + \
Trim(1235, 4567).Foo("ABC", 10, 10) + \
Trim(4568, 9876).Foo("DEF", 30, 10) + \
Trim(9877, 0)