FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

[Bug]: Subtitle placement issue

Open ArthurKun21 opened this issue 1 year ago • 6 comments

Guidelines

  • [X] I have encountered this bug in the latest release of FreeTube.
  • [X] I have encountered this bug in the official downloads of FreeTube.
  • [X] I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
  • [X] I have searched the documentation for information that matches the description of the bug I want to file, without success.
  • [X] This issue contains only one bug.

Describe the bug

  1. Go to a video like this https://youtu.be/haDjmBT9tu4?t=12

  2. Turn on the subtitle

    image

  3. Expect the subtitle to be centered or not placed on either left or right side of the screen

Expected Behavior

Expect that the subtitle was placed on the center of the screen.

Issue Labels

accessibility issue, inconsistent behavior, visual bug

FreeTube Version

75b8a358fde128276b8eb8406657361a971b3979

Operating System Version

Windows 11 23H2

Installation Method

.exe

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

No response

Additional Information

Auto-generated caption also sometimes have caption problems but it was mostly overflowing.


This ones you can clearly see the problems with the captions

Sample Images

https://youtu.be/haDjmBT9tu4?t=8

image

https://youtu.be/haDjmBT9tu4?t=9

image

https://youtu.be/haDjmBT9tu4?t=12

image

But it is not like it always fails though, sometimes it is good enough like this

https://youtu.be/haDjmBT9tu4?t=36

image

Nightly Build

ArthurKun21 avatar Nov 23 '24 06:11 ArthurKun21

im unable to reproduce this on the latest nightly build. Could you recheck if this is solved?

The video's subtitle looks like got fixed.


78f75d3f13d9e086082329f489af9e00cf93f89d

Another example I found.

https://youtu.be/5ADaIvhhcCU?t=86

image

image

ArthurKun21 avatar Dec 10 '24 14:12 ArthurKun21

Im able to reproduce this on v0.22.0-nightly-5290 Beta. On YT they use custom subtitles so i think its maybe related to that.

image

Hi, I'd like to add on some more things I noticed with this issue. Here's an example video which uses custom subtitles on Youtube.

In FreeTube (verison 0.22.1) the English closed captions are often moved to the right and sometimes cut off and unreadable. This doesn't seem to happen for the other language captions for some reason? (Japanese, Chinese, Korean) I took some comparison screenshots below.

English on the original YouTube video: English on FreeTube: Japanese on FreeTube: English on this Invidious instance: Invidious English

I also noticed an issue where the text doubles up sometimes. Japanese on FreeTube:

uwkopf840 avatar Jan 15 '25 18:01 uwkopf840

I too get this from time to time, but I'd like to link this specific video from f4mi for whoever might attempt to implement a solution:

Poisoning AI with ".аss" subtitles

She very thoroughly abuses the YouTube caption system, both by employing fancy styling and, if the UK English captions are selected, by rendering captions offscreen during normal playback and black-on-black captions during scene transitions. The video also documents her methods and tooling used for doing so, conveniently.

I make no comment on whether what she's doing is a good idea, but the video would serve as a great test case.

EDIT: Captions for it are, of course, broken in much the same way as discussed in this thread, being shunted off to the right and displayed without styling.

rehashedsalt avatar Feb 01 '25 12:02 rehashedsalt

Thanks for reporting this! I was able to reproduce the behavior you mentioned by visiting the video link and enabling captions. From what I observed, the captions are displaying clearly and are fully readable.

It seems that the placement of the subtitles (not being centered) may have been configured intentionally by the video owner or as part of how the captions were uploaded to YouTube. FreeTube appears to be rendering them as they are provided.

That said, I agree that consistent and centered subtitles would improve accessibility, especially if the placement isn't intentional. Perhaps adding an option to override caption positioning in the player settings could be a helpful improvement.

Thanks again for bringing this up!

https://github.com/user-attachments/assets/e6c5c119-6e8b-459a-809d-3f0098bd0bc6

codebloodedkaroum avatar Apr 12 '25 18:04 codebloodedkaroum

Alright, I've got a lot to add to this issue. To confirm what other people have been saying, yes, this only affects subtitles that use the .ytt format (.ass subtitles converted by YT Sub Converter), subtitles made from anything else (with the exception of .stl subtitles, though there's really only one or two issues) other than the .ytt format isn't affected. I've got a big list of all of the issues that I've noticed in the subtitles FreeTube presents vs. how YouTube presents it (The following examples have been taken from my captioning work on my video 'I Finally played REPO!', if you're testing it for yourself, make sure 'English (Australia)' captions are selected.):

