These notes are no longer maintained. For up to date guide visit pi.adamlightuk.com

These notes are no longer maintained. For up to date guide visit pi.adamlightuk.com


Raspberry Pi Broadcast Configurations

The Raspberry Pi is a fairly powerful computer box capable of many useful things in the live event/broadcasting field. I’ve collated my experimentation and ideas into this document so that you can use your Raspberry Pi at live events/streams. For most of this guide, I will use configuration through the terminal.

1.1: Install the OS        3

1.2:  Initial Setup        3

1.3: Configure Network Settings        4

Using WiFi:        4

Using Ethernet:        4

1.4: Configure AV settings for Broadcasts        5

1.5: Initial Setup Conclusion        5

2.1: Remote Access        5

SSH        5

VNC        5

SFTP        6

2.2: NDI Monitor - Dicaffeine  (Live stream IP Video to the Pi)        6

NDI        6

2.3 RTMP Server (Live Stream Video to and from the Pi)        7

Stream        7

Playback        7

Confidence monitor / autocue        8

Authentication        8

Example #1 - Streaming Bridge        10

Dynamic DNS        10

FFMPEG        10

Restreaming        10

Cloud Server        11

2.5: Station Clock        12

2.6: Scoreboard        12

2.7: Stream Deck - Companion        12

2.8: VPN        12

2.9: Cleanfeed - Podcasting        12

2.10: H2R Graphics        12

2.11: Skype Guest        12

2.12: Streaming Bridge        12

2.13: Teleprompter        12

2.14.2: SRT        12

3.0: Making a streamlined system        15

3.1: Start on Boot        15

3.2: Touchscreen Control        15

3.3: Start a program with a button        16

Thank You        16


Raspberry Pi Configuration

Tools Required:

  • Raspberry Pi  (any model)
  • SD or Micro SD Card
  • SD Card Reader
  • Raspberry Pi Imager Software for Windows, Mac and Linux
  • Power Cable
  • Keyboard
  • Mouse
  • Display

1.1: Install the OS

Ensure the SD card is empty; the contents will be deleted in the process.

Load the Raspberry Pi OS onto the SD using the Raspberry Pi Imager Software. If you are installing a custom software image like Playoutbee, you can also select that here.

Select the OS and SD card and click 'Write'

The writing process could take a while.

1.2:  Initial Setup

Insert the SD card into the Raspberry Pi. Plug in a display, mouse and keyboard. Then plug the Pi into power. Ensure the power supply matches the requirements for your model of Pi. The Pi will then boot.

You will then be greeted with a welcome screen. Click Next.

Set the Country and Timezone. Click Next.

Enter a new password for the Pi. Write this down. If the Pi is out of view of the public, you could stick a label with the password on it. Click Next.

The Pi will ask about display resolution. We’ll configure this manually later. Click Next.

The Pi will ask about a wireless network. We’ll configure this manually later. Click Skip.

The Pi will try and update its software, as we haven't configured a network yet, we can do this later. Click Skip.

Setup Complete. Click Done.

Press CTRL + ALT + T  to open a terminal.

Type sudo raspi-config

Select Network Options, then N1 Hostname.

Change the Hostname to something recognisable. Pay attention to which characters are allowed.

Select <OK> and <Finish>. Reboot the Pi by selecting <Yes> when prompted.

1.3: Configure Network Settings

To be able to communicate with the Pi over the network, it needs a static IP address that we can always access.  It’s important to write down the IP addresses given to each Pi as well as labelling them so we don’t assign multiple devices to the same address accidentally and can pinpoint which device is associated with each network address.  Your IP address needs to be within your network. It is a good idea to change the range of DHCP (automatic IP addressing) to exclude the static IP addresses using your router config.

We’ll set this up using a terminal window. To open one press CTRL + ALT + T .

Using WiFi:

Type: ifconfig

To check what the wireless interface is called. It should be wlan0.

Type: sudo iwlist wlan0 scan

Find the desired network and its ESSDI tag.

Type: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

This will open the WiFi config in a text editor called Nano.

