Giter VIP home page Giter VIP logo

skip-silence's Introduction


Available on chrome web store Available on Firefox Addons Available on Edge Add-ons Buy Me A Coffee

Skip Silence

"Skip Silence" is a browser extension that allows you to automatically skip parts of a video that are silent. It is highly inspired by CaryKH's automatic on-the-fly video editing tool. The extension works with most websites that use HTML5 audio and video elements (like YouTube).

Demo

(Video used: Unedited part of https://youtu.be/DQ8orIurGxw?t=234)

Installation

"Skip Silence" is available through the chrome web store. You can also install this extension on Chrome by downloading the source from GitHub and loading the unpacked, built extension through "chrome://extensions" as a "Temporary Add-On".

Firefox

"Skip Silence" only has restricted support for Firefox.

On Chrome, "Skip Silence" uses a browser API to support analyzing audio on almost all websites. Unfortunately, Firefox currently doesn't support this API and thus the extension doesn't work on some websites. Take a look at open bugs for more info.

If you have problems with the extension on a website on Firefox, you can try using a Chromium-based browser like Ungoogled Chromium.

Usage

When "Skip Silence" detects a compatible element on the current page, its icon in the menubar will be colored.

Changing icon

You can now click on this icon to reveal the settings popup.

You can now:

  • Click the toggle button to enable and disable "Skip Silence" for the current page
  • Change "Skip Silence"'s settings
  • View the current volume using the VU meter
    • The VU Meter will be blue when on normal speed and green when currently in a silent part
    • The red line represents your current volume threshold

Limitations

  • Won't work on sites that use other methods to play video or audio (e.g. Spotify Web Player uses a special method to prevent songs from being downloaded)

How does it work?

The extension attaches a JavaScript audio analyser to the current video or audio source and will speed up or slow down the video using the current volume of the audio.

Open browser bugs

The extension sometimes seems to push the boundaries of what browsers can do. Due to this, some features that would be nice to have can't be implemented as the browsers contain bugs or missing features.

Current list of bugs/feature requests the extension is waiting for

Development

This extension is using the plasmo framework for developing and building.

To start development, follow these steps:

  1. Check if your Node.js version is v18 or newer.
  2. Clone this repository.
  3. Run pnpm install to install the dependencies.
  4. Run pnpm dev to start the development server for chrome or pnpm dev:firefox for Firefox.
  5. Load your extension on Chrome following:
    1. Access chrome://extensions/
    2. Check Developer mode
    3. Click on Load unpacked extension
    4. Select the build folder.
  6. Happy hacking.

Build

Requirements:

  • NodeJS 18
  • preferably pnpm but npm will also work

Run these commands in the root of the extension files:

pnpm install # or npm install
pnpm run build # or npm run build
pnpm run build:firefox # or npm run build

After the build is done, the raw contents will be placed in /build and the compacted zip will be placed in /build/[chrome/firefox]-mv2-prod.zip.

Contributing

Please fork this repository and create a new pull request to contribute to it.

If you notice any errors, please create a new issue on GitHub.

License

Licensed under the MIT License

skip-silence's People

Contributors

0xflotus avatar anotherpianist avatar antoninkriz avatar pal03377 avatar paulovgha avatar quantizr avatar siphomateke avatar vantezzen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skip-silence's Issues

Remember default playback settings

Is your feature request related to a problem? Please describe.
I'd prefer to play all videos at a certain speed and cadence by default and only have it switched back to normal occasionally.

Describe the solution you'd like
Please provide a keyboard hotkey toggle.

Describe alternatives you've considered
This extension comes close, but it doesn't actually skip silence.

https://chrome.google.com/webstore/detail/video-speed-controller/nffaoalbilbmmfgbnbgppjihopabppdk

Additional context
Like this:

Screenshot 2020-11-03 181512

video and audio become asynchronous over time

This bug can be reproduced on youtube.com with the following setup:

  • newest version of chrome and skip silence from chrome web store
  • playback speed: 1,75x; silence speed: 4x; volume threshold: 2%;
    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.

feature request: silence the audio in skipping silence portion

hi,

It would be great to silence volume in the portion Which is skipped. Right now when the video is being skipped audio portion is also being rushed in the same speed as the video silence speed setting. Now if there is no background noise this works perfectly. However if there is background noise, the rushing of audio results in a strange sound. So would really appreciate if there’s a toggle button or mute that portion.

I believe CaryKH's tool had some kind of smoothening. I never felt this jerking sound with that.

Thank you.

Add an option to auto re-wind a customizable amount of time after skipping silence

I don't know if this suggestion can be implemented, but it could potentially be helpful.

On my system (possibly on others), the higher the speedup on silent parts is, the more of the next "playback speed" part is unintentionally skipped as well.

Up to 4x is no problem, but the higher you go, the more words of the next sentence I miss. Maybe it's a driver issue on my system, but maybe others experience the same thing.

A possible remedy would be to add an option that would combine the mute function with a auto-rewind function with a user-customizable setting.

For example, if someone loses 500ms when setting the silence speed to 10x, the extension would skip the silent part muted, then go back 500ms and start playing unmuted at the "playback speed".

Add keyboard shortcuts

Is your feature request related to a problem? Please describe.
Some times you need to go back to 1x or quickly disable the extension and then re-enable.

Describe the solution you'd like
A keyboard shortcut to enable/disable the extension. (preferably the key could be customised)
Additionally, a shortcut to increase or decrease the playback/silence speeds can also be considered.

Zoom support?

I use this app often, and I've been meaning to mention that the extension doesn't seem to function on Zoom pre-recorded stuff.

Are there any known workarounds for the time being, or would support have to be explicitly added for it?

Synchronisation Problem

Describe the bug
Video and Audio becomes out of sync after some time when using skip silence
To Reproduce
Steps to reproduce the behavior:
Can be tested on any video

Expected behavior
Everything should remain in sync throughout the video

**Desktop **

  • OS: [Windows 10]
  • Browser : Chrome
  • Skip Silence Version 3

Global saved statistics

How about storing and showing global saved statistics? Currently it's only on per tab basis.

Save settings

if turned on in any video it works, but when new video selected again it has to be started by clicking icon and as there is no any option to save the applied changes, i need to every time tune the desired changes.

  1. option to auto start on any video.
  2. option to save the tuned changes so it dont need to be tuned every time

thank for making such excellent extension

kind regards.

Does'nt work at all...

I have no idea how this extension is supposed to even work, nothing activates it or anything. Im totally lost and confused

Invidious playback sped up even when there is no silence

Describe the bug
Invidious instances doesn't seem to play videos correctly, instead all of the videos (including those who don't have silence) seems to be sped up.

