Code Monkey home page Code Monkey logo

skip-silence's Introduction


Availible on chrome web store

Skip Silence

"Skip Silence" is a browser extension that allows you to autmatically 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 availible through the chrome web store. You can also install this extension on Chrome by downloading the source from GitHub and loading the unpacked extension through "chrome://extensions" as a "Temporary Add-On".

Why is Firefox unsupported?

"Skip Silence" uses JavaScript's video.playbackRate and MediaSourceElement simultaneously to achieve its effect. Unfortunately, Firefox currently has a bug that stops video.playbackRate from working when already using MediaSourceElement - making this extension useless.

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.

Settings popup

You can now:

  • Click the big red 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
    • Additionally, on supported websites, the VU Meter can be yellow. This indicated that a silent part is comming up but hasn't been reached yet
    • The red line represents your current volume threshold

Settings popup when in use

Limitations

  • Will only work when the tab is in focus. It will not work if the tab is in the background as it needs to do quick calculations which the browser will suspend for background tabs
  • On websites that don't support the "pre-buffering" feature, the first few samples after a silent part may be skipped or will clip
  • 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. If the media source supports it, the extension will clone the element and play it a fraction of a second further than the current progress (the "pre-buffer" feature). This way, the extension can already detect what is going to happen then and can act accordingly, e.g. slow down the video before the silent part ends as to not skip the first few words after. On some websites (e.g. YouTube) this "pre-buffering" is not possible though, as their media elements can not be cloned. This unfortunately results in the first few samples of audio after a period of silence will still be sped up, making words hard to understand.

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

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.