IWBH_01

youtube audio enhancement

Jan 10th, 2021
1,091
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //copy and paste this into the Javascript Developer console in devtools on a youtube video webpage, then hit enter, click play on the video if it's not already playing
  2.  
  3. v1=document.getElementsByTagName("video")[0];
  4.  
  5. self.au=new AudioContext();
  6.  
  7. self.gn1=au.createGain();
  8. self.gn2=au.createGain();
  9. self.gn3=au.createGain();
  10.  
  11. gn1.gain.value=0.5;
  12. gn2.gain.value=0.3;
  13. gn3.gain.value=0.2;
  14.  
  15. self.dy1=au.createDelay();
  16. self.dy2=au.createDelay();
  17. self.dy3=au.createDelay();
  18.  
  19. dy1.delayTime.value=0.4;
  20. dy2.delayTime.value=0.7;
  21. dy3.delayTime.value=0.9;
  22.  
  23. gn1.connect(dy1);
  24. gn2.connect(dy2);
  25. gn3.connect(dy3);
  26.  
  27. self.mes=au.createMediaElementSource(v1);
  28. mes.connect(gn1);
  29. mes.connect(gn2);
  30. mes.connect(gn3);
  31.  
  32. mes.connect(au.destination);
  33.  
  34. dy1.connect(au.destination);
  35. dy2.connect(au.destination);
  36. dy3.connect(au.destination);
RAW Paste Data