-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
video and audio become asynchronous over time #28
Comments
Seems to be a Chromium bug. Same happens if you just rapidly change speed between values other than 1. v = document.querySelector('video');
setInterval(() => v.playbackRate = 2, 200);
setTimeout(() => setInterval(() => v.playbackRate = 1.1, 200), 100); |
Manually skipping back synchronises video and audio. This may lead to a workaround. Maybe skip back 0.01s every minute? |
thanks, i was searching for a solution 👍 |
Encountered the same bug on several videos (360p30fps..1080p60fps). The longer the video, the more obvious it gets. The machine is quite fast (intel core i3 gen8 CPU, OS on Samsung EVO m.2 SSD, 32 Gb DDR4, no background processes etc., real 100mbit unrestricted internet connection). Silence is muted, silence speed is 10x, playback speed is 2x. Playback is HW accelerated with Intel integrated video decoder. Technically, for desktop mode of YouTube and Chrome audio and video are separate streams with independent decoding threads. Maybe there are some lost speed change messages, some rounding error, time quant difference or plain inability of video decoding thread to rewind at 10x speed starting at any frame due to the nature of key-frame based video coding. Example of first 24 minutes of 2 hour long video with very little action on the screen Pinging r11.sn-axq7sn7s.googlevideo.com [173.194.2.29] with 32 bytes of data: { |
I am also experiencing this issue. I tried the workaround @iy7u6le2 mentioned using the following code and I can confirm that it works as a temporary workaround 👍 v = document.querySelector('video');
setInterval(()=> {
v.currentTime = v.currentTime - 0.01;
}, 60000); |
Hey, I am a total newbie and have been experiencing this same problem, do you know where i can paste this code into or if i can install your skip silence extension with this setting. |
@aeseok open developer tools in the browser (F12), paste it in the console. |
@WofWca Thanks, is there a way to set this up happen automatically whenever I play a YouTube video |
@lijovklm Can't think of a reasonable way. |
@lijovklm You could try using a script extension like Tampermonkey to execute this automatically. |
@pixelzery If my tests are correct, it looks like we don't even need to change the time so doing this also works:
This requires Chrome to recalculate the current position and allows the desync to disapear Could you tests this too? I might want to implement something like this into Skip Silence and it would be good if we don't skip back every time. |
Good news for Firefox users: synchronization doesn't seem to be a problem like it is in Chrome, at least in my tests. |
Option is implemented as "Keep Audio in Sync" but will be hidden on Firefox to not confuse users there. It will automatically execute the code metioned above every 5s. The feature will be released with Skip Silence 4. I couldn't find a Chromium bug report yet so I opened a new report as well so this bug will hopefully be fixed at the root instead of needing the script: https://bugs.chromium.org/p/chromium/issues/detail?id=1231093 |
@vantezzen I tested a bit with the suggested code. |
After almost 4 years, this will finally be fixed by the Chrome team - released with Chrome 128: https://issues.chromium.org/issues/40190553 |
This bug can be reproduced on youtube.com with the following setup:
duration threshold: 10 samples; pre-buffer time: 100ms
Thank you for this extension. It is extremely useful. I have seen carykh's video about his python program and eagerly waited for someone to program it exactly this way.
The text was updated successfully, but these errors were encountered: