Note that there are a lot of tunings that you may need depending on what your latency tolerance and picture quality tolerance is. I would recommend following FFmpeg's streaming guide [0].
If you are trying to stream desktop, camera, and microphone to the browser, I would recommend pion's mediadevices package [1].