Skip to content

Instantly share code, notes, and snippets.

@flaki
Last active January 1, 2022 17:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flaki/2e3a0f1d59ebc723fba57c9053f06765 to your computer and use it in GitHub Desktop.
Save flaki/2e3a0f1d59ebc723fba57c9053f06765 to your computer and use it in GitHub Desktop.
Console fix for mono audio in stereo videos on YouTube like this one https://youtu.be/P3X3J-8ICAo
(function(){
vid=document.querySelector('video.html5-main-video');
ct = new AudioContext();
src = ct.createMediaElementSource(vid);
splitter = ct.createChannelSplitter(2);
src.connect(splitter);
merger = ct.createChannelMerger(2);
splitter.connect(merger, 0, 0);
splitter.connect(merger, 0, 1);
merger.connect(ct.destination);
})();
@jcsrb
Copy link

jcsrb commented Apr 5, 2021

link didn't work for me, so here is the long version of the sample link

https://www.youtube.com/watch?v=P3X3J-8ICAo

@flaki
Copy link
Author

flaki commented Apr 5, 2021

Riight good catch, thanks @jcsrb fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment