VideoHelp Forum


Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. Hi,

    I have this 4K Blu-Ray which doesn't have audio and/or subtitles in my language. Fortunately, the regular 1080p Blu-Ray has, so I thought I'd transfer them over. Of course the subtitles will need to be tonemapped for use with HDR video, to prevent them from appearing much to bright.

    I quickly found this tool: https://github.com/quietvoid/subtitle_tonemap but unfortunately it skips a few lines, a known bug in the Java version of BDSup2Sub, which this tool relies on. Besides, the tool most probably also runs into the problem I encountered when I tried to do it manually, by using BDSup2Sub++, the C++ version, which does copy over all subtitle lines, to extract the subtitles to XML/PNG, then darkening the PNG's using a Photoshop droplet, and converting the result back to SUP again.

    While this works like a charm, I noticed a decrease in image quality:

    Click image for larger version

Name:	9e1fa21366365715.png
Views:	27
Size:	129.0 KB
ID:	56759

    You might have to zoom in on the above image to see the effect, but as you can see, some letters were turned a little ugly. (Take a close look at that last word, "diep", for instance) This happens during the SUP --> XML/PNG step, even before editing them in photoshop, and again when you convert them back to SUP. I suspect the culprit in this case is the filter BDSup2Sub(++) uses, as switching the filters changes the results. For instance, the Lanczos3 filter gives me a clean "M", but it messes up my "a". Mitchell gives me a better "a", but gives me a ugly "M", etc. I tried all available filters, but all of them do some damage. Lanczos3 causes the least damage, but as you can see in above screenshot, it still does some.

    While it's probably barely noticeable during playback, I would like to avoid this, if at all possible. Is there any way to prevent/work around this? Maybe by forcing BDSup2Sub to use no filter at all, or by leaving the actual images alone, and just edit the palette, or something? Anything?

    I want to keep the subtitle style as-is, so OCR-ing is not an option.

    Thanks in advance for any help.
    Quote Quote  
  2. Unfortunately, as suspected, when I select IDX/SUB output, the image becomes even (much) worse. And even if it didn't, it would probably still happen during SUP export.

    I did make one step in the right direction, tho. It doesn't seem to happen with Subtitle Edit. Although it messes up the positioning a little. But that's probably easy to fix by finding the right safe margin.

    Seems to confirm my theory that the filter is the culprit. Will keep trying and post the solution here if I work it out.
    Quote Quote  
  3. Well, the method takes some time, but I figured it out! If you also need to resync your subtitles and a single delay doesn't work for you, the method's very roundabout, tho.

    First of all, you need to make a photoshop droplet which tonemaps your subs to your liking. I found it both easiest and best to add an adjustment layer, click "levels...", and set your white to the desired level. 180 is a good value.

    Then, if you don't need to resync the subtitles:

    1. Convert your SUP to XML/PNG using SUPread
    2. Tonemap your PNG's using your Photoshop Droplet
    3. Convert your XML/PNG back to SUP using SUPread
    4. Done!

    The downside to this method is that it's kinda hard to resync subtitles this way, especially if you need several edits. If you only need one delay at the start of the subtitles, you can simply use SupMover before or after following above 4 steps.

    In case you need to edit more than once throughout the movie and truly resync it, however, you have to take that much more roundabout approach. But at least it does the job.

    In that case your workflow becomes:

    1. Use Subtitle Edit to Tesseract OCR the SUP. This shouldn't require your attention, but does take some time. Save the file as "guide.srt".
    2. Resync guide.srt the way you usually would. Don't delete or add any lines, as their number must remain the same. If you really must do so, do it between steps 5 and 6.
    3. Make a temporary SUP from guide.srt called "guide.sup". You can do this by opening the original SUP in Subtitle Edit and replace the timings with the ones from guide.srt from the right-click menu inside the OCR window. easySUP should also do, although it will probably take even longer. Whatever works and keeps the exact same number of lines is fine. These subs are temporary, anyway.
    4. Convert guide.sup to XML/PNG in a folder called "guide" using SUPread
    5. Convert your original SUP to XML/PNG in a folder called "target" using SUPread
    6. Confirm your target and guide folders contain the exact same number of files.
    7. Tonemap your target folder using your Photoshop Droplet
    8. Replace the XML in your target folder with the one from your guide folder
    9. Convert your target folder back to SUP using BDSupEdit
    10. Done!
    Last edited by RajaSteve; 12th Jan 2021 at 15:49. Reason: Fixed a mistake
    Quote Quote  
  4. Member
    Join Date
    Jul 2011
    Location
    Denmark
    Search Comp PM
    Latest beta of SE has a new "bd/ts sup" editor - see File -> Import -> Blu-ray (.sup) subtitle file for edit... - and then "Tools" or "list view context menu with selected lines")
    Image
    [Attachment 56766 - Click to enlarge]


    (will keep existing positions of subs)

    https://github.com/SubtitleEdit/subtitleedit/releases/download/3.5.18/SubtitleEditBeta.zip
    Last edited by Nikse; 12th Jan 2021 at 15:58.
    Quote Quote  
  5. Ah ok, will check it out. Keeping positioning is new to Subtitle Edit, as it messes that up in the version I currently have installed.
    Quote Quote  
  6. Member
    Join Date
    Jul 2011
    Location
    Denmark
    Search Comp PM
    Yes, keeping positioning is new to Subtitle Edit. Actually the whole "Blu-ray sup edit" window is new
    (can also save as bdn xml with positions)

    Let me know how it works.
    Last edited by Nikse; 12th Jan 2021 at 16:12.
    Quote Quote  
  7. It works like a charm. Only downside is I can't set my white levels very precise. I'd need 70,6% brightness to get to a white level of 180.

    But at least the process is a lot simpler this way! Thx! Now you can just do:

    1. Tesseract OCR with Subtitle Edit, save as guide.srt
    2. Resync guide.srt
    3. Open SUP for Editing in Subtitle Edit
    4. Replace timings with the ones from guide.srt
    5. Calculate percentage to set brightness to (desired white level/255*100=percentage, i.e. 180/255*100=70,6)
    6. Export as SUP
    Quote Quote  
  8. Member Ennio's Avatar
    Join Date
    May 2005
    Location
    Netherlands
    Search Comp PM
    @RajaSteve:

    Can you tell me why you'd resync the subtitle's timings after OCR? I don't understand.
    Quote Quote  
  9. Because the way I resync in above example requires the number of lines to be exactly the same, that's why you cant delete/add lines.

    Other than that, it's mainly because making more than one edit to a SRT is a hell of a lot simpler than doing it with PGS.
    Quote Quote  



Similar Threads