Poor Man’s QTake

On my current show, I needed to have access to the video feed from the DIT cart, but resources were limited and we sadly did not have a video assist/playback person to help. On large budget projects you would typically install the QTake app on your iPad so you didn’t have to stand in the often crowded space next to the monitor, but what to do on this one?

I came up with a solution. Sound was kind enough to let me attach a BNC cable to their video out port on their cart, and from there, I needed a few more pieces of tech. These were:

  1. A BlackMagic Design Web Presenter HD – $515 new at BHPhotoVideo.com; likely cheaper used on eBay
  2. A Raspberry Pi – I had a RPi 3 Model B Plus hanging around, which works just fine. You can pick a new RPi 5 up from adafruit.com for $80 and a case for $15.95.
  3. An Ethernet Cable
  4. A reasonably modern iPad with the VLC app

First, you need to provision the RPi. I used their handy Raspberry Pi Imager to install. The link is a macOS download; just search the internet for Raspberry Pi Imager for other operating systems. Be sure to set up your new RPi to connect to the same WiFi that your iPad will eventually connect to, and turn SSH on.

When the device is powered up, SSH into it, connect an Ethernet cable between the Web Presenter and your RPi, and assign a static IP address to the wired Ethernet port:

sudo nmcli c edit "Wired connection 1"set ipv4.method manualset ipv4.address 172.16.0.2/29save persistentactivatequit

Next, you’ll need to set up a RTMP server on your RPi. I asked ChatGPT for help on this – I’ve edited the instructions somewhat after I tested them to make sure that they work.

Now, time to configure the Web Presenter. BlackMagic’s Web Presenter Setup utility is super easy to use. The download link is once again for macOS. I set it up as follows:

I chose “POORQTAKE” as a key for my live stream, and clicked the “On Air” Button on the front of the unit.

Last, on the iPad, I launch VLC, click the “Open Network Stream” button, and use the URL rtmp://YOUR.RPI.WIFI.IP/live/POORQTAKE, and click “Open Network Stream”, and there you have it!

Setting up a RTMP Server on a RPi

Setting up an RTMP (Real-Time Messaging Protocol) streaming server on a Raspberry Pi can be done using a software package like NGINX with the RTMP module. Here’s a step-by-step guide to get you started:

Requirements:

  • A Raspberry Pi (preferably a 3B, 3B+, or 4 for better performance)
  • Raspbian or Raspberry Pi OS installed
  • Internet connection

Step 1: Update Your System

Open a terminal and update your system packages:

sudo apt update
sudo apt upgrade -y

Step 2: Install Dependencies

You need to install the required dependencies to build NGINX from source:

sudo apt install -y build-essential libpcre3 libpcre3-dev libssl-dev zlib1g-dev libpcre3 libpcre3-dev openssl libssl-dev

Step 3: Download NGINX and the RTMP Module

You will need to download both NGINX and the RTMP module:

cd ~
wget http://nginx.org/download/nginx-1.25.2.tar.gz
wget https://github.com/arut/nginx-rtmp-module/archive/refs/heads/master.zip

Unpack the files:

tar -zxvf nginx-1.25.2.tar.gz
unzip master.zip

Step 4: Build and Install NGINX with RTMP Module

Navigate to the NGINX source directory and configure the build:

cd nginx-1.25.2
./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master

Compile and install:

make
sudo make install

Step 5: Configure NGINX for RTMP

Edit the NGINX configuration file located at /usr/local/nginx/conf/nginx.conf:

sudo nano /usr/local/nginx/conf/nginx.conf

Add the following RTMP configuration to the nginx.conf file:

worker_processes  1;

events {
worker_connections 1024;

}

http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;

location / {
root html;
index index.html index.htm;
}
}

}

rtmp {
server {
listen 1935;
chunk_size 4096;

application live {
live on;
record off;
}
}

}

Save the file and exit.

Step 6: Start NGINX

You can now start NGINX using the following command:

sudo /usr/local/nginx/sbin/nginx

Step 7: Test Your RTMP Server

To test your RTMP server, you can use a streaming software like OBS Studio:

  1. Open OBS Studio and go to Settings.
  2. Under Stream, select Custom.
  3. Enter the RTMP server URL: rtmp://<Your-Raspberry-Pi-IP>/live
  4. Set the stream key to whatever you like.

Step 8: Verify Your Stream

To view your stream, you can use a media player like VLC:

  1. Open VLC and go to Media > Open Network Stream.
  2. Enter: rtmp://<Your-Raspberry-Pi-IP>/live/<stream-key>.

Optional: Enable NGINX on Boot

To have NGINX start automatically on boot, add it to your rc.local:

sudo nano /etc/rc.local

Add the following line before exit 0:

/usr/local/nginx/sbin/nginx

Save and exit.

You’re Done!

Your Raspberry Pi is now set up as an RTMP streaming server. You can stream video content to it and serve it to multiple clients.