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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 23rd January 2025, 23:18   #1  |  Link
Br4twurscht
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()
And these are my x265 options (it's an hdr10):
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
Do you have an advice for me how to solve this?
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
Attachments Pending Approval
File Type: png source_[No DV]_new_00200.png
File Type: png source_[No DV]_new_vapour_hardpgs_imageFile.mkv_snapshot_00.08.118.png

Last edited by Br4twurscht; 24th January 2025 at 12:28.
Br4twurscht is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:40.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.