If you’re wanting to stream HDHomeRun channel to your own OwnCast server

I’m using Debian like everything else I do

  1. apt install -y ffmpeg

  2. 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

  3. 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