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. |
![]() |
#1 | Link |
Registered User
Join Date: Jul 2011
Posts: 10
|
Bad quality when hardcode pgs with core.sub.ImageFile
Hi,
because of issues with displaying some pgs and ass subtitles on my tv (with jellyfin), I want to change my encoding workflow and burn them directly into my encodes. I'm working very much years with StaxRip there it seems, that burn in pgs subs only works with VapourSynth. I also tried SupTitle by myself, but the result was very similar. The crazy thing is, when I use the preview in StaxRip it look good, but after the encode, the text is not so smooth anymore, which is not nice on my screen, but definitely bad on my OLED TV. The first picture is saved from inside the preview of StaxRip: The second picture is saved from mpc-hc: This is the resulting vs script: Code:
1: import os, sys 2: import vapoursynth as vs 3: core = vs.core 4: 5: sys.path.append(r"E:\encoding\StaxRip-v2.44.2-x64\Apps\Plugins\VS\Scripts") 6: core.std.LoadPlugin(r"E:\encoding\StaxRip-v2.44.2-x64\Apps\Plugins\VS\SubText\SubText.dll", altsearchpath=True) 7: core.std.LoadPlugin(r"E:\encoding\StaxRip-v2.44.2-x64\Apps\Plugins\Dual\ffms2\ffms2.dll", altsearchpath=True) 8: 9: tcFile = r"E:\encoding\test-movie_HardSubtest_neu\source_[No DV].mkv_temp\source_[No DV]_timestamps.txt" # timestamps file path 10: clip = core.ffms2.Source(r"E:\encoding\test-movie_HardSubtest_neu\source_[No DV].mkv", cachefile=r"E:\encoding\test-movie_HardSubtest_neu\source_[No DV].mkv_temp\temp.ffindex", timecodes=tcFile) if os.path.exists(tcFile) else core.ffms2.Source(r"E:\encoding\test-movie_HardSubtest_neu\source_[No DV].mkv", cachefile=r"E:\encoding\test-movie_HardSubtest_neu\source_[No DV].mkv_temp\temp.ffindex") 11: clip = core.sub.ImageFile(clip, file = r"E:\encoding\test-movie_HardSubtest_neu\source_[No DV].mkv_temp\ID1_[de] {FORCED [DIY]}_default_forced.sup") 12: clip = core.std.Crop(clip, 0, 0, 276, 276) 13: clip = core.resize.Bicubic(clip, 1920, 804) 14: clip = clip[0:801] 15: 16: clip.set_output() Code:
--crf 18 --preset slow --output-depth 10 --ctu 32 --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1)" --hdr10 --colorprim bt2020 --colormatrix bt2020nc --transfer smpte2084 --range limited --max-cll "763,218" --chromaloc 2 --repeat-headers --aud --hrd --selective-sao 2 If it's in avisynth, I would be happy, too. Currently, I'm still working with avisynth. Edit: Some additional infos. If I play the original file and let the player show the pgs, then it looks pretty smooth regardless if on the pc with mpc-hc or on the tv with jellyfin. I tried very much things to solve it by myself, but my knowledge gerading avs and vs is limited. Nevertheless, I tried some filters and also tried to blend it by myself regarding "Example with manual blending" on https://github.com/vapoursynth/subte...cs/subtext.rst Maybe it's something with the color stuff, because of the 10bit HDR. But if there's a problem, then I'm lost. I'm very happy, that StaxRip does these configurations e.g. in x265 for me. br Br4twurscht Last edited by Br4twurscht; 24th January 2025 at 12:28. |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|