oltodosel / mpv-scripts

My and adopted lua scripts for mpv.
MIT License
31 stars 5 forks source link

`show_chapters.lua` does not always follow `osd-back-color` transparency setting #11

Closed jiangzhenjerry closed 11 months ago

jiangzhenjerry commented 11 months ago

Description For my personal liking I added a global transparent dark background to OSD, so that I can see the OSD texts easier. However, show_chapters.lua does not follow the transparency setting, specifically when the last chapter is being played.

Steps to reproduce

  1. Use a vanilla mpv with only show_chapters.lua. No mpv.conf or other LUA scripts needed.
  2. Inovke mpv with mpv --osd-back-color=0/0.5, that is, setting the OSD background color to black with 50% transparency.
  3. Play a video/an audio file with chapters and show chapters.

Expected behavior The background of chapters should always follow the global OSD setting. In this example, it should always be black with 50% transparency.

Actual behavior The background is correct until the beginning of last chapter. Starting the last chapter, suddenly the background loses the transparency.

Example: Screenshot up to Chapter 9 (the chapter before the last chapter). The background is transparent, as expected.

sshot-1

Screenshot at Chapter 10 (the last chapter). The background is no longer transparent.

sshot-2
oltodosel commented 11 months ago

Sorry, not going to debug why this happens. What you might do instead is to add something like this: ass:append("{\\bord10}") after this line: https://github.com/oltodosel/mpv-scripts/blob/8fe23a2ed32f64edeb8a3690def122c3dab60583/show_chapters.lua#L49 Then change the number after \\bord to what suits you best. Also maybe add ass:append("{\\blur2}") to soften the edges.

P.S. Liked my script? - Тодi задонать на дрони кiлька гривень.

jiangzhenjerry commented 11 months ago

Thank you for your reply. I added the background color not just for show_chapters but for all OSD-related outputs. It's unfortunate for me that it won't get fixed.

BTW I don't speak Ukrainian... I just happen to like Ukrainian pop songs. Thanks for the note - I'm supportive.

Closing the issue for now.