I got tired of waiting for Blackmagic to ship the Streaming Bridge, so I decided to make one myself.
Blackmagic Design announced the Streaming Bridge back in July, and they said that it would be shipping by the end of August.
Well, it's September now and there's still no word from them.
Well, I decided I couldn't wait any longer for one, so I built one out of a Raspberry Pi.
In this video, I'll walk step by step through the process of how to use a Raspberry Pi to create what is effectively a Streaming Bridge.
First of all, let's talk about what the Streaming Bridge actually is and what it does.
It is a device you can use to capture the stream coming out of an ATEM Mini Pro and convert it to HDMI or SDI.
Normally you would stream from your ATEM Mini Pro to YouTube or any other streaming destination.
So instead you point it at this device and it catches that stream and then outputs it over HDMI.
So if you imagine you want to bring in a remote guest into your live shows, you can configure your guest's ATEM to stream to your Streaming Bridge.
Then you can feed the Streaming Bridge HDMI into your own ATEM and mix it as if they were sitting right next to you.
It's definitely a really cool idea and it's a perfect time to be launching this product.
But it's not actually out yet.
So let's take a look at how to use a Raspberry Pi to make effectively the same device.
One of the nice things about doing it with a Raspberry Pi is that you can actually stream to it from anything, not just in ATEM Mini, anything like OBS or any other hardware video,
encoders. So here's what we'll cover in this video.
I'm going to leave timestamps to all these sections below in case you want to skip ahead.
First, we'll talk about what parts you need for this.
We'll walk through setting up the Raspberry Pi with an SD card.
Well, then install a bunch of software and then configure that software and finally hook it all up and actually stream to it from ATEM Mini Pro.
First, let's talk about the parts you need for this.
You'll need a Raspberry Pi 4.
The 3 probably won't be fast enough.
You're going to need a micro SD card and SD card reader.
You definitely don't want to use a wired network connection for this.
Don't try to rely on wifi for this.
So make sure you have an ethernet cable and a network hub to plug those into.
You're going to need a micro HDMI cable to connect your Raspberry Pi to your ATEM and you're going to need a keyboard to set this all up.
Now, your Raspberry Pi may or may not come with the case.
I got this case separately for mine, which is actually a giant heat sink.
And that way there's no fan.
So it's completely quiet.
So as far as SD cards go, you don't need a lot of space for this.
We're not going be doing anything that requires a lot of disk storage.
But you do want to make sure you get one that's fast enough.
So make sure you get a micro SD card that has an A1 or A2 on it.
Sixteen gigabytes is fine, but I think you won't be able to find any of the fast A2 ones that are lower than 64 gigabytes.
It doesn't really matter. 16, 32, 64.
It's all fine. Just look for that A1 or A2 marking.
That means it's fast enough to be used as a hard disk for an operating system.
Ok, once you have all your parts here, you ready to now install the Raspberry Pi operating system.
All right, first things first.
You'll need to install the Raspberry Pi operating system.
So on your computer, visit RaspberryPi.
org, and click on downloads.
Go ahead and download this Pi imager app.
It's going to make it really easy to write the file to an SD card.
So open this up, get your SD card ready, drag this to your applications folder, then go ahead and launch the imager app.
In the list of operating systems, click on this "other" and then choose "lite".
We don't need a desktop environment for this.
It actually works better when it's just a command line.
Once you plug in an SD card, it'll show up in the menu here.
So go ahead and click on that and click "write".
This is going to go ahead and download the entire image and write it to the SD card.
It'll only take a few minutes.
All right, once it's done, you can pop out the SD card and put it into the Raspberry Pi.
So go ahead and pop the SD card into your Raspberry Pi and turn it on the first time you put it up.
It's going to resize the file system and then it'll reboot and put into your normal operating system.
Again, you want to make sure you plug it into the network.
So make sure you have an Ethernet wire plugged into a switch that your ATEM Mini Pro is also plugged into.
All right. Once it's booted it up, you'll see this login prompt.
Go ahead and type the default username and password.
The username is pi the password is raspberry.
It's a good idea to change the password from the default, so go ahead and do that now.
In order to change the password type "sudo raspi-config", press enter and the first option is changing the password.
So go ahead and type in a new password here.
When you type the password in it won't show you the letters that you're typing, but it doesn't ask you to enter it twice to make sure you type of the right thing.
And then just tab, tab over to finish, enter and you're back.
All right, now that that's out of the way, let's do some basic configuration of the video settings in the Raspberry Pi.
This will force us to the right resolution and frame rate so that you always know what it's sending out to the ATEM.
So in the terminal here, type sudo nano, which is a text editor and then slash boot slash config dot text that's going to let us out of this file.
There's a few things we're going to change in here.
We're going to take out these little hash signs which are comments.
So go ahead and find the one that's called disable_overscan and get rid of the comment and you'll see it turns white.
That's going to make sure the image fills the whole screen of the video.
Scroll down until you see hdmi_drive and uncomment that one, that will enable audio over HDMI.
Find hdmi_group just above that.
Set that to 1. And then hdmi_mode is what will set the explicit resolution and frame rate.
There's a few different options here.
I'm going to go ahead and set mine to 1080p60.
If you want a different option, I'll put the values up on the screen here in the table.
I'll also link to the documentation for this so you can actually see what the heck I'm doing.
So for 1080p60, I'm going to set it to the value 16.
To get out of this text editor press control X and then type Y, enter, and now it's saved.
Now, in order to actually have this take effect, we have to reboot the Pi.
So go ahead and type sudo reboot and we just wait for a minute for it to be back up and we be back in business pretty quick.
So the main program is going to do most of this work is called nginx.
It's a web server, but it also has a module that supports RTMP, which is what the ATEM can stream.
So we're going to go ahead and install this software first.
So this software nginx plus this module is what's going to catch the stream from the ATEM Mini and then it lets you do something with it.
You can actually do a lot of different things with it.
You can actually stream from this Raspberry Pi to multiple locations like YouTube and Facebook.
But what we're going to do with it is actually pipe it back into the machine using another piece of software called OMXPlayer, and that's going to output over the HDMI port.
So we'll walk through this step by step.
Don't get to overwhelmed just yet. The first thing we're going to do is install nginx, so log back in.
Then type sudo apt update, which is going to update the list of software available on this machine.
It'll just take a second to finish.
This will also test whether or not you have an Internet connection working.
So make sure you have it plugged into the Internet here.
All right. Now that that's done, type sudo apt install nginx libnginx-mod-rtmp,
hit enter and then type Y here, and that's going to go ahead and install these two pieces of software.
All right, looks like that all worked, so nginx is now running on this machine.
We need to now give nginx permission to use the HDMI port.
So to do that, we're going to run another command sudo usermod -aG video www-data
. That's going to basically add the web server user to the video group letting it use HDMI port.
You're not going to see any output when you enter, but that means it worked.
Okay, nginx is running.
If you were to visit this from a web browser on your computer, you would see a blank web page, but we don't care about that now.
We need to set up RTMP.
This is going to be a whole bunch of text that we're adding to one of the config files.
I'll make sure to link to the completed version of this in the description, but I will walk through it step by step, explaining it as we go.
So first we're going to edit the main nginx config file.
So type sudo nano /etc/nginx/nginx.conf.
That's going to load up our main nginx config file.
Now scroll all the way to the bottom, all the way to the bottom and we can start typing a new section down in the bottom.
Now this file is extremely picky about getting every single thing perfectly right, like every curly bracket and semicolon has to be perfect.
So if you get any errors, that's probably why just go back and double check the semicolon and the curly brackets to make sure they all match.
First thing we're going to do is make a new block called rtmp.
So go ahead and type in opening curly bracket and then close the curly bracket just so that you don't forget it later.
Inside this one, you go ahead and hit tab to indent it.
We're going to make a new server, so type server and then open curly bracket and then close curly bracket.
So inside the server we're going to tell it to listen on the RTMP port.
So type listen 1935, which is the default, RTMP port, make sure you type a semicolon after that, and that's all we need for that line.
All right. Now we need to make a new application.
So type application, give it a name.
We're going to call it live.
Now, this word live here, that's actually going to be in the URL of your RTMP endpoint.
So you can actually call it whatever you want.
You can have multiple of them.
We're just going to call it live and you'll see that we're going to use that in the URL later, do the curly bracket thing.
OK, now we need to do a few things.
We're going to first enable live streaming, so type live on and then semicolon, type record off, which will disable recording.
It is worth noting, though, that if you did want to have the Raspberry Pi record everything it receives over RTMP, you could do that here as well.
That's too much to go into this video, but I'll link to the docs in case you're curious about how to set it.
Up next, we're going to limit which devices can play this string.
We're going to set this up so that anybody can stream to it.
But we do want to limit who can play the stream.
So we're just going to say allow play and then 127.0.0.1 semicolon and then deny play all.
So that makes it so that only this machine can actually play back this stream.
Now, here's where the magic happens.
We're going to make a new line here called exec and this is going to actually run a command.
Whenever this gets a stream in the command, we're going to run is a command that's going to tap into the stream and output over HDMI.
And that is what the program called omxplayer.
So type omxplayer -o hdmi that makes sure it sends the audio out over HDMI, which is really important, and then you're going to
type the RTMP URL for this stream.
So I'm going to be rtmp://127.0.0.1/live and that's that live from earlier and then /$name Now
$name is actually going to be the stream key of whatever stream key is used to stream into this.
So you might notice that there isn't any stream key to find in here, which basically means that actually any stream key works.
That's important to remember because that actually means anybody can stream to this, which is fine for our testing.
But you might want to change that later.
So we're done with this file.
Go ahead and press control X type Y enter and now we need to restart nginx so that it sees those changes.
You can actually type sudo nginx -t, which will test the config, which is a good way to test to make sure you didn't make any typos.
If it says it works, that's great.
Now you can type sudo nginx -s reload and again, you won't see any message if it worked.
If you don't see anything, that's good.
The last thing to do is to install omxplayer because it's not installed by default.
So go ahead and type sudo apt install omxplayer.
Again, it just takes a couple of seconds.
So now at this point, you actually should be ready to go.
But again, I just want to point out that right now anybody can stream to this RTMP server with any stream key.
There's no access control on here.
And whatever comes in first is what's going to be played on the screen.
It is possible to limit that to only specific stream, but it's a bit more involved to set it up.
So I'll save that for a different video.
Now, if you do have proper stream keys set up and you want to actually put this on the Internet so that anybody in the world can stream to it, then you'll need to set up port
forwarding in your router.
That's definitely too involved to get into in this video.
So again, I will leave that for other tutorials or you can just go look up online because it totally depends on which router you have.
But if you put it forward of the RTMP port from your home Internet into your Raspberry Pi, anybody could stream into it and you would definitely wanna make sure you have stream
keys set up in order to lock it down at that point.
But we're ready now to push video to this from an ATEM.
So let's go ahead and set that up next.
For this next part, you'll need to find the IP address of your Raspberry Pi.
The easiest way to do that is while you're logged in type hostname -I and that's going to output an IP address that's on your network.
Now, again, this is only going to work from your local network.
This won't work from anywhere in the world.
Yet you would need to set up port forwarding to make that happen.
But anybody on your network can now stream to this IP address using the default RTMP port and push video to this.
So let's go ahead and do this in the ATEM software.
So this next part will involve creating a custom streaming destination in your ATEM Software Control.
There's two ways to do this.
You can either edit your Streaming.xml file, which is that file on your computer that tells the software which options to show in the dropdown list, or you can actually create
a separate XML file and then just load it into the software.
I actually really like that second option because what it means is that if you were sending this to a guest, someone remote, you could just email them this XML file and they
can load it into their software control without having to fiddle with any XML settings themselves.
I'll show you what this XML file looks like on my screen here, but I'll also make sure to link to it in the description so you can just copy and paste it.
So go ahead and copy this chunk of XML, but change the IP address here to the IP address of your Raspberry Pi.
My case, that's 10.11.47.17.
And then again, default port is 1935 and this live in the URL is that name of the application you made in the nginx config.
You can give it a name to show in the ATEM Software Control here.
We'll just call ours Raspberry Pi.
Go ahead and save that file and you're ready to download this into the ATEM software.
So in your ATEM software, go ahead and click on Stream, Load Streaming Settings, and then find that file and import that's going to now add a new option to
your dropdown called Raspberry Pi.
Again, the other way to do this is to edit your entire Streaming.xml file and make a new section there.
But that's a little bit more invasive.
But if this fails for whatever reason, you can always do that instead.
Now you're ready to type in a stream key and start streaming.
It doesn't matter what you type in here because we don't have any sort of access control.
So I'm just gonna call it test.
Set to Streaming High. All right.
With any luck, we're ready to try this out and see if it works.
So go ahead and press "On Air".
And with any luck, in a couple of seconds, I should pop up on the screen here.
There we go. All right.
There is definitely a delay.
And we can see if I switch back to multiview, this is my main camera and this is the feed coming back from the Raspberry Pi.
So it's fed into the ATEM, just like my cameras here, so we can actually mix to it like any other camera.
Now, of course, this is probably not the best demo because I'm streaming from this to this back to this.
But you get the idea.
If someone were to send me video remotely, it would show up here in the ATEM.
Now, as far as the delay goes, I haven't actually tried too much to try and get it lower.
I think you could probably experiment with some of the buffer settings in the RTMP server to get a little bit lower, but I don't think it'll be possible to get it anywhere close to
real time for a conversation, for example.
So if you did want to use this to have a remote guest, you would probably need to have also, in addition to this, a phone or a separate computer with an actual call between you
two. It's not part of the stream.
It's just so you can talk to each other and then you mix the good quality video in on the ATEM itself.
So this is a quick tutorial of getting this up and running.
I'll save the whole workflow side of interviews and stuff for a separate video.
It was a handful of work to get this running.
You can see it was mostly just copy and paste, but it still wasn't trivial.
Definitely not as easy as just buying a box off the shelf.
So if this was too much for you, but you still want this feature, you're definitely going to want to buy the Streaming Bridge when it comes out.
The Streaming Bridge is basically a plug and play solution that does exactly what we built here.
They even have some fancy tricks up their sleeve for dealing with network settings and exporting that config file automatically.
So you don't have to worry about hand editing XML.
I'm still waiting for my Streaming Bridge, but in the meantime, I can now use this and actually start trying out some of these remote workflows.
All right. Thank you so much for watching.
I had a lot of fun putting this together.
If you enjoyed this video, please give it a thumbs up and subscribe for more videos like this.
Thank you so much. And see you in the next one.