Photo by Anuvith Premakumar on Unsplash

How to live stream DJ sets on Twitch

Kevin Cheng
12 min readApr 3, 2020

--

A guide born out of dozens of DJs trying to get their gear and internet to love each other.

Continually updated by kev/null and Architecture. Last update: 18 May 2020

About a week before the San Francisco shelter-in-place began, many of our dance gatherings were already getting cancelled. Monk Wellington and I were collaborating on how to get our respective virtual version of events running. In the process, we had to onboard many DJs into this new world.

This evolving article attempts to help DJs set up to live stream on Twitch with all the steps necessary. It can be a bit of a learning curve to set up but once it’s done, it should be fairly easy from then on. We recommend Twitch and OBS because they are both free products.

Yeah but what about…?

  • Facebook Live? Facebook has the benefit of integration to your FB network but also the problem that not everyone wants to be on FB anymore. They’re also way stricter with copyright detection killing you mid-stream.
  • YouTube Live? Similar copyright issues to FB.
  • IGTV? Similar benefits to FB but again requires an Instagram account (Twitch only requires an account to chat). Also, it’s vertical video only, designed to be viewed on mobile. Not awesome for dancers to put into their bigger sound system.
  • Mixlr? This has superior audio and can be used in conjunction with Zoom but doesn’t have the video engagement so it’s more of a choice of what you’re prioritizing. It is also not a free option.
  • Zoom? You can have the DJ set their audio to the correct output instead of a mic but the audio quality is optimized for talking, not bass. Also, Zoom costs money for more than 3 people longer than 40 mins. And in general, it isn’t well suited for very large scale use (Twitch can have hundreds of thousands of viewers).

What you’ll need

  • A computer. Processing power will matter. If it has a hardware graphics card, that will help greatly but most have succeeded with laptops.
  • A camera if you want to have video with your stream (integrated laptop cameras are fine)
  • Lighting for your gear and/or you if you’re likely playing after dark.
  • A way for your audio output to route to your computer. More detailed instructions in audio configuration section below.
  • A reasonable internet connection, especially upload speed. >10Mbps is preferred, 5Mbps is the minimum. Ethernet will get you faster but many have been able to do it with Wifi.
  • An account on Twitch.
  • You can also see Twitch’s getting started guide and Streamlabs’ musician getting started guide.

Set up Twitch account

  • Go to twitch.tv and sign up for an account — use your DJ name as your handle!
  • Twitch doesn’t have a listening algorithm like YouTube or Facebook that will remove your video if you use a song that could potentially be flagged as copyright
  • Set your channel’s category to Music and Performance
  • Add a profile photo, add a profile banner
  • On your profile page (twitch.tv/[yourname]), scroll down and click edit panels
  • There you can add more about you and links. More info here
  • You should also turn off store broadcasts here. We’ve heard this reduces the likelihood of running into copyright takedowns (unconfirmed).

Audio configuration

  • The goal is to have a direct audio line from your DJ setup to the computer and not use a microphone to pick up audio.
  • The most reliable and hassle-free method is to have an audio interface between your controller or mixer’s output to your computer. The Focusrite Scarlett 2i2 and Native Instruments Komplete Audio 2 have both tested well.
  • Make sure to have all your firmware, drivers, and software (rekordbox, mixer, etc) versions updated to the latest version(s). Here’s Pioneer’s software and firmware and the driver page for Serato.
  • DJM-900NXS(2) mixers should be able to connect via USB to be an output source. However, this was found to be more CPU-intensive and unreliable compared to an external interface. Make sure you run the DJM-900 settings utility to set the REC-OUT to channels 1 and 2.
  • Some examples of resources on how to do that are from Pioneer’s site for using a DJM-900NXS2 or an XDJ-RX2 for Mac, Windows versions here and here (respectively).
  • Check out this video if you’re using Traktor. Native Instruments also now has a guide to get setup.
  • Link to set up Stereo Mix using PC
  • MacOS doesn’t have loopback built in. If you’re not using an audio interface, we recommend not using Soundflower to do loopback audio (a software alternative to getting an audio interface). Multiple DJs have run into serious issues with this regardless of OS version. Instead, use BlackHole. Here’s a video of setup with BlackHole.

Set up streaming software

  • Go to https://www.speedtest.net/ and hit the go button. Leave the tab open and note the results (especially the upload speed)
  • Download Streamlabs OBS or OBS Studio. They’re largely similar. Streamlabs has better integration with their widgets and a nicer interface. However, if you want to use an iPhone as a low latency camera or use some of the plugins made for OBS, we recommend OBS Studio. Here’s a comparison of the two.

