-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple Terradeck Emulation #4
Comments
We have the same issue with multiple wards in the same building but our STS went for a single event that lasts for 5 hours and we just stop the broadcast (either through the cockpit interface or the remote control outlet) between wards. I actually would be very interested in figuring out how to make this work as you suggest but I'm not sure how to handle the logic for multiple autoconfig URLs in a predictable manner. If we were watching multiple autoconf URLs and the events never overlap it would be pretty simple to just use whichever was active, but what happens if they overlap? (Especially since the webcast system gives us so little granularity in scheduling.)
From an automation perspective, it might actually be easier with three encoders than two. |
My experiments so far used 1 stream going to from camera to v4l2 loopback device, then doing two streams from the loopback device to check servers. installing loopback device:
Start streaming from camera to loopback device:
Streaming from loopback device to outgoing #1:
Streaming from loopback device to outgoing #2:
But it's not outputting enough frames to keep up with the desired feed (speed is sub 1x) and the CPU is pegged. |
Ah. I hadn't even considered multiple streams as a solution to your problem. We just did something similar for a special stake meeting that needed to be broadcast in both Spanish and English. We split the video stream and used two separate audio streams going to two different encoders (rtmp URLs). Our experience confirms yours. The Pi isn't beefy enough to handle multiple streams so we had to use a laptop for that meeting. |
I had an idea last night, shift the conversion from mjpeg to h264 and bitrate set to the camera side. Then just use -vcodec copy on the outgoing streams. The downside is it locks the bitrate to the same for both streams. However it might solve the CPU issue, since it's not having to do the same mjpeg to h264 conversion twice on the same video feed. |
Okay, explored this a little. Got stuck on the fact that it doesn't seem to like picking up the h264 stream midway. Maybe @ChickenDevs will have insight? Camera side:
Stream side:
Camer side output:
Stream side output (with stream url removed):
|
Have you tried just using ffmpeg tee directly? I sucessfully tested two streams at ~55% CPU using the instructions from the ffmpeg wiki.
If that works in your testing then it would just be a matter of editing the cockpit plugin and the python script to handle two autoconfig urls. I would prefer to do that in a seperate branch, but I am happy to make the updates. |
Sadly, then it won't connect and disconnect the two broadcasts independently. The good news, is it seems like they resolved the issue in the church portal! yay! |
Goal: Accomodate sacrament meetings at the same location at 9:00am, 10:15am, 12:00pm with separate webcasts.
In order to schedule sacrament meetings close together, my STS has taken to setting up two encoders in the church Webcast platform. I'd like a single Pi to act to as a streamer as requested to both configurations. Starting and stopping independently based on separate Terradeck XML configurations.
The text was updated successfully, but these errors were encountered: