Skip to content
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

Suggestion: allow forced playback speed for everything /but/ music #1538

Closed
samyk opened this issue Jan 16, 2023 · 6 comments · Fixed by #1539
Closed

Suggestion: allow forced playback speed for everything /but/ music #1538

samyk opened this issue Jan 16, 2023 · 6 comments · Fixed by #1539
Labels
Feature request Wish or idea help wanted Just an old github standard we add automatically. (The team can remove it when working on it.)

Comments

@samyk
Copy link
Contributor

samyk commented Jan 16, 2023

PROBLEM: I like to watch all videos on 2x unless it's music, which I just want on 1x. Ideally the forced playback speed setting would have the ability to be set for all videos, or all videos except specific "categories" such as music.

SOLUTION: A quick look shows like most music is categorized in a programmatic way so I believe we can just look for document.querySelector('h3#title')?.innerText === 'Music' as a first pass if we want to allow playback speed for all but specific categories.

There also is a tags list in the JSON output of youtube-dl -s --print-json and in some videos I've seen where there isn't a title, but there is typically a tag of "music" so either would be fine, but I haven't seen how to access those attributes from the DOM yet (it's possible another request needs to be made but I'm not sure yet). I didn't see the tags in the Network requests section of Dev Tools when hitting the video or in the DOM so it may require another request.

ALTERNATIVES: This could be written in different ways depending on how others might like a feature like this, such as "adjust speed on all but [categories]", or "adjust speeds on only [categories]", or two different speeds for either, but I'm going to go with the guess that most people who do adjust speed don't want to do it (normally) for music, so I'm okay with this as a less flexible "adjust speed on all but music" for now for simplification of the implementation and less clutter in the IT4YT options window.

RELEVANCE / SCOPE: No, probably a small subset of people want videos increased in speed, but I believe almost anyone who does take advantage of that feature would want to take advantage of this, and I'd suggest it be the default option when someone forces playback speed.

"SIDE EFFECTS": Not that I know of.

@samyk samyk added Feature request Wish or idea help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) labels Jan 16, 2023
@samyk
Copy link
Contributor Author

samyk commented Jan 16, 2023

PR submitted #1539

@ImprovedTube
Copy link
Member

ImprovedTube commented Jan 16, 2023

Thank you! @samyk

  • Within the category music, we can keep speeding up those videos with the word "interview" (#551) in title or tags.

probably a small subset of people

i kept being surprised how popular/legendary speed-watching/listening is.
(Hope the speed doesn't stress. Does it compete with inspiration / quality?)

  • what about dynamic speed? speeding up easy sentences with short/common words. And skipping sliences.

    • the "viewer-histogram" can also give interesting automatable clues (#1463) Youtube's Timeline Histogram

#1636

@samyk
Copy link
Contributor Author

samyk commented Jan 16, 2023

Ahh interesting thoughts! Agreed on interview...maybe I'll add that adjustment next time I'm in the codebase, or possibly have it be based off of a regexp while having that regexp also be user-modifiable for advanced users.

Do you happen to know how to get the JSON data that youtube-dl gets?

(Haha speed-watching; I started increasing listening to audio-books and non-fiction-videos by bumping up 0.25x increments until it felt "normal", so now below 2x (or 2.5-3x for a slower talker) becomes frustrating...but friends make fun of me for it, and it definitely just takes some practice (sort of like speed reading))

Cool ideas with silences, I like that! I think we'll need to preprocess the audio via JS since I'm not sure if YouTube has other information on the amplitude at diff times but that would be fun.

Regarding histogram, could be fun to add a "Highlight" button to the player controls that jumps to the highest peak.

@ImprovedTube
Copy link
Member

ImprovedTube commented Jan 17, 2023

practice

preprocess the audio

(unless using transcripts only)

https://github.com/vantezzen/skip-silence (MIT license!) (#921)


"Highlight" button

~= jumping to peaks in order, if they are similar in height or similar area covered above the mean, ...
(Or reducing speed at peaks, increasing in valleys, ... )

data ... youtube-dl

no yet, <meta itemprop="genre" content="music" <meta itemprop="interactionCount"

tags.

  • <meta name="keywords" content="....">

document.querySelector('meta[name="keywords"]').content
or
document.body.getElementsByTagName("script")[0].innerHTML
"videoDetails": { "keywords": [ (in the middle of 500kb JSON mostly "adPlacement":{400kb}, "translationLanguages")

@msangjunboon2018
Copy link

why?

ImprovedTube added a commit that referenced this issue Mar 21, 2023
@ImprovedTube
Copy link
Member

testing the feature while awake too long, i actually didnt notice listening half of a 10 minute Keynote at 2.4x . Was easy to digest :-O

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Wish or idea help wanted Just an old github standard we add automatically. (The team can remove it when working on it.)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants