FreeTubeApp / FreeTubeApp/FreeTube
[Bug]: Custom .ytt subtitles centre placement issue
- Dominant language
- Vue
- Stars
- 21.9k
- Forks
- 1.5k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 62
Description
THIS ISSUE IS ONLY FOR THE POSITION OFFSET BUG!
### Guidelines
- [x] I have encountered this bug in the [latest release of FreeTube](https://github.com/FreeTubeApp/FreeTube/releases).
- [x] I have encountered this bug in the [official downloads of FreeTube](https://github.com/FreeTubeApp/FreeTube#official-downloads).
- [x] I have [searched the issue tracker for open and closed issues](https://github.com/FreeTubeApp/FreeTube/issues?q=is%3Aissue+sort%3Arelevance-desc) that are similar to the bug report I want to file, without success.
- [x] I have searched the [documentation](https://docs.freetubeapp.io/) for information that matches the description of the bug I want to file, without success.
- [x] This issue contains only one bug.
- [x] I have read and agree to follow the [rules](https://docs.freetubeapp.io/community/rules/).
### Describe the bug
1. Go to [this video](https://youtu.be/_h9xgN2I5Ac) (I am not promoting my own channel here, I'm using this video as it showcases this issue the best out of any others I know)
2. The default captions (English Australia) will have subtitles that are longer than 26 characters be offset to the right. This offset gets worse depending on the length.
3. Switching to the English (United States) subtitles will show a version of the previous subtitles in the EBU STL format, an [officially supported format by YouTube](https://support.google.com/youtube/answer/2734698?hl=en#zippy=%2Cbasic-file-formats%2Cadvanced-file-formats%2Cbroadcast-file-formats-tv-and-movies). Notice how the subtitles don't ever get offset there.
### Expected Behavior
Regardless of what format the video's subtitles are in, the subtitles should be right in the centre regardless of character count, if the alignment is set to be in the centre-bottom, centre-middle or centre-top.
### Issue Labels
accessibility issue
### FreeTube Version
v0.23.12
### Operating System Version
Linux Mint 22.2 (24.04.1-Ubuntu)
### Installation Method
.deb
### Primary API used
Local API
### Last Known Working FreeTube Version (If Any)
_No response_
### Additional Information
I am very well aware that you guys won't support everything that's in YouTube's proprietary subtitle format, I know I wouldn't be able to get to the bottom of that myself, so why even bother asking a development team who works in their free time to do that, knowing that it'll be a **MASSIVE** undertaking.
That aside, I've got some additional information that I think would help tremendously with solving this specific issue. Unlike ArthurKun21, who originally brought this to light, I fully understand that this only happens with .ytt subtitles, and I understand the difference between the usual subtitles and these custom ones, which Arthur was confused on.
Like I said earlier, subtitles using the .ytt format will not go properly in the centre if it surpasses 26 characters, if it's lower than that, this doesn't happen. However I discovered an interesting thing today regarding this, if you created a second line made up of blank, invisible letters on any offending subtitle line, the issue is mitigated a bit. I have two comparison images showing this:
Original:
Mitigated:
You can find this version of the subtitles by selecting the 'American Sign Language' captions.
That being said, I think a good workaround to this issue might be over-riding the position of the captions when at centre alignment (as this issue doesn't occur when the subtitle has its alignment set to the left or right) and making it go to the left depending on some math once a line goes past 26 characters.
### Nightly Build
- [x] I have encountered this bug in the latest [nightly build](https://docs.freetubeapp.io/development/nightly-builds).
Contributor guide
Assessment
This issue has not been assessed yet.