Adding sources

  • Check out this beginner’s guide for OBS setup Mac / Win, especially the first half
  • For a basic feed, you only need to add one video source (the camera) and one audio source (your mixer/controller)
  • Ensure that mic audio is muted in the audio mixer in OBS or better yet, don’t have mic audio configured at all in the default audio in settings.
  • Add an audio source for your mixer/controller. Check that it’s showing levels when you play music.
  • You can use your laptop camera or your iPhone with the OBS camera app (on OBS Studio). Instructions to setup here. Android phones can only be connected as wifi IP cameras and have potential lag issues.
  • In addition, you can add more videos or static graphics and much much more. Be aware that multiple video streams require much more bandwidth and we’re here to focus on the audio!
  • If you have more than one video, consider lowering the resolution on each video feed.

Settings for OBS

There are a few ways to approach this.

1. Suggested settings that have seen success on multiple streams

General: check “show confirmation dialogue when starting streams” and stopping.

Stream: select Twitch. Get the stream key by clicking the link.

Output: click advanced

  1. Set bitrate to 2500–3000 kbps
  2. CPU usage preset: veryfast. Make this even faster (superfast/ultrafast) if your computer is slow.

Audio: set audio to 160 audio bitrate

Video:

  1. Base (Canvas) Resolution: set this lower if you have a slower computer or low bandwidth. E.g., 1280x720
  2. Output (Scaled) Resolution: start with same as base resolution and experiment with lowering if needed
  3. Common FPS values: 30

2. Setup Wizard

Instead of the above, you can try the setup wizard. In OBS, go to “Tools” and start the setup wizard. This will do all the testing of network speed etc. This is potentially an easy way to start. You can start with this and then change the video bitrate under “output”. The general rule of thumb for encoding is that your encoder should be set to less than 25% of your upload speed. I.e.

  1. 10Mbps — (10Mbps * 25%) = 7.5 => set encoder to maximum of 7500 Kbps
  2. 5Mbps — (5Mbps *25%) = 3.75 => set encoder to maximum of 3750 (or ~3800) Kbps
  3. Twitch has some pretty clear guidelines on settings depending on resolution etc

Still having trouble? You can follow one of these tutorials Configuring OBS to stream to Twitch (Mac / Win)

Here’s another take on the settings without video: Best Settings for OBS Studio — Live Streaming

Testing stream

  • Once you’re done with that, you can try a stream test with Twitch Inspector
  • Or you could just start streaming to test it out without telling anyone and take a look.
  • Try to keep it running for 15mins and DJ a bit as you want to see how the processor does over time. While running, observe your Activity Monitor / Task Manager to see how much CPU usage is happening. See CPU/GPU issues for more info.

If you’ve been able to get it going at this point the YAY! You’re awesome. You can stop here and you’re ready to roll. Everything else is bonus.

Advanced Scene Setup

  • You can add static graphics and video (e.g., visualizations) from your hard drive.
  • Large videos can cause serious processing issues so be careful with what you include.
  • As of this article’s latest update, media source has a bug that can cause it to eat CPU resources. You may want to use VLC source instead.
  • Advanced Scene Switcher is an OBS plugin that lets you auto-rotate through scenes
  • Once you install, go to Tools->Advanced Scene Switcher->Scene Sequence
  • Spectralizer adds a neat waveform that goes with the music
  • Use display capture and window source to capture part or all of your desktop. You can use this to show what songs are playing or waveform from Serato/Traktor/Rekordbox.
  • Streamlabs has a few widgets that are great for handling donations. You do not need to use the software for these widgets. They offer widgets such as:
  • Alert box to show when there’s a new follower or donation
  • Donation bar to show progress towards a donation
  • Emote wall that floats emojis from the chat over the stream
  • This tutorial covers tickers and graphic transitions

Managing multi-DJ events

There are a number of features that help with managing multi-DJ events.

  1. /host is a channel feature available to all users across the site. Host mode gives all broadcasters the ability to host another channel’s live broadcast on his or her own channel page without changing your chat, allowing for your viewers to be exposed to content you choose while interacting with you in your chat room.
  2. /raid is a feature that sends everyone in your channel to the channel you specify. When you raid another channel, your channel also automatically switches to hosting it.
  3. You can allow other twitch accounts to stream on a single channel in settings under “people who can stream to your channel”. This safely gives other accounts a unique stream key to stream to a unified channel.

There are a few different ways to host a sequence of DJs each with their own pros and cons.

Daisy chain

A DJ plays and then when they’re finished, they /raid to the next DJ.

Pros

  • Allows the next DJ to test their setup and be ready to go.
  • Creates an uninterrupted experience

Cons.

  • No single channel to build followers.
  • People need to know which channel to join at any given time.
  • DJ needs to know to do /raid and whom to
  • Stats for the whole event are spread over DJ channels.

Host mode

A single channel hosts the current DJ’s channel, embedding it on their channel.

