Log in

View Full Version : Resizing Sub Titles with TextSub


jaswah
8th January 2007, 02:10
Hi,

I have a widescreen movie which is 720x576 (PAL) non-square-pixels which i'm trying to add sub titles to with Text Sub. The only problem is that the sub titles are being added at square pixels so that when the output file is stretched out, then the subtitles are really wide and look really fat. I'd like the sub titles to be stretched in to about 540x576 and centered. The script i'm using is:


LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\VSFilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\Plugins\DGDecode.dll")
mpeg2source("C:\movie.d2v",idct=5)
TextSub("C:\subs.srt")


If anyone has any answers i'd be eternally grateful!

Thanks,
Jason

IanB
8th January 2007, 06:42
Not a perfect solution but tryGlobal AR=1.4 # Horizontal scale factor for square pixels
mpeg2source("C:\movie.d2v",idct=5)
W=Width()
H=Height()
BC=BlankClip(Last, Width=2*Round((W*AR+1)/2.0))
BC=BC.TextSub("C:\subs.srt")
BC=BC.LanczosResize(W, H, Taps=9) # High order to get approx antialias function
Overlay(BC, "Lighten") # Experiment for best mode