To Reproduce

  1. Turn on skip silence on one of the invidious instances
  2. Select a video
  3. Play the video
  4. Video speds up from the start to the end

Expected behavior
Video plays normally and speds up when there is a silence.

Screenshots
None.

Desktop (please complete the following information):

  • OS : "Windows 7 x64"
  • Browser : "Ungoogled chromium"
  • Skip Silence Version : "3"

Additional context
None.

Adaptive Volume Threshold and speed like NewPipe does, or even better.

Hello there, Bennett. Right to the point.

Would you be so kind to add an adaptive (dynamic) threshold option?
It's a part of software adaptive noise gates and dynamic range compressors in real-time digital signal processing for decades. Our task is also "real-time" processing. Presumably, no large preload or buffering needed yet.

The basic idea is to start with zero (silence) threshold and x1 speed gradually integrate the volume level of incoming samples , calculating the whole volume scale of the already played part: the highest integral level, the lowest integral level (noise/music) etc. The threshold gradually moves up to the calculated noise/music level during the whole playback. Moving back towards safe (0%) threshold has to be accelerated so no audio is lost when music/noise level dramatically decreased. Also the next trick with quiet audio speed slowdown comes handy.

Adaptive speed option can be very useful. Generally - the lower highest integral volume or (option) the higher the threshold over time is, the less FF speed is used for the user to hear better what was said.

