Long story short, I recently started live streaming my gameplay. I don’t expect many viewers, Just, Why not? Plus, every streaming platform offers playback. It’s like free storage for every game recording, why not take advantage of it?
To get to the point, as you can see, I recently needed to stream on multiple platforms simultaneously. However, OBS itself clearly doesn’t support multi-streaming, and due to its lack of proxy settings and other well-known reasons, I couldn’t stream to twitch.tv. So, I started looking for solutions.
Defining the Requirements
- Multi-platform simultaneous streaming
- Minimal performance impact
- One stream requires a proxy
Multi-Streaming
There is a ready-to-use plugin for multi-streaming: Github
Download the .exe
installer from the Release page. After installation, remember to check “Multi-Output” in the “Dock” menu. By default, a separate window will pop up, and you can take this opportunity to adjust the layout of OBS.
The plugin settings are straightforward, just follow the same steps as you would in the original OBS.
Bilibili Live Assistant
Oddly, Bilibili requires streamers with fewer than 50 followers to use their Live Assistant, and other domestic platforms may have similar rules. After enabling third-party streaming mode, the live panel will display the streaming configuration. You don’t need to follow the streaming address provided by the Live Assistant, as it inexplicably gives a changing local IP each time. Simply replace it with 127.0.0.1
or localhost
.
Streaming to Twitch
Streaming to Twitch involves many unnecessary troubles due to the GFW.
OBS does not support proxy settings. Initially, I planned to use Clash’s TAP mode to force proxy OBS traffic, but Clash’s TAP does not listen to rtmp traffic, so that plan failed. I decided to set up a forwarding server that can communicate with Twitch without being affected by the GFW.
After some research, I found that Caddy does not support the RTMP protocol, while the nginx-rtmp
module is specifically designed for RTMP. It seems to be the only choice.
Prerequisites:
- Familiarity with basic Linux command line operations.
- A server with
docker
anddocker compose
installed. - A suitable command line text editor, such as
nvim
or the defaultnano
in most distros.
Create a directory:
|
|
Create docker-compose.yml
:
|
|
Create nginx.conf
:
|
|
Start the setup:
|
|
Don’t forget to open the firewall port. My firewall configuration is based on the article To Fix The Docker and UFW Security Flaw Without Disabling Iptables, and the command to open the port is:
|
|
After configuration, set the streaming target address in OBS to rtmp://server_ip/live
, and any stream key will work. Once set, you can start streaming.
Netch
If you don’t have a server, you can also use Netch to proxy the OBS process for streaming.
First, download Netch version 1.9.2, making sure it’s version 1.9.2. Add a process mode, include the OBS folder, and then enable the proxy for that process mode.
Conclusion
To stream simultaneously on Twitch and Bilibili, I encountered many unnecessary troubles. I could blame OBS for not having built-in proxy support, or blame tools like Clash Verge for not supporting RTMP. But ultimately, the blame lies with the GFW. Although the final result is satisfactory, the experience of going through all this trouble just for streaming is far from pleasant. Maybe in the future, I should look into modifying the Mihomo kernel to support RTMP protocol, or develop an independent implementation to forward OBS traffic. Whatever the case, streaming smoothly in this land is a long and arduous journey.
Finally, feel free to follow my Twitch channel: https://www.twitch.tv/powerfullz233