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

[Bug]: Rewinding, entering/exiting Full Window/Fullscreen mode, and turning CC on/off reduces the captions font size #3920

Closed
5 of 6 tasks
UnconsciousBlaringHuman opened this issue Aug 21, 2023 · 37 comments · Fixed by #4978
Labels

Comments

@UnconsciousBlaringHuman
Copy link

UnconsciousBlaringHuman commented Aug 21, 2023

Guidelines

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

Describe the bug

  1. Go to any video with captions (official or auto-generated).
  2. Activate the subtitles.
  3. Go fullscreen (FS), or full window (FW) mode, or let it play for a few seconds so that you can rewind it two times with the arrows (rewinding once or with J doesn't always cause this behaviour).
  4. (Optional) Pause the video (CC still active) and change from regular window mode to FW and/or FS a couple of times.
  5. Captions font size will be smaller for one or a few blocks, and the more you do the actions in 3 and particularly 4, the smaller they get.

Expected Behavior

Constant font size throughout the video regardless of going FW/FS or how many times I've rewinded.

Issue Labels

inconsistent behavior, visual bug

FreeTube Version

v0.19.0

Operating System Version

Windows 10 version 1909

Installation Method

Portable

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

v0.18.0, 11eee77 (nightly 3109)

Additional Information

Not particularly important, I believe, but an annoyance nonetheless.

FWIW, I selected the "Portable" installation method because the file I downloaded was "freetube-0.19.0-win-x64-portable.7z" and then, of course, unpacked it. I believe I chose the right method, but it's probably better to clarify it here.

Also, the nightly mentioned in "Last Known Working FreeTube Version (If Any)" was the version I was running before updating to the current version [1], I didn't go back and try nightlies until I found the last one where that didn't happen.

[1] Kind of a lie. I updated to v0.18.0, nightly 3263 (faa35d3) a couple of days ago hoping to fix a "Local API Error" thingy that made multi-track videos play in the wrong language, which is no longer a problem in the current release, but this caption behaviour was already happening and the "Local API Error" wasn't solved so I went back to nightly 3109.

Potato recording of the bug in action because I couldn't figure out how to copy the mp4 out of the mkv so I just used VLC.

freetube_captions_bug.webm

Nightly Build

@zipfile6209
Copy link

zipfile6209 commented Aug 23, 2023

I have the same bug... or so I think because it happens to me the other way around, it gets bigger. I will try to explain my case with my words, in case it helps and it is not necessary to open another issue:

Resizing the internal playback window (either to a larger or smaller size) in any way causes the subtitle fonts to increase in size. I can play it 100% of the time immediately, whether they are new videos or not, elapsed 0 seconds or 10, resize 1 pixel or... many.

The bug only applies to the text line that is currently displayed, the rest of the lines are and will be fine, at least if they are not resized when displayed. The bug lines are also not correctly aligned. The bug lines will retain their state even if I go forward/backward in the video and then return to them. Exiting and re-entering the video restores them.

Edit: Using time jumps also causes it, for the subtitles of the current time and those of the target time.

Version:v0.19.0
OS:Linux mint 21.2
Installation Method:Flathub
Primary API used:Local API

@mimuki
Copy link

mimuki commented Aug 27, 2023

I also have subtitle sizing issues. Resizing the window, like when entering/exiting fullscreen always causes it, and it usually goes back to normal after the next bit of subtitle appears. I also intermittently get other issues with text being too big or off centered, which sometimes persists for the entire video. you can see both in this video: https://imgur.com/a/bUlbFFu

@ChunkyProgrammer
Copy link
Member

Can you give a link to a video where you get this issue?

@UnconsciousBlaringHuman
Copy link
Author

Can you give a link to a video where you get this issue?

Do you mean me or the other guys? If it was me, this was the video I used in the example (most of the videos in this channel are subtitled, so you'd see the bug in action in any of them, but, as I said, it doesn't even need to be official subtitles, it happens with auto-generated ones as well).

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2023

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@steanne
Copy link

steanne commented Oct 10, 2023

mine get larger, not smaller, but then i have a rather odd resolution. i wonder if this is specifically getting smaller on especially wide screen, bigger on especially tall screens, and the people with the proportions the app expects are not seeing a problem.

this is still present in 0.19.1.

@mimuki
Copy link

mimuki commented Oct 10, 2023

that's an interesting theory! my captions are getting bigger with on a 1366x768 screen, which i know isn't the most common resolution in 2023

@zipfile6209
Copy link

It also persists for me. As I mentioned in my case it also gets bigger, but I have a boring 1920x1080@60fps.
Freetube reports that the internal player is 1215.14x683.516.

@Lanchon
Copy link

Lanchon commented Oct 19, 2023

hi @ChunkyProgrammer,

thanks for your work on freetube.

in my case it happens always with all videos. clearly subtitles are rendered after video is resized to the screen, and if you resize the video viewport in the screen, subtitles that were already rendered are not re-rendered.

to replicate:

  • open any video in windowed mode
  • hit play
  • enable subtitles
  • with subtitles showing, switch to full screen
    • expected: currently displayed subs instantly resize up with video viewport.
    • reality: currently displayed subs remain same size as before and at the same screen distance from the upper left corner of video viewport. this means, subs are small and in the middle of the video. as new sub lines are rendered, they are rendered correctly for the resized viewport. interestingly, if you rewind the vid, the previously incorrectly rendered subs are still incorrectly rendered, hinting some kind of render cache is in action.
  • next, with subtitles showing, switch back to windowed mode
    • expected: currently displayed subs instantly resize down with video viewport.
    • reality: currently displayed subs are not visible, possibly because were rendered for a bigger viewport and now they lie outside of the smaller viewport.

some options to fix:

  1. render subs on video frame before resizing the video frame to the on-screen viewport.
  2. or else invalidate all already rendered subs whenever the video port is resized.

thank you!

Copy link
Contributor

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@npn225
Copy link

npn225 commented Nov 17, 2023

Please do NOT close this issue! I am facing this same exact problem where the closed captions will shrink whenever hit the left-arrow button in order to rewind the player!

@Charsy89
Copy link

A quick grep -ril for "subtitle" or "caption" leads me to src/renderer/components/ft-video-player/ft-video-player.js.
Briefly looking over the code, I suspect it could be an upstream issue, but I'm going to try debugging this.

@npn225
Copy link

npn225 commented Nov 21, 2023

A quick grep -ril for "subtitle" or "caption" leads me to src/renderer/components/ft-video-player/ft-video-player.js. Briefly looking over the code, I suspect it could be an upstream issue, but I'm going to try debugging this.

Thank you, @Charsy89!

Also, here's another bit of information that may be helpful: Once the issue starts, turning the captions on and off using the "c" keyboard button, perpetually shrinks the captions until they are unreadable!

Hope this additional information helps! Please feel free to ask for any more info you need me to provide!

@Charsy89
Copy link

A quick grep -ril for "subtitle" or "caption" leads me to src/renderer/components/ft-video-player/ft-video-player.js. Briefly looking over the code, I suspect it could be an upstream issue, but I'm going to try debugging this.

Thank you, @Charsy89!

Also, here's another bit of information that may be helpful: Once the issue starts, turning the captions on and off using the "c" keyboard button, perpetually shrinks the captions until they are unreadable!

Hope this additional information helps! Please feel free to ask for any more info you need me to provide!

I use that button too. Convenience is nice!

Here's the result of some testing with the development branch and my system installation of FreeTube:
freetube-testing.txt

The general issue seems to be when subtitles are "replayed" with a font size other than 100%.
This could be jumping back in the video timeline so that the subtitle is displayed a second time, or changing subtitle settings when a subtitle is visible.
The results at the end seem to indicate some sort of a math issue.
I'm not sure what the difference is between the system installation and the development branch. Perhaps it has to do with client history? My database probably runs back to 0.15.0 or 0.16.0. Perhaps I'll try a clean installation on a VM tomorrow.

@zipfile6209
Copy link

I can reproduce it, the bug disappears when I set the font size at 100% and reappears when I change it.

It seems that the reason some see an increase and others a decrease depends on whether it is set higher or lower than 100%.

@npn225
Copy link

npn225 commented Nov 21, 2023

A quick grep -ril for "subtitle" or "caption" leads me to src/renderer/components/ft-video-player/ft-video-player.js. Briefly looking over the code, I suspect it could be an upstream issue, but I'm going to try debugging this.

Thank you, @Charsy89!
Also, here's another bit of information that may be helpful: Once the issue starts, turning the captions on and off using the "c" keyboard button, perpetually shrinks the captions until they are unreadable!
Hope this additional information helps! Please feel free to ask for any more info you need me to provide!

I use that button too. Convenience is nice!

Here's the result of some testing with the development branch and my system installation of FreeTube: freetube-testing.txt

The general issue seems to be when subtitles are "replayed" with a font size other than 100%. This could be jumping back in the video timeline so that the subtitle is displayed a second time, or changing subtitle settings when a subtitle is visible. The results at the end seem to indicate some sort of a math issue. I'm not sure what the difference is between the system installation and the development branch. Perhaps it has to do with client history? My database probably runs back to 0.15.0 or 0.16.0. Perhaps I'll try a clean installation on a VM tomorrow.

Hey @Charsy89,

Similar to @zipfile6209, I can also reproduce your findings on my installation of FreeTube as well!

When the font size for the closed captions is set lower than 100%, then pressing the arrow keys or the c-keyboard-button will cause the caption size to repeatedly shrink!

When the font size for the closed captions is set higher than 100%, then pressing the arrow keys or the c-keyboard-button will cause the caption size to repeatedly grow!

Thanks for this discovery and please continue to let me know if there is any way I can assist you in fixing this issue!

@Charsy89
Copy link

Charsy89 commented Nov 23, 2023

I used a Debian 12.2.0 installation with Xfce.
The bug reappears on a clean system (.deb) installation of FreeTube (nightly 3663). For broader results, I went and installed development dependencies and ran npm run dev on development (19c7a24), and the bug disappeared. A build issue???
To confirm my suspicions, I built the development branch (npm run build) and installed it (.deb) cleanly on the system (purged the old one, deleted local data in ~/.config), and surprise, the bug reappears.
I'm not sure I could track this down, webpack isn't something I'm too skilled at.
Any ideas?

This comment has been minimized.

@npn225

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@steanne

This comment has been minimized.

This comment has been minimized.

@Lanchon

This comment has been minimized.

@junglized
Copy link

junglized commented May 30, 2024

Same here in FreeTube 0.20 beta. It seems that if captions are set to different size than 100%, after each "c" press, they shrink/expand by percenteage they're set to. I.E. captions set to 50% shrink by half everytime "c" is pressed. After some amount of key presses they come back to original setting and then start shrinking/expanding again in a loop. The same thing happens when rewinding.

@starbullets
Copy link

this has been an issue for me ever since i started using freetube. i have my captions set to 75% by default (100% are too large most of the time, 75% is easier on my eyes), but anytime i use the arrow keys to go back, the subtitles shrink smaller and smaller each time i replay that line of subtitles. it actually only seems to shrink the subtitles whenever i rewind, though. it never happens to me when the subtitles are set to 100% though, so i have to assume it has something to do with the size being set to something other than 100%.

@efb4f5ff-1298-471a-8973-3d47447115dc

Will be fixed next release!

@g04etc
Copy link

g04etc commented Jun 23, 2024

Just tested this on a clean install of 0.21 beta and I'm still facing the issue. screenshot of the version and video of the issue attached.

Captions.Test.mp4

Screenshot 2024-06-22 231912

Let me know if I can do anything to help.

@junglized
Copy link

I can confirm the issue is till there in 0.21.

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Jun 24, 2024

Will be fixed next release!

Had to be more precise. Will be fixed in v0.22.0

Copy link
Contributor

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@Lanchon

This comment was marked as duplicate.

Copy link
Contributor

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

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

Successfully merging a pull request may close this issue.