Increase (youtube flash) video's sound volume by means of JavaScript

Viewed 27791

Background story: many users (including me) browse the web from notebooks that are not constructed for sound performance. That means (besides other things) that the sound volume for most videos is too low, especially if the video itself is recorded at low volume.

Therefore...

I was wondering if there is any way of increasing the volume of such a video (especially Youtube, but could be extended to other types), because I'm interested in doing it and even publishing it as Firefox/Chrome/other browser plug-in.

Or, alternatively, if you know such a plug-in do not hesitate to post the link here.

5 Answers

I found this

javascript:((v,a=new AudioContext(),g=a.createGain())=>(window._g??(c=>(a.createMediaElementSource(document.querySelector('video'))[c](g),g[c](a.destination),window._g=g))("connect")).gain.value=v??1)(parseFloat(prompt("Enter gain level",window._g?.gain.value)));

If you are using Chrome, then you can:

  • Right-click and choose Inspect. Or simply press F12.
  • Go to Console.
  • Paste this code.
  • Press Enter.
  • A message will appear, type what level you want (0.5 - 1 - 2 - 3 - ...), and press Enter.

For more about AudioContext.createGain(): Go Here

Related