How Periscope Enabled Audio-Only Livestreams in Just 3 Days

The task was completed during Twitter’s #HackWeek

Some people just aren't comfortable in front of a camera
101dalmatians/iStock

Periscope faced the challenge of responding to users’ requests for the ability to broadcast audio without video while not rejiggering its entire front-end and back-end infrastructure—and to complete the task in just three days.

Staff engineer Richard Plom explained in a blog post how his team met its goal of completing work on the feature during Twitter’s recent #HackWeek.

Plom noted that Periscope users who were not comfortable being on camera but still wanted to participate in discussions via the livestreaming application’s chatroom feature had been resorting to measures such as covering their camera lenses.

He said that configuring Periscope’s front-end clients and back-end infrastructure to handle audio-only streams would involve multiple teams and potentially take a few months to wrap up.

Plom detailed the solution he and his team arrived at: “The goal for audio-only broadcasting is to give people a way to broadcast without having to show themselves or their surroundings. The goal is not engineering support for another media format. When framed that way, I realized that all I needed to do is to render a video of what the audio looks like, and the video would take the place of camera pixels. This approach has many advantages: It’s backwards-compatible, meaning that it plays everywhere. Also, it’s easier to integrate into the existing broadcasting pipeline, and it’s something we could build with minimal dependencies.”

He added that once the idea was in place, the execution was simple: Periscope continues to use the audio stream produced via the iPhone microphone, while the video stream is discarded in favor of “dynamic video animations informed by the audio data that we render on the iPhone in real-time.”

Periscope’s audio visualizer renderer converts raw audio bits into a waveform and volume levels indicator, which is then sent to the back-end in place of the videostream from the camera.

Plom concluded, “In summary, it’s important to remember that in software development, there’s never just one correct answer to a problem. It’s sometimes easy to get lost in the details and over-engineer a solution and miss the point of the feature you are working on. By focusing on the end result, we were able to find a golden path to solve a problem in a short amount of time, and give people a new feature to enjoy on Periscope that they have been requesting.”

Recommended articles