Thanks in advance for your consideration.

Solving the skipping problem

Hi dear vantezzen,

on trying to build the same plugin I stumbled over yours. Great thanks! :) Saves a lot of time.

I wasn't sure, wether audio analysis could be done right in the browser, so I though of an aproach that might come in handy with the skipping-first-few-frames issue. And wanted to ask for your opinion about it.

It's just cloning the content of the player to a canvas (or using a node-copy) timeshifted.
I.e. doing the analysis in the original player element, which is hidden. And using the results to control the second element which actually gets displayed.

I have another feature Idea, that I will ask for in another Issue :)

Thanks again for the great extension, it is better than I had planned mine :)

Extension "breaks" when it tries playing over 16x.

Love the new custom/faster speeds but Brave (and probably other platforms) can't play above 16x speed. As far as I know this is a browser/chromium limit and not a extension bug.

But with the new speed options, when you select a speed above 16x it "locks" the threshold. Requiring a page refresh to return to normal operation.

System info just in case:

  • Windows 10 64bit
  • Brave 1.26.74 Chromium: 91.0.4472.124
  • Skip Silence 3 (3.4.0)

Please don't console.log in production

Hi,

as a developer I frequently use the Chrome Dev Console. Since the last update of this extension, it unfortunately logs out messages, often in a regular interval. Can you remove that from the extension? It is cluttering my console a bit.

To reproduce:
Go to https://example.com and look into the console.

messages in the console from Skip Silence

You can use "Hide messages from main.js" by right-clicking the filename, but that does not seem like a clean solution and the filter generated by this seems to reset itself after some time (or after a Browser restart).
Don't show main.js console out

It seems that isDebug is true in the current Chrome Webstore version of the extension.

const isDebugging = true;

Cheers!

Audio clicking while switching speeds

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:

  • Feature request: be able to manually choose any playback speed
  • If not possible, more playback speeds between 1.00x and 1.25x

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.

Settings popup not appearing after clicking icon

While the extension is working for me, I'm not able to access the settings popup menu by clicking on the extension icon. It just brings up the default chrome menu:
image

Am I maybe just doing something wrong?

mp4 file in skipsilence 2 no audio detected

Love this extension and used it a lot the last weeks. But suddenly after the update it doesnt detect the audio anymore. I activated file-url access but this does not solve the problem.
On Youtube it still works fine though. Only file Urls wont work.

Edit:
I tried using 2.0 release as well as the latest commit version:
c1f3cde
but both are not working. With 1.0 release it is working just fine.

mp4 local file

Hi,

Great add on, saves so much time, thank you for your work.

I have been successfully using this extension for weeks, for playing .mp4 videos on chrome from my hard drive.
And now all of a sudden it doesn't work anymore, The icon is still purple but when I press the big red button, the soundbar doesn't move, like there is no sound. So it is just going fast forward all the time.
I'm doing everything the same, and I didn't change anything so I don't understand why it was working perfectly all this time and now it doesn't for no apparent reason.
Maybe chrome or windows update?

It still works normally for youtube videos, but not for my local mp4 files.
And when I play the mp4 video on chrome without turning on the extension, it works normally too, with sound.
And it still works fine on my laptop. My laptop is offline so it maybe didn't have the win10 or chrome update yet.

Thank you for your help.

image

HTML5 Video Tag

What service is not compatible? (e.g. "Vimeo"): HTML5 Video Tag

Can you provide a link to a specific video where this has occurred? (i.e. can you provide the link where this happend?): every video opened direct in the browser

What is the exact problem that occurred? (e.g. "No sound detected" or "No video detected/icon is not green"): No video detected

What version of Skip Silence are you using? (i.e. 1, 2 or 3. You can find this information by opening the popup, it should be right in the title): 3

Problem is probably caused by having a source tag within an video tag instead of a src attribute.

Double video

