-
Notifications
You must be signed in to change notification settings - Fork 544
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
Adds adaptive speed functionality #583
base: master
Are you sure you want to change the base?
Conversation
Press A to toggle adaptive speed. The speed then increases to double the preferred speed if video is silent and goes back to preferred speed if it is not silent anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this feature, thanks so much for the time you put into it!
Sorry for the delay getting it merged, there are a couple of things holding it back that have nothing to do with the request itself so please be patient with us!
First is the big one, #595 has to be resolved before we can merge. Once that's done, I'm sure we'll have some merge conflicts that we'll have to work through.
Second one, I haven't had the chance to pull this and test it to make sure it works on a handful of the usual big websites from my machine.
Thanks for your contribution and patience!
inject.js
Outdated
} | ||
} | ||
}); | ||
} | ||
|
||
function toggleAdoptiveSpeed(v, controller) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you may have meant to name this toggleAdaptiveSpeed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right.
inject.js
Outdated
tc.adaptiveSpeedAnalyserNode.getFloatFrequencyData(myDataArray); | ||
var dbValue = Math.max(...myDataArray) + 100; | ||
var quietZone = 45; | ||
var eps = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does eps
stand for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I Thought of Machine epsilon. https://en.wikipedia.org/wiki/Machine_epsilon
But i think it should be named different. I just wanted to have a buffer zone so the speed does not jump around all the time.
I tried this out as-is without updating it, and I can't seem to get it to work? Can you provide steps for testing? |
All of the big changes that required this to be put on hold are behind us now. I've slated for 0.7 release if we can get it worked out before then. @newice Can you confirm with me how I can test this enhancement? |
How to test the enhancement:
Nothing else needed to set up.. @ChadBailey Did you have any errors in the console? I also addad a new button to the overlay controls. you can click it instead of the key. |
I was able to activate it, but in my tests it didn't actually do anything. I assume maybe it was just the lack of sufficient silence in the videos I tried? I'm unsure. This is why I was hoping for exact steps, like set the settings this way, go to this website, activate, from 0:00-1:50 you should see 1x speed, from 1:50-1:55 you should see 2.5x speed, etc. |
This video is silent between the speaking: https://www.youtube.com/watch?v=kcs82HnguGc
Youtube hides the controls so you maybe don't see the change. Keep the mouse over the video moving to always see the current speed. |
thanks for the steps for testing. sorry for the delays in getting back to you, i've been busy with COVID-19 related tasks. i plan to test this soon |
Finally i was able to update my pullrequest. So if anyone has the time i would appreciate a feedback. |
Instead of using Preferred Speed as the normal speed, use lastSpeed. So the user has the full control on which speed to watch and still the silent parts are fast forwarded at adaprive speed.
@newice this is, fascinating! I took for a quick test drive, a few questions..
|
while increased speed is active due to low audio level
This is strange. I never had the speed go to 0.0 For the silent phases i changed the speed from two times the prefered speed to an own setting whichyou can set in the plugin options. Default is 3. Maybe the setting is missing for some reason?
No unfortunately i have no experience in extended performance testing. activating the adaptive speed for the first time after page load usually takes about 0.1 second for me. |
when using adaptive speed
@newice @igrigorik @ChadBailey update on this please! |
Press A to toggle adaptive speed.
The speed then increases to double the preferred speed if video is silent and goes back to preferred speed if it is not silent anymore.