Positioning bugs

Centring

Just like how everyone's saying, subtitles don't get centred properly, currently the problem has been mitigated a bit, but there's still issues. Any subtitle that exceeds a certain amount of characters will go off to the right, I don't know the exact amount that's needed for it to happen, but it's somewhere in-between 25-28 characters.

Alignment & Positioning

When a subtitle is being displayed in a different spot (bottom-left, bottom-right, centre, etc.) there's usually not a problem, however the same issue with centring happens when the alignment is at the centre or top-centre as well.

What other people don't realise though, is that subtitles that use alignment & positioning (\an and \pos) to make the subtitle higher or lower on the y-axis (or a different place on the x-axis that can't be achieved with alignment alone), the way Freetube displays it is pretty hit-or-miss. Sometimes it will display correctly, but other times, like in the example below, it doesn't: (FREETUBE ON LEFT, YOUTUBE ON RIGHT!)

Positioning error on FreeTube Correct Positioning on YouTube

Moving Subtitles

Whenever there's a subtitle that moves on either axis (utilising the \move tag), it either doesn't move at all, moves on one axis only, or moves on all axes (in a broken way). Here's a few examples of this.

EXAMPLE 1: ImageImage

EXAMPLE 2:

ImageImage

EXAMPLE 3:

ImageImage

Colouring issues

If you looked at the last example for the moving subtitles section, you may have noticed that the cyan colouring for the text didn't display on FreeTube. For whatever reason, FreeTube is allergic to displaying certain text colours. This issue doesn't exclusively happen with .ytt subtitles as this also happens with another officially supported format, EBU STL (subtitle format for European Union TV broadcasts). For .stl subtitles, FreeTube is able to display most of the text colours in the limited palette that the format allows you to use, however, the colour green doesn't get displayed. I have an example from a video on my main channel called 'Exploring the 2003 Half-Life 2 Beta Campaign: Part 1 - Canals', which shows this discrepancy:

Image Image

Issues with miscellaneous effects

Font Sizing

When there's a subtitle that's being displayed at a smaller or bigger font size, FreeTube doesn't reflect that change. In the subtitles I did for my REPO video, I had set the font size to be smaller based on how far away the speaker was relatively to me, so you can see what I'm talking about in the following example:

Font size on FreeTube Font size on YouTube

Animated Transform

Animated Transform effects (such as changing scale, colour, etc.) don't work on FreeTube, in the same video I mentioned earlier, I had made it so when a speaker goes closer to me during the spoken line, the text starts small and then goes back to normal size to indicate this. This effect doesn't display on FreeTube, the following example shows this:

ImageImage

There could be more issues that I haven't noticed, but that's all I have!

PostScriptReal avatar Sep 05 '25 10:09 PostScriptReal

@PostScriptReal This issue is only for subtitles overflowing off the side of the player or being scrunched up to the edge and not being readable. FreeTube's subtitle display is not intended to match YouTube's, it is not implemented and as such is not considered a bug (a bug is something that is broken, wanting a feature that doesn't exist is not a bug).

YouTube and Freetube use completely different players so their handling of subtitles is completely different, it is impossible for us to us to use the same player as YouTube because YouTube has a completely custom one, theirs is not an off the shelf one like the one FreeTube uses. While YouTube does offer subtitles in standard formats, they only include a small amount of information in them compared to the custom format that they use in their own players. Even if we added a translation layer from YouTube's custom format to one of the standard formats supported by the subtitle handling in the video player, it still wouldn't look the same as on YouTube because the subtitle displaying is still completely different, so we would have to implement a completely custom subtitle displayer too and everything together is a massive amount of work.

So to summarise what you are saying is not a bug and has nothing to do with this issue, it's a feature request that requires a massive amount of work.

absidue avatar Sep 05 '25 17:09 absidue

@ArthurKun21 are you still experiencing this on normal videos. Videos that dont use custom subtitles like the mkbhd one you linked

I don't have a specific video right now, but yes still experiencing it.

ArthurKun21 avatar Nov 29 '25 02:11 ArthurKun21

Hmm. @ArthurKun21 Can you link a video just for extra confirmation? I've only ever had this issue on custom subtitles, i.e. .ytt/.ass subtitles. I recently made a video that uses normal .srt captions and they work completely fine when I load it up on FreeTube. The other example you posted since the MKBHD video have used custom subtitles, as it has two captions with top and bottom-center alignment. It'd be nice if you could give us another example if you can, thank you.

PostScriptReal avatar Nov 29 '25 02:11 PostScriptReal