FreeTubeApp / FreeTube

An Open Source YouTube app for privacy
https://freetubeapp.io/
GNU Affero General Public License v3.0
13.6k stars 854 forks source link

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

Closed UnconsciousBlaringHuman closed 2 months ago

UnconsciousBlaringHuman commented 1 year ago

Guidelines

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

UnconsciousBlaringHuman commented 1 year ago

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[bot] commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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:

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!

github-actions[bot] commented 1 year ago

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 commented 1 year ago

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 commented 12 months ago

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 commented 12 months ago

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 commented 12 months ago

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 commented 12 months ago

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 commented 12 months ago

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 commented 11 months ago

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?

github-actions[bot] commented 11 months ago

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 commented 11 months ago

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!

github-actions[bot] commented 9 months ago

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 commented 9 months ago

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: @.***>

npn225 commented 9 months ago

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!

github-actions[bot] commented 8 months ago

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] commented 7 months ago

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] commented 7 months ago

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 commented 7 months ago

unstale!

github-actions[bot] commented 6 months ago

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 commented 6 months ago

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

junglized commented 5 months ago

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 commented 4 months ago

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 commented 4 months ago

Will be fixed next release!

g04etc commented 4 months ago

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.

https://github.com/FreeTubeApp/FreeTube/assets/498434/57f8b711-3c65-4bb6-8283-b9b9ef68e894

Screenshot 2024-06-22 231912

Let me know if I can do anything to help.

junglized commented 4 months ago

I can confirm the issue is till there in 0.21.

efb4f5ff-1298-471a-8973-3d47447115dc commented 4 months ago

Will be fixed next release!

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

github-actions[bot] commented 3 months ago

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 commented 3 months ago

still an issue

github-actions[bot] commented 2 months ago

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.