How to make YouTube (or other video websites) louderNovember 24, 2017
Sometimes I find a YouTube video of a conference talk that’s just too quiet. Even when it’s set to maximum volume, with Windows set to maximum volume, it’s still too quiet.
In the Developer Tools, click on the Console tab.
Click in the empty white space after the > symbol. Now you can type or paste code into the console.
Copy this code and paste it into the console.
var videoElement = document.querySelector("video") var audioCtx = new AudioContext() var source = audioCtx.createMediaElementSource(videoElement) var gainNode = audioCtx.createGain() gainNode.gain.value = 2 // double the volume source.connect(gainNode) gainNode.connect(audioCtx.destination)
It will look like this once you paste it in:
Press enter to send the code to your browser. The video should immediately get louder.
If you want to make it even louder, copy this line, paste it in and press enter. You can change the number to a higher value to make it even louder.
gainNode.gain.value = 3
What just happened?
Imagine that the video was a physical object (like a phone), and it was connected to your speakers by a cable.
We unplugged that cable and connected the video to a new object called a gain node. Then we plugged the gain node into your speakers. Sound flows from the video to the gain node to the speakers. The gain node has a volume dial on it, and we can adjust that dial to amplify the sound.