Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
16th February 2019, 15:01 | #1 | Link |
Registered User
Join Date: Aug 2007
Posts: 112
|
Hardcoding UHD subtitles without conversion
Hi there, I've done all the research I can on this subject and still came up short. When I encode 1080p sources that have forced ".sup" subtitles, I like to use the avisynth SupTitle filter to hardcode the subtitles into the resulting video file. I prefer this to conversion because I like having the subtitles appear exactly as they do in the original source.
I'd like to do the same with a UHD source. the ".sup" files appear to be 1080p even on 4k sources? SupTitle appears incapable of displaying it properly, and the only resizing tools I've found online will make the subtitles smaller, not larger. I also see that there are challenges to doing this in a 10/16 bit environment (currently I'm using 16bit for processing and outputting to 10)? I see that some people have possibly had luck using VaporSynth and either the "core.sub.imagefile" built-in filter, or VSfilterMod? I've never used VaporSynth before and I'm not sure whether it can be run side-by-side with Avisynth+ or whether I'd have to change my whole workflow. So I was hoping to find a few answers before I try messing with installs. 1) Is there any way to accomplish this in avisynth/avisynth+? And if not, 2) Can VaporSynth be installed and only used for jobs that need subtitles, or would I need to change over completely? 3) Do most/all other things work in VaporSynth function the same as in avisynth? Can I use the same plugins, for example suptitle? 4) Is there a preference between core.sub.imagefile and VSFilterMod? Will they do what I'm trying to accomplish here? 5) Is there anything else I'm missing here? Thank you! |
16th February 2019, 17:40 | #2 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
UltraHD Blu-Ray does indeed use 1080p subtitles for 2160p video.
2.) Who's stopping you from using VapourSynth? 3.) Most of the important plugins will have similar ones in VapourSynth. Usage will be different. There is a learning curve. I think in VapourSynth you basically want to render the subs using e.g. core.sub.ImageFile() on an Alpha clip, then resize said clip to UHD, then blend it with the actual video. In the VapourSynth doc you can find a blending example for core.sub.TextFile(). 1.) Did SupTitle() have an alpha mode? Don't really remember if/how. If so it should be similar. See this thread for ideas on blending subtitles on AviSynth. |
17th February 2019, 00:48 | #3 | Link |
Registered User
Join Date: Aug 2007
Posts: 112
|
Thanks for the reply. The reason I had a preference for using avisynth is that I already know how to use it, have all my filters, etc. Can VapourSynth be used side-by-side with avisynth?
Also, thank you for the thread about blending subtitles. Am I correct in understanding that VSfilter doesn't support "sup" subtitles? I thought that maybe VSfiltermod did but I'm having a lot of trouble figuring out how to use it, I can't find any documentation about commands and I can't seem to find a way to render the subtitles using an avisynth script. |
17th February 2019, 12:08 | #4 | Link | ||
Registered User
Join Date: Dec 2002
Posts: 5,565
|
Quote:
It makes sense to try to solve the problem in AviSynth to avoid learning VapourSynth. Maybe someone else can you some tips for it. Quote:
I can't find the documentation for "SupTitle()" anymore. Possibly it can render on Alpha. |
||
17th February 2019, 14:55 | #5 | Link |
Registered User
Join Date: Aug 2007
Posts: 112
|
Thanks for your help. I can't find SupTitle documentation either but I did find a page that listed "Alpha channel transparency blending" as a feature. Is the idea to render it on a transparent video clip, resize that clip to 4k, and then blend the two videos? Would you be able to help me with this, or is there an example of someone doing this (with VobSub or whatever) that I can learn from and experiment?
|
26th February 2019, 23:44 | #6 | Link |
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) 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! |
27th February 2019, 17:17 | #7 | Link | |
Registered User
Join Date: Aug 2007
Posts: 112
|
I think I've managed to accomplish it. In case it helps anyone, here's my code:
Quote:
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|