Automating OBS with the Webcast Portal

Using the Church Webcasting System, YouTube, etc. Including cameras and mixers.
jeremywillden
New Member
Posts: 32
Joined: Sun Mar 19, 2017 8:24 pm

Automating OBS with the Webcast Portal

#1

Post by jeremywillden »

Would you like to have a computer at each building with OBS Studio that self-configures and then automatically starts streaming when your scheduled event begins, then shuts down when the event ends? The script below is at the core of our automation efforts and substantially reduces the weekly setup effort, allowing us to focus more on the Sabbath and less on the technology, while enabling our at-risk and ill/quarantined members to participate in Sacrament meetings each week.

This is very much a work in progress, but I wanted to share this to see if there is any interest. I've written code to automate the configuration of OBS Studio with the stream URL and stream key from the webcast site, which generates an XML file for Teradek encoders. Currently written as a Linux shell script, run once a minute by a cron job (but in theory could be converted to Powershell and run as a scheduled task in Windows), it queries the church server for the particular encoder number for your building, parses and converts it into the configuration files for OBS studio (caching them for comparison later) and launches OBS and starts streaming automatically. The script continues running once per minute, watching for the stream URL to disappear (indicating the completion of the event), at which point it shuts down OBS.

With a "sacrament" scene (no audio, blank picture with a message) the stream continues in silence for the portion of the meeting that is not to be streamed, while leaving the stream running for the next meeting in the building without failing over to the (loud) choir music. Once the event is scheduled, the only necessary human intervention is to set the scene for the Sacrament ordinance, or if a network or other issue pops up. We ran all four buildings in our stake today with this method and other than upload bandwidth issues (looks like we'll be disabling WiFi in some/all buildings each week) everything ran flawlessly today.

Whether you create a single event for each building each week, or an individual event for each ward or branch meeting, the script should still work.

As it's a work in progress, I'll post it on my Github account. If you care to contribute, pull requests will be very welcomed.
https://github.com/jeremywillden/obs-automator

Background:
Rather than purchase Teradeks for the three buildings that don't have them, I "upcycled" four 2009-era iMacs that I had on hand (purchased surplus from the school district for $35 each a few years ago, and upgraded with a second Gig of RAM for $15 each), giving us computers with built-in cameras, good-size screens, analog audio input, wired and wirelss networking, all for less than the cost of a comparable Raspberry Pi with a camera, USB sound input adapter, SD card, cases, and so on. As these machines are no longer supported by Apple with the Mac OS, I installed Ubuntu (opting to omit the office apps an other unnecessary stuff). While unnecessary for most of us, I've even automated the setup of these machines with Salt Stack, so after the base OS is installed, everything else is handled by a few commands on the Salt Master, so in theory I could configure thousands of machines in the same time as it would take to do a few. All that auto-configuration is not polished, so I won't post it yet.
User avatar
hicksticks2001
New Member
Posts: 39
Joined: Sun Aug 14, 2016 11:35 am
Contact:

Re: Automating OBS with the Webcast Portal

#2

Post by hicksticks2001 »

I was considering the OBS route - but then in another thread someone started posting custom firmware for J-Tech IPV encoders, which only cost $160.
https://www.amazon.com/J-Tech-Digital-S ... B0761X6L3C

See thread:
viewtopic.php?f=27&t=37546

They have written custom firmware so that it automatically configures and even switches broadcast from one ward to the next. I personally like these devices because once they are registered, you just need to provide internet over Ethernet, provide audio and video via HDMI, and power.

I know my comment isn't the exact response you were looking for - and I think it's awesome all of the amazing ideas people have come up with to make Ward Broadcasts possible in different units - I'm just sharing that I have found the J-tech approach to be the best for what we are trying to do in Payson, Utah.
-Aaron Hixson
Payson Utah Mountain View Stake
aaron@hixsonfamily.net
jeremywillden
New Member
Posts: 32
Joined: Sun Mar 19, 2017 8:24 pm

Re: Automating OBS with the Webcast Portal

#3

Post by jeremywillden »

That looks great, I'll dig in and try that out as well. The downside with that approach is about twice the cost of what I've set up, and the less-than-elegant "pull the plug" method of stopping for the Sacrament. With the $160 encoder, camera, cabling, and more, I'm confident this is more cost-effective (about half the cost or less, depending on whether you can use old computers lying around like I did, or buy them surplus from a school or other organization), but I'm excited to try out the J-tech encoder as well. Thanks for the heads-up!
jeremywillden
New Member
Posts: 32
Joined: Sun Mar 19, 2017 8:24 pm

Re: Automating OBS with the Webcast Portal

#4

Post by jeremywillden »

A few pictures of the setup. With the cable for direct audio feed, there's a little more cost, but each building in our Stake was equipped with $50 worth of upcycled computers with an additional Gig of RAM, using the built-in Webcams. Streaming starts and stops automatically, with manual control to switch to a black screen with a message or any arbitrary video clip (I used some Tabernacle Choir music on a loop with a lower audio level than the one provided by the Church streaming system, which tends to "blast" our viewers because the sound level is often quite a bit higher than nominal sound levels).
4-wards-live-dashboard.jpeg
Dashboard of four of our wards simultaneously meeting.
(633.84 KiB) Not downloaded yet
direct-audio-feed.jpeg
The record out port provides better quality audio
(1003.33 KiB) Not downloaded yet
easy-cabling.jpeg
Not a lot of cables required - wired network is recommended
(635.05 KiB) Not downloaded yet
upcycled-computer-free-software.jpeg
$50 for surplus iMac including a RAM upgrade
(722.16 KiB) Not downloaded yet
clingmann
New Member
Posts: 18
Joined: Thu Dec 06, 2012 9:35 pm

Re: Automating OBS with the Webcast Portal

#5

Post by clingmann »

Could you elaborate a bit on how you are taking the audio from the church system and piping it into the webcast? A simple HD webcam on a music stand riser to an old computer is easy. Getting the audio OUT of the church PA and into the computer running the webcast is the part I think most are struggling with (I know I am).
jeremywillden
New Member
Posts: 32
Joined: Sun Mar 19, 2017 8:24 pm

Re: Automating OBS with the Webcast Portal

#6

Post by jeremywillden »

In most (hopefully all) building there is a port labeled "Record Out." It's often under the sacrament table, a clerks' table, near the pulpit, or somewhere else (reasonably) convenient. For decades the Church has installed cassette tape recorders nearby so the meetings could be recorded for shut-ins who could not attend in person, or back when missionary farewells/homecomings were allowed, to record those meetings. This port is the best/easiest way to get higher-quality audio into your laptop/streamer. A very long 1/8" to 1/8" male-to-male extension cable is usually enough to do the trick. I've seen some chapels where the output is on an RCA port instead of a 1/8" headphone jack, requiring an adapter or an RCA to 1/8" cable, but either way it's a direct feed out of the chapel sound system. In one of our chapels, the port is not functional, and I've had to run the cable much further to reach the audio rack and patch it into one of the mix outputs directly, but consider using an "assistive listening" wireless receiver if you don't have any other good options (though the audio quality tends to be much worse and the sound level is much higher - you may need a Pad (signal attenuator) to reduce the signal strength.
record-out-port.jpg
record-out-port.jpg (73.59 KiB) Viewed 1873 times
On my setup I run a cable to the line or microphone input on the computer. Under Linux, you can select whether the input is treaded as microphone level or line level, but the short version is: you adjust the input level (in the Mac/Windows/Linux) software control/preferences panel until you get a good level when people are speaking. You don't want it to max out, but you do want it well about half-way when someone is speaking, perhaps approaching the max when a very loud person speaks. Remember that the sound system needs to be on for the Record Out port to work.

I'm attaching a picture of one such port. The extra wires you see are for splitting the audio to go to both the video streaming computer and the separate (audio streaming only) Raspberry Pi units I've been using for years for some of our shut-ins. On a related note, if you use Linux systems, you can adjust the microphone inputs levels remotely through SSH (secure shell) using the alsamixer command, navigating to the "capture" screen. The SSH connection takes far less bandwith and processing power than a VNC screen sharing session to accomplish the same task.
alsamixer-capture-page.jpg
(123.35 KiB) Not downloaded yet
Attachments
alsamixer-capture-page.png
(426.6 KiB) Not downloaded yet
chrismiltimore
New Member
Posts: 3
Joined: Sun Oct 11, 2020 7:40 pm

Re: Automating OBS with the Webcast Portal

#7

Post by chrismiltimore »

I am having an issue hooking the church audio into the computer. My computer does not have a line in...it has a headphone jack which I think I can use as an audio in. Is anyone else having issues getting audio from the church mics?
russellhltn
Community Administrator
Posts: 34418
Joined: Sat Jan 20, 2007 2:53 pm
Location: U.S.

Re: Automating OBS with the Webcast Portal

#8

Post by russellhltn »

chrismiltimore wrote:I am having an issue hooking the church audio into the computer. My computer does not have a line in...it has a headphone jack which I think I can use as an audio in. Is anyone else having issues getting audio from the church mics?
It's probably a "headset" (not headphone) TRRS jack.

I'd suggest looking at this post about a $8 USB adapter that will work. It's simpler and cheaper to go that route than to work out the details about getting your soundcard to work. It can be done with the right cable, but that costs something like $20.
Have you searched the Help Center? Try doing a Google search and adding "site:churchofjesuschrist.org/help" to the search criteria.

So we can better help you, please edit your Profile to include your general location.
brad_p
Member
Posts: 148
Joined: Sat Jan 12, 2013 6:29 pm

Re: Automating OBS with the Webcast Portal

#9

Post by brad_p »

chrismiltimore wrote:I am having an issue hooking the church audio into the computer. My computer does not have a line in...it has a headphone jack which I think I can use as an audio in. Is anyone else having issues getting audio from the church mics?
I've used multiple laptops on our building's 3.5mm out. It's really up to the laptop, it gets finicky.

The output is a Left/Right feed, and some laptops DO pick it up as a mic or a line in source. For others, I have to plug in the TRS to TRRS adapter before the laptop recognizes it.

If you don't have a 3.5 mm out, or yours is broken and giving out bad sound (we have both issues in two of our stake's buildings), we've had success using a FIFINE desktop mic ($80) up near the pulpit and running a USB extension cable. I've tried a half dozen other approaches, including the wireless system for hard-of-hearing folks, and the FIFINE gave the best performance (you want to do a test when someone is playing the organ, we turned our mic volume to about 50%)
russellhltn
Community Administrator
Posts: 34418
Joined: Sat Jan 20, 2007 2:53 pm
Location: U.S.

Re: Automating OBS with the Webcast Portal

#10

Post by russellhltn »

This post talks about an $8 USB adapter that is predictable, and can handle the line out from the "record out" jack without an attenuator. All you need is a simple 3.5mm to 3.5mm cable.

As a note, the building output, if it's a 3.5mm jack, is a mono/left only. Not a "stereo" with the same program in both channels. The suggested adapter is a common single-mic input, so that's fine.
Have you searched the Help Center? Try doing a Google search and adding "site:churchofjesuschrist.org/help" to the search criteria.

So we can better help you, please edit your Profile to include your general location.
Post Reply

Return to “Non-Interactive Webcasting”