vantezzen / skip-silence

🔇 Browser extension to skip silent parts in videos and audio files on any webpage
https://vantezzen.io/get/skipsilence
MIT License
410 stars 40 forks source link

Audio clicking while switching speeds #52

Open Manwithpants812 opened 3 years ago

Manwithpants812 commented 3 years ago

A 1.00x playback speed having a lot of audio clicking, I noticed that when having 1.25x, audio clicking is almost entirely gone. Since there's no other speeds between 1.00x and 1.25x, would it be possible to implement a 1.01x and see if it gets rid of the clicking entirely? If you try this and it doesn't work, would it still be possible to implement manual playback speed so I could set any arbitrary playback speed? Sometimes I feel like 1.25x is too fast so I'd like to see if 1.10x would be nicer. Muting silence doesn't seem to get rid of the clicking entirely so this is why I'm making this request.

In short:

Thanks for this extension, it's saved a lot of time. It's just awesome to have.

Edit: I've now realized more people have requested this so I'm sorry for the double posting. Either way, this may let you know that 1.01x could be a possible permanent solution for the audio clicking.

goyalyashpal commented 3 years ago

as for the edit, can u please link the other issues where u saw this requested? and also, duplicates shall be closed regardless and the input moved over to the former existing issue.

Manwithpants812 commented 3 years ago

@yashpalgoyal1304 I haven't seen specifically the 1.01x point of my post as a possible definitive solution for clicking noises but I've seen "please provide us with more speed options" comments.

vantezzen commented 3 years ago

@Manwithpants812 That you for your request, in my tests this seems to mostly solve the audio clicking!

I just added a custom speed value option (#38) that allows better testing of these things, but I also (at least temporarily) added code that will set the speed to 1.01 when trying to set to 1 to further test this (https://github.com/vantezzen/skip-silence/commit/a5de47aa6f1047d1a7e28d168703cf4ade798e28).

These changes are currently only in this repo but will be released in the next update

goyalyashpal commented 3 years ago

what is clicking though? 😅

Manwithpants812 commented 3 years ago

@vantezzen Thank you for looking into this! After testing the new 1.01x=1.00x setting with 3.4.1, I've now found that 1.01x does fix the clicking, but unfortunately it introduces audio desyncing every time there's a speedup, and the audio desyncs further and further every time there's a speedup. I've found this to be true on YouTube and via the local player reading an mp4.

Here's a quick example to gauge this https://www.youtube.com/watch?v=YXlfjzl-CFw Win10 - Chrome 64-bit 90.0.4430.212 Settings: 1x (From dropdown) Volume Treshold: 10% Sample Treshold: 10 samples

I should've seen this kind of coming and I'm embarrassed I've proposed something that perhaps turned out to be an inconvenience. Whenever I used 1.25x, the same effect happened, it would also start to desync further and further at every speedup so this same thing happening at 1.01x is something I should've thought would happen as well but didn't. I'm sorry about that. For example, this desyncing behavior can also be observed in the video above with 1.25x and the same settings.

I'm not sure what the solution would be if you'd want to keep 1.01x to avoid clicking. With 1.00x, it worked without desyncing despite the clicks. I guess at this point clicking is the lesser of the 2 evils.

This extension is a precious time saver that I use every day so thank you again for making this and looking into this.

vantezzen commented 3 years ago

The desync is a known issue (expecially with longer videos), but there is a possible fix at https://github.com/vantezzen/skip-silence/issues/28#issuecomment-726030595 and I'll be looking into implementing a build-in fix soon, so hopefully we can avoid both Chromium bugs.

sidboy99 commented 3 years ago

@vantezzen I still notice the clicking sound using skip silence 4.. Using brave with the following settings on skip silence: 1x playback 10 samples using both manual volume and the beta feature for volume threshold Tried all skip silence speeds from 4x to 10x

Also tried the 1.01x hack proposed here but it makes a very minor difference, the click is still very noticable. Any way to fix this?

PS. Newpipe does this very very well with zero clicking sounds, I'm not familiar with the code but you might want to give it a look if you haven't.

vantezzen commented 3 years ago

@sidboy99 Thank you for the report - I'll reopen this issue and investigate if I can find a solution.

The cause of this bug is in Chromium itself as their audio manager will produce these clicks while switching speeds. The only thing Skip Silence can do here is to try to circumvent this bug from triggering.

sidboy99 commented 3 years ago

@sidboy99 Thank you for the report - I'll reopen this issue and investigate if I can find a solution.

The cause of this bug is in Chromium itself as their audio manager will produce these clicks while switching speeds. The only thing Skip Silence can do here is to try to circumvent this bug from triggering.

@vantezzen There is another extension called Jump Cutter on the chrome store that somehow manages to minimize this clicking really well though, (by setting a margin before to zero on the extension)

WofWca commented 3 years ago

@sidboy99 Idk, that extension also only utilizes the 1.01 hack.

sidboy99 commented 3 years ago

@WofWca Ah I see now, what worked was turning off the mute silence feature, (which jump cutter doesnt even support). I guess its muting and unmuting the bits is what is causing the clicking, maybe playing around with volume thresholds and muting silence only when required might be a possible workaround. Right now skip silence does the job fine in low volume thresholds and keeping silence unmuted.

SubGi commented 3 years ago

I dont know why but the clicking problem doesn't exist in Skip Silence version 3.4.1. I tried using all playback speeds with mute silence on and there was absolutely no problem.