DIY: IRL Streaming Backpack with a Raspberry Pi and Speedify Channel Bonding Technology
IRL Live Streaming is a lot of fun, but it can be expensive to get the equipment necessary to keep a stable HD stream going while you’re out and about. In the labs here at Connectify, we’ve managed to put together our own low budget DIY live streaming backpack. Here’s how.
The Concept – Budget IRL Streaming Backpack
Our plan was to come up with a cheap, do-it-yourself version of the LiveU Solo ($995), the popular live-streaming hardware. This piece of equipment incorporates hardware channel bonding and real-time video transcoding for maintaining uninterrupted video quality while moving around outside.
Thus, we installed Speedify on a Raspberry Pi 4. With Speedify, we have the only VPN capable of software channel bonding, so we were able to incorporate the bonding part of the technology right off the bat.
Here were our requirements for this setup:
- we wanted to stay pretty close to a standard IRL streaming setup on the outside, keeping cables as concealed in the backpack as possible.
- we also wanted to be able to use any standard HD video camera. So, to make it work with the Raspberry Pi, we needed a capture card capable of transcoding the raw camera footage into a format that the Pi can upload.
- we also needed to program a button that can start and stop the stream.
- to keep the stream stable and reliable while moving around outside, we wanted to incorporate channel bonding. This way, we could send data out over multiple 4G mobile connections from different carriers at the same time.
There were 3 main processes we had to have working:
- Getting video from the camera into the Pi.
- Turning that raw live video footage into a streamable format.
- Broadcasting it through Speedify’s channel bonding VPN to Twitch.
Since we wanted all of this to happen in a backpack, it needed to be easy to control without a monitor or keyboard.
DIY IRL Streaming Backpack – Components List
We did a lot of research on streaming backpacks and camera equipment and settled on the Sony AS-300 for the camera, since it’s a nice portable, wide angle, HD camera and a popular choice for streamers. At $298, it will take up the biggest chunk of our budget, but you should be able to swap it out with any other camera that works with a USB live capture card.
We’ll hook it up to the Raspberry Pi with a micro-HDMI cable plugged into an Elgato Cam Link capture card, adding $116.
Next, we’ll use a Raspberry Pi 4 for the computer, for an additional $55. To keep it cool and protected in the backpack, we purchased a $10 GeeekPi Acrylic RPi 4 Fan case.
We’ll also need a battery pack to power the whole setup, which we purchased for $38.
To control the stream, we’ll use a Circuit Playground Express as a remote, which we picked up for a total of $30 including the plastic case.
We decided to mount both the camera and the Circuit Playground remote on a $23 Smatree telescoping selfie stick. We’re holding everything together in a Cocoon GRID IT! Accessory Organizer we got for $11. For the backpack, we’re using this Jansport backpack we already had laying around.
Finally, we need our mobile connections. You can borrow some phones from friends to tether or plug in a few cellular adapters. We used a couple of phones tethered to the Raspberry Pi via USB.
Components and costs
- Video camera: Sony AS-300 – $298
- Capture card: Elgato Cam Link – $116
- Cable adapter: HDMI to Micro-HDMI – $6
- Computer: Raspberry Pi 4 – $55
- Computer accessories: GeeekPi Acrylic Case with Fan RPi 4 – $10
- Battery pack: $38.
- Remote: Circuit Playground Express (including plastic case) – $30
- Organizer: Cocoon GRID IT! Accessory Organizer – $11
- Camera support: Smatree telescoping selfie stick – $23
- Backpack: Jansport backpack – $30
- Mobile connections: USB cellular dongles, tethered smartphones
- Speedify channel bonding VPN – $3.99 / month
Raspberry Pi Based Live Streaming Backpack – Software You Need
As mentioned before, one of the core elements of this live streaming backpack is the Speedify channel bonding VPN. You can easily set up Speedify on your Raspberry Pi using the instructions here.
Along with that, we’re using ffmpeg, which is a fast, lightweight, very configurable open-source software suite available on Linux for video and audio encoding and decoding. We installed ffmpeg by following these compilation steps https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu. We installed every third party library listed except for libaom, since it is unstable and not necessary for our setup.
We also needed to set up the Circuit Playground Express to work as a remote to control the stream. This involved writing a couple of Python scripts so that one button starts the live stream, one button stops it, and the switch reboots the Pi if needed. We have our code to set up the streaming buttons available on Github with more detailed setup instructions here: https://github.com/speedify/rpi-streaming-experiment.
Final Steps: Get the IRL Streaming Backpack Up-and-Running
We tried building OBS on the Raspberry Pi, but it is too unstable and ffmpeg works completely in the command line. This is ideal for being able to operate this setup, without an interface, in a backpack. If you need OBS features, other on-the-go streaming setups use cloud streaming services like Psynaps Servers for adding overlays, alerts, and controlling scenes. You would be able to use them with this setup as well.
We spent some time coming up with and testing an ffmpeg command that would stream high quality video as reliably as we can to Twitch on the Pi. When we got video streaming working, it was an exciting breakthrough, but sound still didn’t work. Then shortly after we got sound working on a delay, and after a couple more command iterations we came up with this:
ffmpeg_command = “/home/pi/bin/ffmpeg -nostdin -re -f v4l2 -s ‘1280×720’ -framerate 24 -i /dev/video0 -f alsa -ac 2 -i hw:CARD=Link,DEV=0 -vcodec libx264 -framerate 24 -rtbufsize 1500k -s 1280×720 -preset ultrafast -pix_fmt yuv420p -crf 17 -force_key_frames ‘expr:gte(t,n_forced*2)’ -minrate 850k -maxrate 1000k -b:v 1000k -bufsize 1000k -acodec libmp3lame -rtbufsize 1500k -b 96k -ar 44100 -f flv – | ffmpeg -f flv -i – -c copy -f flv -drop_pkts_on_overflow 1 -attempt_recovery 1 -recovery_wait_time 1 rtmp://live.twitch.tv/app/live_” + streamKey + “‘\n”
This command lets us stream live to Twitch, in 720p at 24 frames per second, which is about as good as the Pi can handle. By the way, you can get your unique “streamKey” from Twitch account settings / Stream Key & Preferences.
We’ve also tested it at 1080p and up to 60 frames per second, but the performance is not as reliable and the Pi is more at risk of overheating. If you’re using the Psynaps cloud streaming servers recommended by the Gunrun Backpack, you’re capped at 720p regardless.
Speedify is set to automatic start so it runs as soon as the Pi boots up. This way, we don’t need a UI for the Pi once we get everything together.
Remember – you can control the stream using the remote: one button starts the live stream, one button stops it, and the switch reboots the Raspberry Pi if needed.
Use all of your connections at the same time
Multiple connections, maximum performance
Speedify can bond any combination of 2 or more Internet connections and will intelligently distribute your online traffic between them for optimal performance.
In the majority of cases, Speedify will automatically detect and start using any Internet connections available to your device - but if you need help we have quick start guides available for most common set ups.