View Single Post
Old 26th February 2019, 23:44   #6  |  Link
djloewen
Registered User
 
Join Date: Aug 2007
Posts: 112
So I've been stumbling around with this and I've ended up coming very very close to what I'm trying to accomplish. Any help to finish the job would be appreciated!

The two limitations I've found with SupTitle are that it doesn't scale the 2k SUP file to the 4K video, and it doesn't like 16bit. So I'm trying to put the subs on a blankclip, upscale and ConvertBits, and overlay it. Here's what I've got:

Code:
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindexnv\DGDecodeNV.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins\SupTitle.dll")

video = DGSource("D:\UHD movie\00244.mpls_2eng.dgi",fulldepth=true)

n = video.framecount
f = video.framerate

subs=blankclip(length=n, width=1920, height=1080, fps=f, pixel_type="YUV420P8").SupTitle("forced.sup").LanczosResize(3840,2160).ConvertBits(16)

Overlay(video,subs,mask=subs)
So, because I'm using the "subs" clip as the mask, the subtitles aren't fully opaque. What I'd like is the background to be fully transparent and the subtitles fully opaque. Can someone help me accomplish this without changing the color or appearance of the subtitles?

Also, is there a way to do this, like taking advantage of the alpha channel to recognize the transparency in the PGS stream so I can just set opacity=1 and not use "mask" at all? SupTitle does supposedly support alpha channel if that helps at all.

Thanks!
djloewen is offline   Reply With Quote