My Perfect Livecoding steam for OSX

2015-08-31

I've been interested in live streaming for a while now. I’ve been playing with Livecoding.tv on and off, and through this experience I’ve had to deal with the crappy internet connections and configuration complications I’ve had to figure out. I thought I’d document my current configuration so that I might help make other potential streamers’ experiences a bit smoother.

Prerequisites

I'm using OBS to stream on osx Yosemite. I’m using a 15" Macbook Pro Mid-2014.

I'm using Bluetooth headphones which complicate my setup somewhat. My machine has 16GB of ram, a 2.2Ghz core i7, and an SSD. Your mileage may vary - this is what works for me on my connection, with my computer’s spec. If you interent connection is more or less symetric than mine, this configuration will probably be sub-optimal, but hopefully it will point you in the right direction.

Internet Connection

I have an ADSL connection. This means that my internet connection is asymmetric:

Speedtest of my current home connection

As you can see, I cannot even get 1Mb/s up - not even when I have a specialist ISP who have amazing support and have optimized my line as much as possible.

What this means, is that I struggle very much with uploading video in real time. I’ve managed to optimise my video stream a bit to keep lag down and make sure I don’t drop frames

Video

I have set my bitrate to a low setting (600), and also set the Custom Buffer Size to the same level. Because I have a fast CPU, I set the CPU usage preset to medium, on a high profile. Check out this section in a wiki article for FFMPEG for a better understanding of how presets and profiles work.

My base resolution is set to `1336x768`, using `Lanczos` filtering to downscale.

I’m using a rather low FPS value of 10. This is required due to my terrible upload speed.

Audio

I have the Audio bitrate set to 64. This frees up bandwidth I use to get a slightly higher screen. My Sample Rate is set to 44.1khz.

I’m using a couple of techniques connected together in order to have good control of the audio in the livestream. Here’s how it all works:

I have a tool called `WavTap` installed. `WavTap` is a simpler, nicer alternative to SoundFlower. WavTap allows us to capture what the desktop is playing and pipe it into the stream seperately from the microphone.