Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change color for built-in subtitles #4965

Open
1 task
theIroaia opened this issue May 30, 2024 · 4 comments
Open
1 task

Can't change color for built-in subtitles #4965

theIroaia opened this issue May 30, 2024 · 4 comments

Comments

@theIroaia
Copy link

System and IINA version:

  • macOS 14.4
  • IINA 1.3.4 Build 140

Expected behavior:

I should be able to change subtitle color for built in subtitles in both "..."->Subtitle quick setting, or in IINA->Settings->Subtitle->Text Subtitles

Actual behavior:

The subtitle color changing works for subtitles in separate files like .srt for me, but for built in subtitles that's packed in .mkv file, I cannot change the subtitle color. The behavior is as below:

In "..."->Subtitle quick setting, I cannot save the color I choose for subtitles (as the screencap below). There is no button like "OK" or "Done" that I could press after selecting a color, and the color is not saved after I press "x" to close the colors window.
image

In IINA->Settings->Subtitle->Text Subtitles, although I can save the color I choose for subtitles, it seems to have no effect. As the screencap below, the actual subtitle is not changing color as I chose, and it is inconsistent with the subtitle color in the quick setting menu.
image

Crash report:

mpv log:

Steps to reproduce:

All of the tested .mkv files with packed subtitles could reproduce the issue on my computer.

  • MPV does not have this problem.

How often does this happen?

Always.

@low-batt
Copy link
Contributor

low-batt commented Jun 1, 2024

Did not reproduce for me.

I downloaded the YouTube video Youtube Auto Generated Subtitles - Tutorial using yt-dlp passing the options shown here:

yt-dlp --write-auto-subs --embed-subs https://www.youtube.com/watch?v=j8OHt4BzhOI

While playing the video I clicked on Show Subtitles Panel and then clicked on the white circle labeled Color in the FONT section. As soon as I clicked on a color the color of the subtitles displayed on the screen changed to that color.

There are many different types of subtitles. Have a look at this list of subtitle formats from Wikipedia. We need to know what kind is in the video files you are having trouble with. If you can post a small video sample I can reproduce the problem and tell you want is going on. If it is too big for GitHub you could shorten it using ffmpeg or post it to THE NULL POINTER, https://0x0.st/

If it is not possible to provide a video sample that exhibits the problem, start playing the video and follow these instructions:

  • Click on Inspector under the Window
  • The Inspector window appears
  • In the Inspector window click on the Tracks tab
  • In the pull-down labeled Tracks select a subtitle track
  • Take a screen shot of the information displayed
  • Drag & drop the screen shot file into the comment section below
  • Click on the Comment button to post the screen shot

This is what that looks like in the test I ran:
inspector

@theIroaia
Copy link
Author

Thanks for your timely response. As your comment suggested, I've tested the youtube vid you posted and the color and font of its subtitle could be changed correctly.

I've uploaded a small video clip that could reproduce the issue raised on my computer:
test_clip.mkv.zip

On my computer, it shows as below:
image

Please let me know if you need any other information to pin point the issue. Thanks again for your support!

@low-batt
Copy link
Contributor

low-batt commented Jun 2, 2024

Thank you for posting the sample. The behavior reproduced for me.

Many subtitle formats are "text" based. The subtitle stream contains values that are codes for letters and numbers and can be edited by TextEdit. To display such subtitles a player must form pictures of the subtitles and then place them into a frame of the video. As the player is converting the subtitles from text to a picture it can control the color and font to use for the conversion.

In the screenshot of the Inspector window hdmv_pgs_subtitle is listed for Codec. The subtitles in this file are in Presentation Graphic Stream format. Subtitles in this format are pictures. The player merely places these pictures into the video frame. The player is not converting text into an image, so it has no ability to change the color and font of the letters shown.

To be able to alter the display of subtitles in pgs format there are two choices that I know of. Find and download subtitles in Advanced SubStation Alpha (.ass) or SubRip (.srt) format from a subtitles site such as Open Subtitles or use a subtitle converter that uses OCR to convert the image based subtitles into text based ones. Searching GitHub I found MKV-Subtitle-Converter which uses Tesseract OCR. I've never tried using MKV-Subtitle-Converter so I can't say anything more about this program.

Possibly IINA could detect that the current subtitle format is image based and disable the subtitle controls that have no effect on such subtitles.

@theIroaia
Copy link
Author

Thanks for your detailed response! I now understand why the color could not be changed, but as you said, indeed it will send a clearer message for user if IINA could disable the subtitle controls for this kind of format.

I would definitely check the solutions you pointed out for me afterwards. Thanks again for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants