Live Streaming App/Jail Suggestions

victort

Guru
Joined
Dec 31, 2021
Messages
973
Since I have little to no experience with live-streaming, I'm wondering if anyone has any suggestions?
Im looking for an app or jail that will be able to stream some audio from a mic/amplifier/linein source to a url.
OBS Studio looks promising, but if anyone has anything else...
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
And if anyone is interested in live streaming video from a jail, you can either build Nginx from source with the rtmp and stream modules, or install nginx-full using pkg (which has the proper modules) then follow this tutorial

Works fairly well.


Forget all that. I just found an incredible tool. Mediamtx is a great tool for streaming, and implements mobile viewing as well. But you have to build from souce, but it takes about 2 minutes. Here are the instruction for anyone...

1. pkg install git-lite go121 nano
2. mkdir /usr/local/www && cd /usr/local/www (or put it anywhere you like, but i prefer this path)
3. git clone https://github.com/bluenviron/mediamtx && cd mediamtx
4. go generate ./... then go121 build . (this will take about 30 seconds)
5. cp mediamtx /usr/local/bin/ && cp mediamtx.yml /usr/local/etc/
6. chown -R www:www /usr/local/www && chown www:www /usr/local/etc/mediamtx.yml
7. mkdir /usr/local/etc/rc.d && nano /usr/local/etc/rc.d/mediamtx and copy/paste the next block (this will be the rc script)
Code:
#!/bin/sh

# Mediamtx FreeBSD Service Script

# PROVIDE: mediamtx
# REQUIRE: LOGIN
# KEYWORD: shutdown

. /etc/rc.subr

name=mediamtx
user=www
rcvar=mediamtx_enable

: ${mediamtx_enable:="NO"}

pidfile=/var/run/${name}
command=/usr/sbin/daemon
command_args="-f -u ${user} /usr/local/bin/${name}"

load_rc_config $name
run_rc_command "$1"

8. chmod +x /usr/local/etc/rc.d/mediamtx
9. service mediamtx start
10 . Start streaming from an rtmp client, including mobile clients!

The config file is at /usr/local/etc/mediamtx.yml if you want to make changes. It's pretty well documented on their github.
 
Last edited:
Top