Encoding PC: Difference between revisions

From Eden's Homelab Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 18: Line 18:
=== Video Capture ===
=== Video Capture ===
The video capture side is much easier to understand. A cheap USB 1080p capture card is plugged into the streaming PC. The main monitor output of the KVM switch is duplicated with a good quality HDMI duplicator, one side goes into the capture card and the other side goes to my main monitor.
The video capture side is much easier to understand. A cheap USB 1080p capture card is plugged into the streaming PC. The main monitor output of the KVM switch is duplicated with a good quality HDMI duplicator, one side goes into the capture card and the other side goes to my main monitor.
=== Audio Capture & Mixing ===
[[File:Mixermaxxed.jpg|left|thumb|Behringer XENYX 302USB]]
[[File:Behringer XENYX 302 USB Mixer Diagram.png|left|thumb|Someone on YouTube made this useful diagram on how to use the Behringer XENYX 302 USB]]
Audio capture is a little bit more complicated, since on the streaming system it needs to injest audio streams from different sources, and some of these sources you want to hear in your headphones and some you do not. Also there is the additional challenge that I want to hear sounds even when the encoding PC is off. This means I cannot use a general USB audio interface.
It is difficult to select a USB audio interface to use; since I both a mono microphone input and a stereo line-in input from the KVM switch. There are not many USB audio inputs to this specification, and none that can be used when the host system is turned off. The Behringer XENYX 302USB is ideal for this use, it is entirely hardware and thus doesn't require software, and can be used when the encoding PC is turned off. This mixer is pretty old now, and there are lots of them on the used market so they're also rather cheap. Although since it is mostly an audio mixer not an audio interface, it only provides a single USB audio interface to the host system. This would be fine if you only needed it for streaming (e.g. twitch), since it would be fine for microphone and game sound to come from the same interface, but if you want to also use it for calls, you need to have separate interfaces for both microphone and game inputs. This is why I need two.
I have the following requirements for audio mixing:
* Two separate USB inputs for the microphone and KVM audio
* Two separate inputs for KVM audio and for the encoding PC audio, that can be mixed, for my headphones
* The encoding PC audio does not go back to the encoding PC
Thankfully [https://www.youtube.com/watch?v=pmKdOm7oibM someone on YouTube] made this handy diagram on how to use the mixer, since it is not completely intuitive and there are a lot of possible combinations.
My configuration is that the LEFT mixer is used as a microphone input for the encoder PC, and also is used for mixing into my headphones, so this mixer is also a USB audio OUTPUT from the encoding PC, and also gets KVM audio from the output of the RIGHT mixer. Consequently, the line-in input setting is set to USB AUDIO, line-in output is set to headphones, and the 2-track input (from the other mixer) is also set to headphones.
The RIGHT mixer configuration is that the line-in setting is set to the analogue line-in, which is attached to the headphone output of the KVM switch. It goes through a noise filter on the way. The line-in output is set to MAIN MIX, which means it is sent to both the MAIN MIX analogue output and to the USB audio input on the computer. The MAIN MIX analogue output goes to the 2-track analogue input on the LEFT mixer.
Thus, it is possible to mix the levels of both the encoding PC and the KVM output into my headphones, which would not be too easy otherwise since the 2-track input does not have its own volume control.

Latest revision as of 20:27, 25 January 2026

This PC is used for encoding video. It is the computer that all of the webcams are attached to, and is therefore used for meetings. I need to use the OBS virtual webcam because my physical webcam is mounted upside-down and this needs to be fixed in software. Also, a capture card is connected to this computer, which is linked to the output of the KVM switch, so it can injest video from whatever computer I'm using at the time.

The computer uses my old server's CPU and motherboard, power supply and case, and has a simple Quadro connected to it so it can use hardware encoding for video. The picture does not show the GPU connected.

Streaming setup

This PC is used for streaming, and also for calls; e.g. discord, teams, whatsapp. Using a separate computer just for streaming has the advantage of reduced usage on that computer, and seamless transitioning between multiple computers with a KVM switch.

Video Capture

The video capture side is much easier to understand. A cheap USB 1080p capture card is plugged into the streaming PC. The main monitor output of the KVM switch is duplicated with a good quality HDMI duplicator, one side goes into the capture card and the other side goes to my main monitor.

Audio Capture & Mixing

Behringer XENYX 302USB
Someone on YouTube made this useful diagram on how to use the Behringer XENYX 302 USB

Audio capture is a little bit more complicated, since on the streaming system it needs to injest audio streams from different sources, and some of these sources you want to hear in your headphones and some you do not. Also there is the additional challenge that I want to hear sounds even when the encoding PC is off. This means I cannot use a general USB audio interface.

It is difficult to select a USB audio interface to use; since I both a mono microphone input and a stereo line-in input from the KVM switch. There are not many USB audio inputs to this specification, and none that can be used when the host system is turned off. The Behringer XENYX 302USB is ideal for this use, it is entirely hardware and thus doesn't require software, and can be used when the encoding PC is turned off. This mixer is pretty old now, and there are lots of them on the used market so they're also rather cheap. Although since it is mostly an audio mixer not an audio interface, it only provides a single USB audio interface to the host system. This would be fine if you only needed it for streaming (e.g. twitch), since it would be fine for microphone and game sound to come from the same interface, but if you want to also use it for calls, you need to have separate interfaces for both microphone and game inputs. This is why I need two.

I have the following requirements for audio mixing:

  • Two separate USB inputs for the microphone and KVM audio
  • Two separate inputs for KVM audio and for the encoding PC audio, that can be mixed, for my headphones
  • The encoding PC audio does not go back to the encoding PC

Thankfully someone on YouTube made this handy diagram on how to use the mixer, since it is not completely intuitive and there are a lot of possible combinations.

My configuration is that the LEFT mixer is used as a microphone input for the encoder PC, and also is used for mixing into my headphones, so this mixer is also a USB audio OUTPUT from the encoding PC, and also gets KVM audio from the output of the RIGHT mixer. Consequently, the line-in input setting is set to USB AUDIO, line-in output is set to headphones, and the 2-track input (from the other mixer) is also set to headphones.

The RIGHT mixer configuration is that the line-in setting is set to the analogue line-in, which is attached to the headphone output of the KVM switch. It goes through a noise filter on the way. The line-in output is set to MAIN MIX, which means it is sent to both the MAIN MIX analogue output and to the USB audio input on the computer. The MAIN MIX analogue output goes to the 2-track analogue input on the LEFT mixer.

Thus, it is possible to mix the levels of both the encoding PC and the KVM output into my headphones, which would not be too easy otherwise since the 2-track input does not have its own volume control.