FFMPEG/OwnCast/HDHomeRun
If you’re wanting to stream HDHomeRun channel to your own OwnCast server
I’m using Debian like everything else I do
-
apt install -y ffmpeg
-
ffmpeg -i "http://IP_OF_HDHR:5004/auto/vCH.N" -c:v libx264 -c:a aac -b:v 512K -maxrate 512K -bufsize 1M -f flv rtmps://OWNCAST_URL:PORT/live/STREAM_KEY
-
You can now go to your owncast URL and it should be streaming
SystemD Service
nano /etc/systemd/system/hdhomerun-stream.service
[Unit]
Description=HDHR Daemon
After=network.target
[Service]
User=plex
EnvironmentFile=-/etc/default/hdhomerun
Group=plex
Type=simple
wExecStart=/usr/bin/ffmpeg -i "${CHANNEL}" -c:v libx264 -c:a aac -b:v 512K -maxrate 512K -bufsize 1M -f flv "${URL}:${PORT}/live/${KEY}"
Restart=on-failure
[Install]
WantedBy=multi-user.target
Env File for SystemD Service
nano /etc/default/hdhomerun
URL=rtmps://OWNCAST_URL
PORT=PORT
KEY=STREAM_KEY
CHANNEL=http://IP_OF_HDHR:5004/auto/vCH.N
<- OTHERS ->