Add the following lines:         (Quote marks are vital)

network={

    ssid=”[network ESSDI]”

    psk=”[network password]”

Press Ctrl-X then Y then ENTER to save and exit.

Type:  sudo nano /etc/dhcpcd.conf 

This will open the network config file in a text editor called Nano.

Add the following lines at the end of the file:

interface  wlan0

static ip_address=[IP address]/24

static routers=[Router IP address]

static domain_name_servers=[Router IP address]

Press Ctrl-X then Y then ENTER to save and exit. Type sudo reboot .

Using Ethernet:

Type:  sudo nano /etc/dhcpcd.conf 

This will open the network config file in a text editor called Nano.

Add the following lines at the end of the file:

interface  eth0

static ip_address=[IP address]/24

static routers=[Router IP address]

static domain_name_servers=[Router IP address]

Press Ctrl-X then Y then ENTER to save and exit. Type sudo reboot .

1.4: Configure AV settings for Broadcasts

When using the Raspberry Pi as a video device, we need to be able to control exactly what it’s sending over the HDMI so it can be seen by a vision mixer without compatibility issues. For example, sending 4K to an HD switcher. We’ll change the HDMI output to 1080P 25Hz which is the standard used in my video system. If you use a different standard, you will need to set a different HDMI mode. These are documented here under hdmi_mode.

In a terminal, enter sudo nano /boot/config.txt

Change the following settings:

disable_overscan=1        (This ensures the image takes up the whole screen)

hdmi_drive=2                (This enables Audio over HDMI)

hdmi_group=1                (Sets the type of signal to standard broadcast resolutions)

hdmi_mode=33                (Specifies resolution and frequency. In this case 1080p25)

Press Ctrl-X then Y then ENTER to save and exit. Type sudo reboot .

1.5: Initial Setup Conclusion

You're done! That's all the setup needed for the Pi to be usable.

Now would be a good time to run sudo apt-get update and sudo apt-get upgrade

2.0: Further Setup

Next we can start some more advanced setups for controlling the Pi remotely and setting up some functions for the Pi to operate. Some of these processes should be installed as the only system on the Pi. Many of them use web servers which can interfere with each other if on the same device.

2.1: Remote Access

Accessing the Pi over the network means you don't have to connect a keyboard, mouse, monitor to make changes. There are a few useful methods below.

SSH

This will provide you with a remote command line.

To enable, in a terminal enter the following commands:

sudo systemctl enable ssh

sudo systemctl start ssh

Then you can access SSH in an SSH client like PuTTY

In Putty with SSH selected and port 22, enter the Raspberry Pi’s IP address and click open. After entering the Pi’s password, you should have access to its command line.        (The Pi’s default username is ‘Pi’)

VNC

This will provide a full desktop experience over the network.

Install using sudo apt install realvnc-vnc-server realvnc-vnc-viewer

Then sudo raspi-config

Select Interfacing Options, select VNC and then <Yes>.

Access the remote desktop using RealVNC VNC Viewer and, like PuTTY, enter the Pi’s IP address, user and password.

SFTP

SSH also supports file transfer. Using FileZilla, you can send and download files to and from the Pi over the network. Start a new connection in the same way with IP address, user and password. You are then presented with your file system on the left and the Pi’s file system on the right. You can then drag and drop or copy and paste files around easily.

2.2: NDI Monitor - Dicaffeine         (Live stream IP Video to the Pi)

Dicaffeine is an NDI player that takes an NDI source and outputs it to HDMI. To achieve quality results: the Pi should be on a wired Ethernet LAN connection; only Raspberry Pi 4 is capable of smooth playback; Dicaffeine is the only program on a clean OS.

To install, run the following commands in a terminal:

wget -O - http://dicaffeine.com/repository/dicaffeine.key | sudo apt-key add -

echo "deb https://dicaffeine.com/repository/ buster main non-free" | sudo tee -a /etc/apt/sources.list.d/dicaffeine.list

sudo apt update

sudo apt install -y dicaffeine

You should now be able to open the Raspberry Pi’s IP address in a browser on the network and control playback of NDI. The password is admin

From this page, you can select NDI sources and play them full screen on the Pi’s HDMI. If the Pi struggles to playback smoothly, you can also select a lower resolution playback to minimise dropped frames.

The developer claims that 720p30 is handled smoothly on a raspberry pi 4, while 1080p30 will have a few dropped frames.

You could send NDI from OBS, NDI cameras, NDI Tools, Adobe Applications etc.

NDI

NDI is a system of sending IP video streams around a network. Newtek, being the creator of NDI, has included excellent support for its line of vision mixers, the tricaster. However, Blackmagic has no official support for NDI in any of its products. NDI could be used to send program feeds around a building. Dicaffeine is the perfect solution for this. Simply deploy a Raspberry Pi to each Television and connect to the network. The RPis can be configured to play from a list of available sources from the web console.

Adobe has support for NDI, using a plugin, to output a feed from Premiere Pro to an NDI feed. This could be a really simple way of playing out video to an Atem by simply playing the timeline and inputting the NDI to an Atem using a RPi. OBS also has support for NDI output so you could send that feed over a network.

You will need to be considerate about network bandwidth when using NDI as each feed could be up to 100Mbps for FHD. This is likely not a problem on a wired LAN but shouldn’t really be attempted with WiFi.

NDI over the internet is not viable currently for normal folk. Sienna Cloud is a bespoke NDI over the internet solution but is not available to the general public.


2.3 RTMP Server        (Live Stream Video to and from the Pi)

Streaming RTMP either over the internet or on the network allows for wireless cameras or sending a feed to another location with very low latency.  NGINX is a web server that can distribute RTMP. We’ll use the Raspberry Pi as the playback as well, so any stream to the Pi is outputted over HDMI.

To install NGINX, in a terminal type:

sudo apt install nginx

Add the RTMP Module

sudo apt-get install libnginx-mod-rtmp

Open and edit the config file

sudo nano /etc/nginx/nginx.conf

Add the following code to the bottom of the file:

rtmp {

        server {

                listen 1935;

                chunk_size 4096;

                application live {

                        live on;

                        record off;

                }

        }

}

This page has a list of functions you can call to customise the stream. For example, only letting certain IP addresses push rtmp to the Pi.

Press Ctrl-X then Y then ENTER to save and exit.

Then restart NGINX by entering sudo systemctl restart nginx

You can check that Nginx is active by going to the Raspberry Pi’s IP address in a browser. It should say ‘Welcome to nginx!’

Stream

To stream to the Pi, use the address in any rtmp encoder:

rtmp://[pi-ip-address]:1935/live/[stream-key]

rtmp’s default port is 1935 ; live is the rtmp application ; stream key can be a set of characters to avoid unwanted people on the network tuning in. Don’t share this if you want to keep the stream private.

Some useful services for rtmp encoding are:

- OBS for mac, windows and linux. Allows streaming of webcams, graphics, desktops from a PC to RTMP

- Larix Broadcaster for IOS and Android. Stream the phone’s camera to RTMP.

- Atem Mini Pro + (ISO)  in the streaming XML, set the address to your rtmp address and stream to the Pi.

-GoPro 7 , 8 ,9 The new GoPros can stream to a custom RTMP server when  connected to a phone.

Playback

To playback the stream on the Pi on the HDMI, we can use the built in media player OMXPlayer:

omxplayer rtmp://127.0.0.1:1935/live/[stream-key]

This plays the rtmp stream from ‘local-host’ (i.e. itself)

To exit the stream, press q .

In a later section, we’ll automate this process so it will start the server and play the result on boot.

The RTMP feed can also be played by any device on the network e.g. in VLC, open network stream and enter the RTMP address.

NOTE: It is possible to stream to the Pi from over the internet from a different network or over 4G. To do this, you need to enable port-forwarding on your router to route traffic for port 1935 to the Pi’s IP address. Then instead of streaming to the Pi’s IP in the RTMP address, use its public address which is the IP address of the router. There are some potential security issues with opening ports on your router and often it's not possible if you don't have admin access to a venue’s networking gear. One solution to this could be using a custom VPN which we’ll set up later in the guide.

Confidence monitor / autocue

This system could be used in reverse to send video to a source on or off the network. For example, providing talent with a confidence monitor or autocue in the field. To achieve this, your router will need to forward port 1935 to the Pi’s IP address. Then, any device on the internet can stream RTMP by using the public IP address and stream key. It is for this reason to keep the stream key strong as anyone on the internet could tune in. Note that the RTMP traffic doesn’t use port 1935. Only the handshake process takes place on this port to set up the connection over other ports. Note that anyone on the internet could stream to your Pi if they know your public IP address. You may want to try the steps below to include some security in the process.

Authentication

You may want some additional security to avoid anyone from streaming to your Pi using the public IP address. You may also want some security avoiding anyone from tuning into the RTMP feed on the internet beyond just a stream key.

To achieve this, we need to set up the NGINX to serve as a web server too. Given we have already set up RTMP, the webserver has already been set up. NGINX will serve whatever is in /var/www/html.  In this case we need to serve a PHP file which can run our function.

We need to install PHP with         sudo apt install php-fpm . 

Enable PHP in NGINX.                 cd /etc/nginx

sudo nano sites-enabled/default

Find the line                        index index.html index.htm;

Add this to the list                index.php

Find this line                         # location ~ \.php$ {

Uncomment lines by removing # so it looks like this

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

#

location ~ \.php$ {

include snippets/fastcgi-php.conf;

# With php-fpm (or other unix sockets):

        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;

# With php-cgi (or other tcp sockets):

#    fastcgi_pass 127.0.0.1:9000;

        }

Press Ctrl-X then Y then ENTER to save and exit.

Reload the config file                 sudo /etc/init.d/nginx reload

Rename the HTML file                cd /var/www/html/

sudo mv index.nginx-debian.html rtmp_auth.php

Edit this in Nano                        sudo nano rtmp_auth.php

Add the following                        

<?php

$username = $_POST["name"];

$password = $_POST["psk"];

$valid_users = array("[user1]" => "[password1]",

                     "[user2" => "[password2]";

if ($valid_users[$username] == $password) {

  http_response_code(201); # return 201 "Created"

} else {

  http_response_code(404); # return 404 "Not Found"

}

?>

Press Ctrl-X then Y then ENTER to save and exit.

(You can add as many users as you like with individual usernames and passwords.)

This code will check if the username and password of the RTMP player is correct. If incorrect, a 404 error will be sent.

Open and edit the config file

sudo nano /etc/nginx/nginx.conf

Make changes to look like this:

rtmp {

  server {

            listen 1935;

        Chunk_size 4096;

        ping 30s;

        notify_method get;

         

        application live {

          live on;

          on_publish http://[IP Address].com/rtmp_auth.php;

          record off;

        }

  }

}

Press Ctrl-X then Y then ENTER to save and exit.

To send RTMP from an encoder, use the following address:

rtmp://[IP Address]/live/[user1]?psk=[password1]

In this case, the ‘streaming key’ is the username and password in the format shown above.                        

Testing Incomplete

https://www.raspberrypi.org/documentation/remote-access/web-server/nginx.md

https://smartshitter.com/musings/2018/06/nginx-rtmp-streaming-with-slightly-improved-authentication/

Example #1 - Streaming Bridge

This is like the streaming bridge. However, it does require two devices, a Raspberry Pi on your network running NGINX and a playback device. This playback device could be a Raspberry Pi with OMX Player or it could be any computer running VLC.

In this example, we have a programme being produced using an ATEM Mini Pro. The client wants to send a video feed of the programme to another building on another network. You’ll need to set up forwarding port 1935 to your Raspberry Pi’s IP address  on your network’s router.

Run NGINX on the RPi listening to Port 1935 as above.

Stream the Atem Mini Pro to the  RPi on RTMP. (Set up a custom RTMP destination in the streaming XML)

Ensure your streaming Key is strong.

You should now be able to play the stream from anywhere using the RTMP address of the public IP address.

By default, NGINX will support multiple connections. These are set up each time using port 1935 and unicast so each connection is set up independently.

Aaron Parecki has a video guide of this setup linked here.

NOTE: Sending RTMP over the internet could be fairly network intensive. This will only work with fairly low bitrate, low resolution video.Testing Incomplete

Dynamic DNS

Your public IP address assigned to the router is required by any device outside the network. This will likely change each time the router has a power cycle or from time to time much like DHCP. To avoid having to manually type in the public IP address of the Raspberry Pi each time, dynamic dns can be used to assign the public IP address to a fixed domain. This domain can be used in place of the public IP address in the RTMP link.

There are a list of free services here. Testing Incomplete

FFMPEG

FFMPEG is a system to convert between codecs and hardware instances. It could be useful to receive an RTMP feed and convert it to a different codec. Testing Incomplete

Restreaming

The Atem Mini Pro only has one RTMP encoder built in. Therefore, you can’t send it to more than one place at a time. However, by sending the RTMP feed into the Raspberry Pi, NGINX can distribute that feed to many different destinations like YouTube, Facebook, Twitch etc.

To do this, in a terminal open the NGINX config file by typing:

sudo nano /etc/nginx/nginx.conf

Find where we configured RTMP earlier.

rtmp {

        server {

                listen 1935;

                chunk_size 4096;

                application live {

                        live on;

                        record off;

                }

        }

}

Underneath ‘record off;’, add push then your RTMP link from the streaming provider that you are given by YouTube, Facebook, Twitch etc.

It should look like this for a YouTube stream with the stream key provided by your YouTube Studio Page.

...

live on;

record off;

push rtmp://a.rtmp.youtube.com/live2/[stream key]

...

You can add multiple push lines to send the stream to multiple places. Ensure you only start a stream after you have configured the live stream title, thumbnail, privacy settings etc. Testing Incomplete

Cloud Server

Unfortunately, in most venues, you won’t have admin access to their networking equipment.  Therefore, your RTMP server could be on your own network with admin access. The diagram below shows the setup for a portable solution.

For receiving incoming video from an RTMP encoder, the RTMP encoder sends its stream to the Public IP address or DDNS of Router A.  The NIGNX server on the RPi serves this stream up outgoing onto the internet. On your own internal network with no port forwarding available, you can then stream the RTMP feed pointing to the Public IP address or DDNS of Router A.

The same is true of sending video to another source but in reverse. The encoder, from within your network, sends RTMP to the Public IP address or DDNS of Router A. The RPi NGINX restreams this on the internet accessible by any decoder using that same IP address or DDNS.

As far as I’m aware, this is the only solution to avoiding network configuration of whichever network you are streaming from for free. You have effectively made a personal cloud solution. There are services that could run this for you in the cloud with much higher processing power like Google Cloud, AWS, Microsoft Cloud. However, these will all have a running subscription cost. Testing Incomplete

2.5: Station Clock

https://www.nayuki.io/res/full-screen-clock-javascript/full-screen-clock-24hr-with-seconds.html

https://pimylifeup.com/raspberry-pi-kiosk/

https://learn.sparkfun.com/tutorials/how-to-run-a-raspberry-pi-program-on-startup#method-2-autostart

https://scribles.net/silent-boot-up-on-raspbian-stretch/

Set this up full screen on boot using a chromium browser

We’ll use the following packages.

sudo apt-get install xdotool unclutter sed

Set up the Pi to auto login to a desktop environment:

sudo raspi-config

1:System Options ; S5:Boot/Autologin ; B4:Desktop Autologin

<Finish>

Now we’ll write a script to start Chrome full screen.

nano /home/pi/kiosk.sh

Within this file, add the following:

 (Note that some of these options are incompatible with older RPis. My RPI 1b skips over the lines it doesn’t like)

#!/bin/bash

xset s noblank

xset s off

xset -dpms

unclutter -idle 0.5 -root &

Sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromium/Default/Preferences

sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/pi/.config/chromium/Default/Preferences

/usr/bin/chromium-browser --noerrdialogs --disable-infobars --kiosk https://www.nayuki.io/res/full-screen-clock-javascript/full-screen-clock-24hr-with-seconds.html &

Press Ctrl-X then Y then ENTER to save and exit.

For more in depth info into what this script does, see the PiMyLifeUp link above.

We can now autostart this script when the Pi boots into the desktop environment.

mkdir /home/pi/.config/autostart

nano /home/pi/.config/autostart/clock.desktop

 

Copy the following into the file:

[Desktop Entry]

Type=Application

Name=Clock

Exec= sh /home/pi/kiosk.sh

2.6: Scoreboard

Custom Solution Needs Tidying Up

2.7: Stream Deck - Companion

https://github.com/bitfocus/companion

https://github.com/bitfocus/companion/wiki/Companion-on-the-Raspberry-Pi

The Streamdeck is a hardware button grid usually used by gamers. Bitfocus Companion is a piece of software that enables communication with the Streamdeck and lots of broadcast devices like Atems. Running the companion software on a Pi means you can simply plug in the streamdeck and be ready to go without the need for a laptop.

2.8: VPN

If you don’t have access to the router that gives you a public IP address, e.g. you’ve been given a LAN connection to connect your router to, then a VPN will allow you to work with sources and destinations outside the network. This is because port forwarding needs to be enabled on the router that interfaces with the internet. A VPN (Virtual Private Network) means that a device outside the network is given a virtual IP address from within the network. The reason this is beneficial is that you could send and receive RTMP or NDI to someone in a different location. Unfortunately, VPNs will incur more latency as the packets are encrypted as they’re sent to your network. It is possible to run a VPN on a Raspberry Pi. Testing Incomplete

https://www.pcmag.com/how-to/how-to-create-a-vpn-server-with-raspberry-pi

2.9: Cleanfeed - Podcasting

https://cleanfeed.net/

https://blog.cleanfeed.net/cleanfeed-on-a-raspberry-pi/

Set this up full screen on a browser

2.10: H2R Graphics

https://github.com/cjdenio/h2r-graphics-linux/releases needs compiling for ARM?

2.11: Skype Guest

Skype added support for NDI in 2018. This means you can send individual callers to an NDI feed to include in your show. The Raspberry Pi can’t be used for the actual Skype call. However, the Dicaffeine software in 2.2 could be used to bring a guest into an Atem.

Skye for content creators would need to run on a computer on the network set up to output NDI feeds.

To do this go to Settings, Calling, Advanced and Allow NDI Usage.

2.12: Streaming Bridge

2.13: Teleprompter

https://imaginary.tech/teleprompter/

2.14 - Compiling FFMPEG

2.14.2: SRT

SRT is the new standard of live transmission with very little latency. It is supported by a number of hardware and software encoders and decoders. However, there is limited support for free SRT servers. SRT uses UDP, meaning latency remains incredibly low. We’ll use FFMPEG, a free program that can convert between many formats.

NOT WORKING FULLY YET

Compiling FFMPEG with SRT Support

Compile SRT from Haivision (Run after creating /ffmpeg_sources)

1 - sudo apt-get install libssl-dev cmake build-essential

2 - cd ~/ffmpeg_sources

3 - git clone --depth 1 https://github.com/Haivision/srt.git

4 - mkdir srt_build

5 - cd srt_build

6 -  cmake -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED="OFF" -DENABLE_C_DEPS="ON" ../srt

7 - make

8 - make install

FFMPEG Ubuntu Guide

Compile FFMPEG

1 - cd /home

2 - mkdir -p ~/ffmpeg_sources ~/bin

(run the SRT code here)

3 - cd ~/ffmpeg_sources

4 - wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2

5 - tar xjvf ffmpeg-snapshot.tar.bz2

6 - cd ffmpeg

7 - make distclean

8 - PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --enable-libsrt --disable-shared --pkg-config-flags="--static"

9 - make 

(This step will take a while)

10 - sudo make install

11 - hash -r

Check that ffmpeg has been compiled correctly:

ffmpeg -protocols

This should return a list of supported protocols and SRT should be included in both input and output

Currently This returns 1 error and srt is not included in the list of protocols


Diagram of SRT streams:

This diagram shows an instance in which an SRT stream is received at a remote site without a known IP address. This could be used as a confidence monitor or remote autocue when using the open internet or on 4G or 5G.

This is also how the streaming bridge would work with the received video being on another known network.

To receive video from a remote contributor, the FFMPEG modes are reversed. The Source SRT stream will be in Caller Mode meaning the Listener IP address (studio) is known. Below is a table explaining the uses of each of the SRT Call Modes.

Listener Mode is always the device where you’ve set up port forwarding and know the IP address of the device.

From the SRT alliance deployment guide:
https://www.vmix.com/download/SRT_Alliance_Deployment_Guide.pdf


FFMPEG Commands

SRT Source Caller Mode - For use at the camera end when when sending video to a studio of known IP address:

SRT Destination Listener Mode - For use in a  studio when receiving a camera feed from unknown IP address:

SRT Source Listener Mode - For use when sending a return feed, remote autocue or as a streaming bridge when the destination address is unknown:

SRT Destination Caller Mode - For use on the receiving end when the Video coming in is from a known IP address e.g. streaming bridge:

I have not fully investigated the use of SRT but there are some links below.

https://medium.com/@eyevinntechnology/using-ffmpeg-and-srt-to-transport-video-signal-to-the-cloud-7160960f846a

https://www.vmix.com/download/SRT_Alliance_Deployment_Guide.pdf

https://github.com/Edward-Wu/srt-live-server

https://trac.ffmpeg.org/wiki/CompilationGuide/RaspberryPi

https://stackoverflow.com/questions/50967706/how-to-compile-ffmpeg-with-enabling-libsrt

https://github.com/Haivision/srt/issues/1176

https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

https://stackoverflow.com/questions/55176242/how-to-configure-ffmpeg-with-libsrt-secure-reliable-transport-protocol

https://www.youtube.com/watch?v=GTzEAU108Mg&t=301s

https://ffmpeg.org/ffmpeg-protocols.html#srt

https://srtlab.github.io/srt-cookbook/apps/ffmpeg/

http://www.ffmpeg-archive.org/compile-error-ERROR-srt-gt-1-2-0-not-found-using-pkg-config-td4683816.html

https://www.undergroundnews.dk/index.php/item/107-rtmp-eller-srt-streaming

2.15: Playout Bee

Playoutbee is a Hyperdeck emulator that should allow you play video clips from a raspberry pi 4 and be controlled by the Atem software control or through companion

https://gumroad.com/l/playoutbee

3.0: Making a streamlined system

We don’t want to have to deal with command line interfaces or even a mouse and keyboard when installed into a streaming system. If we have multiple Pis with only one function each, the Pi could boot into the process it’s intended for.  If the Pi has more than one function, we need to find a way to select a function easily. We could do this with either a touch screen or physical GPI buttons.

3.1: Start on Boot

For single use RPis, starting the program on boot means no user input is required.

https://learn.sparkfun.com/tutorials/how-to-run-a-raspberry-pi-program-on-startup#method-2-autostart

3.2: Touchscreen Control

Raspberry Pi 7" Touch Screen

3.3: Start a program with a button

https://www.instructables.com/id/Use-a-Button-to-Execute-Commands-on-a-Raspberry-Pi/

Thank You

Thanks for reading this far. It's quite exciting what these inexpensive little computers can do and having a few in a flight case running a livestream could be super fun. As you can see, I have a load of other ideas to take this guide. I’m sure you clever people will have some excellent ideas too.

If you’d like to contribute to this guide, contact me here with your ideas or simple reply to this forum post.

Maybe you have another idea to add to this, or want to help by writing one of the incomplete sections or you’ve just spotted a mistake in my logic or spelling!

This is an evolving project and I’d love to have a full hardware and software solution at the end of this guide with loads of Raspberry Pis mounted in a rack, each with these different functions to create a fully featured atem box with remote guests, outside sources, graphics etc.