Pros

  • Single destination and single chat experience.
  • Allows the next DJ to test their setup and be ready to go.
  • Creates an uninterrupted experience.
  • Still creates following for one channel as well as DJs’ channels.
  • Current DJ doesn’t need to do anything for handoff (but optionally can /raid the main channel to consolidate)

Cons

  • An admin of the main channel needs to do /host to change DJs
  • Still can have people on the individual DJ channel’s chat
  • Stats for the whole event are spread over DJ channels.
  • Prior DJ needs to remember to stop stream for best results.
  • Sometimes viewers need to refresh on a host change.
  • With a recent channel redesign being rolled out, it’s much more likely viewers coming to the “stage” end up on the DJ’s channel instead.

Stream to single channel

Each DJ has a key and can stream to one main channel.

Pros

  • Single destination and single chat experience.
  • Follow stats and view summary aggregated to one channel.

Cons

  • Next DJ needs to test their setup with their own stream key and then switch keys.
  • Interrupted experience as one DJ stops streaming and the next starts up.
  • Individual DJs don’t get as much benefit in followings.

Management during event

Regardless of which method you pick, you will likely need one or more virtual stage managers to handle the following:

  • Check-in with the upcoming DJ 15 mins before and help them do a stream and sound check
  • Run a Zoom or something similar where people are videoed in and can have a visual dance party together. Make sure to set the conference to mute people on join but you may still need to occasionally mute people. If you’re really pro, you can highlight dancers and pin them to create interest in the screen.
  • Inform and coordinate the handover with instructions (telling DJ what /raid to do or typing /host themselves etc).
  • Post to FB event page or wherever else when a new DJ is on to keep the momentum and interest.
  • Engage with the audience over chat, especially if it’s a donation drive.
  • Help DJs deal with tech issues and keep the audience if DJ is running into any!

Troubleshooting

You’ll likely run into 3 main categories of issues:

  1. Audio routing (no sound)
  2. Processor overload (likely leading to crashes)
  3. Bandwidth issues (likely leading to spotty broadcast)

Here’s OBS’s performance troubleshooting guide

Figure out what’s wrong

  • If you’re able to stream and see yourself but not hear music, it’s likely an audio routing issue.
  • In OBS, go to view->stats to see some useful information:
  • Frames missed due to rendering lag
  • Skipped frames due to encoder lag
  • These numbers during a stream should be very very low (near zero or zero).
  • The other thing to look at is Task Manager/Activity Monitor and your CPU usage during a stream. If it is hitting 90% or more, that’s problematic.
  • For these cases, you are likely running into CPU or GPU issues.
  • Otherwise, you should look at networking issues. Look at inspector.twitch.tv when you stream and you should see a straight-ish line.

Audio routing issues

  • If you have a controller, try following these instructions
  • See if you can get the stream working with mic as audio to make sure it’s not something else
  • On Mac, you can try to use your headphone jack as a line-in. This video covers how to do that (instead of a microphone, you’d do a 3.5mm line out from your audio source) Note — Only works with 2012 MBPs and earlier.

CPU/GPU issues

  • Adding any images, videos, plugins, animations, or widget elements to OBS will also increase the processing demand OBS will need in order to run smoothly on your computer. Try fewer video sources, or lowering the resolution of each video source.
  • Try changing encoder settings to “superfast” or “ultrafast”
  • If you have a hardware graphics card, try using that as the encoder. However, Apple VT H264 encoders may cause problems because they use variable bit rate.
  • Right click the preview window in OBS and uncheck “enable preview”
  • Turn off “studio mode” if that is checked (you’ll know if it’s on if you’re seeing two copies of your scene)
  • Close all unnecessary applications
  • Make sure you are plugged in! Battery power can cause your laptop to go into a lower processing mode.
  • Newer Macs these days come with 2 GPUs built-in that automatically optimize the graphics that are being displayed on your screen, i.e. they’ll switch back and forth between them in order to try to save your battery power.
  • You can turn this off here in order to use only the high-performance GPU (which can decrease your battery life if left off over time)
  • If you are on Windows, when you run OBS as Administrator, it will prioritize OBS above all other applications. OBS doesn’t take up a lot of power so should still allow plenty of space for your DJ application to run normally as well.
  • Did you try rebooting?

Network issues

  • Here’s an OBS guide on troubleshooting bitrate drops
  • Lower your video bitrate under preferences->output
  • Disconnect other devices from your network
  • Make sure Dropbox/OneDrive/Google Drive that has its own mind and syncs in the background is paused before going live
  • Try hardwiring to your network instead of using wifi

--

--

Kevin Cheng

Product and design leader. Formerly Indeed, founded Incredible Labs, led product for #newTwitter. Wrote “See What I Mean”. Drew OK/Cancel webcomic. I also DJ.