Raspberry Pi Networked Camera Software

Final useful piece of the puzzle for me was to find a usb powered powered usb hub. This one seems to work, so I can run it off a battery pack along with the pi and not drop voltage and throttle the cpu.

You may run into USB bandwidth issues trying to connect multiple capture cards if you plan on trying that. The Pi is limited to 4Gbps shared among all of the usb ports and the 1080p60 raw feeds chew up just over 2Gbps is seems.

Also, I had some issues with my Elgato through the Anker hub I tried but hopefully it works for you.

I picked up an EVGA XR1 Lite that should be here Sat to play with. It’s about $60 and seems reasonable comparable to the HD60 so that might be a cheaper option than Elgato stuff.

I’m also testing a Jetson Nano 2GB as well since the Pi4’s seem a bit tricky to get at the moment.

Keep me posted of when you give this a shot and how it works. I’m still working on one of our locals to give it a try for a tournament later this winter.

Short test stream this morning. I think it looks pretty good. I will try a full 1-2 hour stream some time soon. I haven’t tried any audio stuff yet.

Setup

  • 2x pi4
  • zv-1 running at 1080p60 into camlink on one pi.
  • cx405 running at 720p60 into camlink on the other pi + c922 running at 720p60.
  • 2 external batteries powering cameras, pis and usb hubs that the camlinks are plugged into.
  • Pis running wifi to a router access point my laptop is hardwired into
  • laptop connected to a second network via Wifi that has internet access for streaming.

https://www.twitch.tv/videos/1191126447

2 Likes

That looks great! Let me know if you run into issues with longer streams and the video sync. I think most of that has been solved but I haven’t done a long stream to really test it. There are some sync options for the gstreamer OBS side that can be played with.

The EVGA XR1 Lite is really impressive. Cheaper than either of the Elgato options and it looks to have a built in downscaler to the 720p60 which should help the FPS on the PI without having it responsible for that. I definitely recommend trying it out as it also has hdmi passthrough which might be helpful hooked up to some monitor for alignment aids. Or even secondary large playfield overhead if you’re doing more of a stationary kind of thing.

1 Like

v3.1.0 (gammagoat edition) released.

Now uses the v4l2h264enc to support h264 hardware encoding at 720p60 (downscaled 1080p60). And a couple other UI tweaks.

2 Likes

First attempt at a location stream was a partial success, but mostly failure. The zv1 into camlink just didn’t seem to work. Possibly I can tweak the setup. Maybe trying to also have audio caused problems, but I suspect the 1080 input is just too much.

Luckily, my xr1 lite arrived today, so hopefully the hardware scaling will help.

My cx405 at 720 and c922 on the other pi worked great, I think.

Sweet. I’m going to be streaming a launch party this weekend but only using the Brio and C920’s. But I cam messing with the remote audio which is a bit hacky for OBS since using it with the gstreamer plugin has caused me many headaches.

If you want to mess around with that too, I’ve had success on Linux sending the audio to a loopback device instead of the OBS audio and then using an audio source from the loopback as a workaround for the latency as OBS seems to treat them differently or I just don’t know how to make the gstreamer plugin audio play nicely.

Well, my first attempt in the last couple years went OK. After struggling to get my networking working right I was able to get all four rigs running. My mic was clipping out for most of the stream until I fiddled with it later and my playfield was not a smooth 60fps and I’m not really sure why. So I’m going to need to play around with some settings clearly and maybe try the camcorder to see if it was the Brio struggling or somewhere else in the chain. But at least I’m setup to start doing location streaming again so yay.

Working on an update for the OS to latest and also support for the Razer Kiyo Pro. Tested one recently and I actually like it better than the Brio. It does have a small issue with the exposure settings needing to be set in Windows/OSX since the Linux support doesn’t seem to work properly but they do retain their settings it seems so that’s helpful.

Also working to fix the issue of needing to plug in the Brio (and some other devices) after the Pi starts up due to some firmware settings around the USB power.

1 Like

Hi everyone,

I recently started streaming a wired setup with 2 webcams and a Sony A7RII via Camlink 4k. Im looking to streamline this into one ethernet via a pi4 and wanted to know if there are any more updates on this topic.

How do i flash the software to the SD card?

Thanks

Here is how it is looking as of now.

https://www.twitch.tv/greatestvision

I am actively working on the project. I need to get a new image built with the changes for the Kiyo Pro and Kiyo Pro Ultra cameras but it should support the Camlink already since I’ve played with that and a Sony CX405 before.

The easiest way to flash the image would be to use the Raspberry Pi Imager they provide.

It makes the job pretty easy and you can just select the custom option for the operating system and point it to the picam.img file after unzipping it.

The slightly trickier bit is using it with Windows and OBS since for the best latency you need to install the gstreamer package (Installing on Windows) and gstreamer plugin for OBS (Releases · fzwoch/obs-gstreamer · GitHub).

I run my setup on Ubuntu but I can help with setting things up in Windows as well.

I’ll see if I can get a new image made this weekend since I’m pretty sure I’m a version back on the latest OS and updating on the Pi takes quite a while and is often better just to flash a new image.

1 Like

:face_with_spiral_eyes:

Looks more complicated than i thought…but i have time. Ill tinker with this all day Saturday when it arrives. I went ahead and got the extreme kit with a fan and 128 GB. I wasn’t sure what size was needed or if the fan was a big deal.

I would love to make an OBS plugin of my own but those can be a bit complicated and are a bit out of my experience area. Are you running OBS with a Windows machine? You can get it up and running using the OBS Media Source but the latency on that is 1-2s if I remember and I didn’t know of any way to control it through the options. That may have changed in one of the latest versions though.

The software doesn’t require much from the Pi so even the 2GB version is fine with a small SD card. Fans are helpful since the Pi4 gets pretty hot, but I just run them in a Flirc case on their side which seems to keep them under the throttling temps. Generally there’s not much CPU getting used since the preferred way is to use the hardware encoder for the Camlink and either H264 or mjpeg for the webcams depending on which ones you’re using.

So the Pi is mostly just a mechanism to send the data over the network and doesn’t do much of the heavy lifting like your PC would be for OBS.

It’s worth noting though that you can usually only run the Camlink and one webcam at a time without a powered hub since the Pi doesn’t pass enough power for all three devices. If you’re using C920s then you might be able to get away with it but it could be flaky.

I’m long overdue to put together a YouTube video tutorial but it will eventually come.

1 Like

Sounds good! I’ll share my findings.