FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

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

Open UnconsciousBlaringHuman opened this issue 2 years ago • 37 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 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

UnconsciousBlaringHuman avatar Aug 21 '23 21:08 UnconsciousBlaringHuman

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

zipfile6209 avatar Aug 23 '23 11:08 zipfile6209

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

mimuki avatar Aug 27 '23 01:08 mimuki

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

ChunkyProgrammer avatar Aug 30 '23 01:08 ChunkyProgrammer

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).

UnconsciousBlaringHuman avatar Sep 04 '23 17:09 UnconsciousBlaringHuman

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.

github-actions[bot] avatar Oct 03 '23 01:10 github-actions[bot]

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.

steanne avatar Oct 10 '23 04:10 steanne

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

mimuki avatar Oct 10 '23 04:10 mimuki

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.

zipfile6209 avatar Oct 11 '23 19:10 zipfile6209

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!

Lanchon avatar Oct 19 '23 19:10 Lanchon

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.

github-actions[bot] avatar Nov 17 '23 01:11 github-actions[bot]

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!

npn225 avatar Nov 17 '23 02:11 npn225

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.

Charsy89 avatar Nov 21 '23 02:11 Charsy89

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!

npn225 avatar Nov 21 '23 02:11 npn225

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.

Charsy89 avatar Nov 21 '23 03:11 Charsy89

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%.

zipfile6209 avatar Nov 21 '23 03:11 zipfile6209

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!

npn225 avatar Nov 21 '23 03:11 npn225

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?

Charsy89 avatar Nov 23 '23 01:11 Charsy89

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.

github-actions[bot] avatar Dec 21 '23 01:12 github-actions[bot]

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.

This is still an issue! Please do NOT allow it to be closed before it's been fully resolved!

npn225 avatar Dec 21 '23 02:12 npn225

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.

github-actions[bot] avatar Jan 24 '24 01:01 github-actions[bot]

still an issue

On Tue, Jan 23, 2024, 10:46 PM github-actions[bot] @.***> wrote:

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.

— Reply to this email directly, view it on GitHub https://github.com/FreeTubeApp/FreeTube/issues/3920#issuecomment-1907212242, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6LEVK372TSL6LW4B3QBXTYQBRYZAVCNFSM6AAAAAA3Y65RGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBXGIYTEMRUGI . You are receiving this because you commented.Message ID: @.***>

Lanchon avatar Jan 24 '24 01:01 Lanchon

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.

I agree with @Lanchon! Please do NOT close this issue as it is still affecting users! Thank you!

npn225 avatar Jan 24 '24 02:01 npn225

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.

github-actions[bot] avatar Feb 22 '24 01:02 github-actions[bot]

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.

github-actions[bot] avatar Mar 22 '24 01:03 github-actions[bot]

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.

github-actions[bot] avatar Apr 20 '24 01:04 github-actions[bot]

unstale!

steanne avatar Apr 20 '24 02:04 steanne

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.

github-actions[bot] avatar May 19 '24 01:05 github-actions[bot]

dear stale bot, please fix this issue within the next 28 days so you can finally close it and climax.

Lanchon avatar May 20 '24 07:05 Lanchon

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.

junglized avatar May 30 '24 19:05 junglized

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%.

starbullets avatar Jun 21 '24 05:06 starbullets