Also where can I find this in source code? Thanks.
Media encoding is done in the clients, the code of the browsers Chromium, Firefox … etc.
So the only tweaks that we can make are listed in these APIs - Media Capture and Streams API (Media Stream) - Web APIs | MDN