I use chrome extension Local Media Player (i'll use "LMP" in further text) . Problem is that when I turn on your extension it plays video separately from the video playing on LMP. Even if I pause video on LMP, or turn off your extension, other video that is somehow duplicated continues. Also your extension doesn't registry it, its just playing - I dont know where. This is happening after the new update, it was all fine before.

If you can't fix it fast, or dont know how to, dont bother to do it, i'll use other player.

Not working in Coursera

Hello,

Thanks for making such a great add-on. I use it extensively on youtube.
Recently when I tried it on Coursera it doesn't work. Icon is enabled, but when I turn it on volume bar is empty. below screenshot.
image

However I did get it working a couple of times as well.
I am not sure why this works strange here.

Skip Silence doesn't work with Opera (with Install Chrome Extensions on)

The extension has been doing pretty well since I installed it about a month ago. Unfortunately, yesterday (7.07.2021) it stopped working with my browser at all, along with the new update 3.4.0.
Even though I use websites like YouTube or Microsoft Stream, the extension's icon remains blank and the user interface of this very extension cannot be opened.
I don't get any particular error messages and the extension appears to be inactive.

  • OS: Win10 64bit
  • Browser: Opera 77.0.4054.172
  • Skip Silence 3, Version 3.4.0

lip sync missing

Hi, thanks for making this excellent addon.

While skip silence enabled, I am observing a lip sync issue in youtube videos.
Audio is skipped exactly as needed, but it seems like an issue with frames are skipped differently.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://www.youtube.com/watch?v=LNHBMFCzznE and play
  2. Click on skip silence to enable it.
  3. lip sync issues come up as we watch through

Expected behavior
Clear skips silence without the lip sync mismatches.

Desktop (please complete the following information):

  • Windows 10
  • Browser: Brave, Edge
  • Skip Silence Version 3

Silence skipping in local player option glitches

I encountered error that it frequently doesn't slow down video playback whenever a audio segment starts after silence. I checked the audio volume indicator it gets stuck at zero and starts working normally automatically after some time. I also made sure that the window was always in the foreground , it still occurs.

Save settings for "Enable skip silence" and "Volume Threshold"

Is your feature request related to a problem? Please describe.
The "Enable skip silence" is automatically reset to false if I reload the page, or open a new page. The same happens to "Volume Threshold" (the playback speeds are saved).

Describe the solution you'd like
I would like that these settings are saved always. Ideally that they are carried over would be a toggle in itself.

Subtitles and content search

Hi dear vantezzen,

me again, proposing another idea :)

Speech recognition combined with a local database to be able to search for phrases in the current and all viewed videos.

My question here would be:
Do you know a way to do speech recognition in the whole video faster, than normal playback speed (in advance)?

Subtitles could be another benefit.

Port to firefox

I was just wondering if there were any plans to make it work on firefox.

VLC

hi, sorry i know this is entirely unrelated. But can this abillity be made as an addon for VLC?

i have the lectures in recorded format so, cant use this extension in this form. i have searched the web, and no solution seems to exist for VLC. it doesnt have waveform support, otherwise i'd have considered using that as an aid in manually skipping silence.

So...

sorry again, i just felt a bit helpless regarding vlc's lack of options there.

Custom Playback Speed

Is your feature request related to a problem? Please describe.
I often watch videos on speeds not listed in the app like 2.4x, 3.2x, etc. using an extension called Video Speed Controller. Because this app only allows setting predefined steps for playback speed, it constantly resets the speed I had picked and I have to manually readjust it.

Describe the solution you'd like
Let us type in any speed ratio and possibly add a keybind like the above extension to let us go up in increments of our choosing (0.05, 0.10, 0.20, 1.0, etc) without opening the full panel or command bar. It would eliminate the need to have two conflicting extensions.

Add a 10x silence speed

Is your feature request related to a problem? Please describe.
I sometimes find that 5x limit of silence speed insufficient while watching lecture videos (eg. when prof asks us to work on a problem and waits for 5 mins)

Describe the solution you'd like
A 10x or more option for silence speed would be a good solution to this

Confusing.....

So now that I got the extension to activate, no where in the tutorial does it explain how to actually the video once its been edited. Not understanding this at all.....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.