This is a fork of https://github.com/tmm1/androidhdmi-for-channels with these features:
- ENV variable support
- Standardize and improve script durability / reliability
- Allow multiple tuners from one set of scripts
- Allowing the tuner and encoder information to be dynamically set. Useful for docker containers, etc
- Support for FireTV and Hulu
- Test each pre script and if fails move on to next tuner before giving up
- M3U file serving with templating for IP Address
- Docker support
- Application based tuners (IE: magewell, hauppauge colossus 2 & anything ffmpeg supports!)
- E-Mail alerts on failures
- Global logging to disk with rotation
- Logging endpoint /logs for moments you do not have access to console with dynamic refresh!
- Webhook support on failure use $reason variable in URL.
- Custom script support - drop in your scripts and set STREAMER_APP env variable to match dir location
- Web graphs of cpu, mem, gpu (nvidia)
- Tee support (sending feed to a secondary target)
- Application based tuning! Just send the feed to stdout
- Dead video feeds restart - video locking up but audio working
- Use OCR if tesseract is installed looking for common questions such as Whos there? and Still watching?
- Download the Docker convenience script: $ curl -fsSL https://get.docker.com -o get-docker.sh
- Install Docker: $ sudo sh get-docker.sh
- Install Portainer:
$ sudo docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 --name portainer
--restart=always
-v /var/run/docker.sock:/var/run/docker.sock
-v portainer_data:/data
cr.portainer.io/portainer/portainer-ce:latest - Configure Portainer and add androidhdmi-for-channels.yml via Portainer-Stacks: https://:9443
- Add environment variable values to bottom section of Portainer-Stacks as defined in Docker compose.
- Deploy container. Use re-pull image and redeploy slider if the container has been updated since the last time you downloaded it.
- Check Portainer log for running container using Quick Actions button from Container list to check for errors.
version: '3.9'
services:
ah4c:
image: bnhf/ah4c:testlatest
container_name: ah4c
hostname: ah4c
dns_search: localdomain # Specify the name of your LAN's domain, usually local or localdomain
ports:
- 5037:5037 # Port used by adb-server
- 7654:7654 # Port used by this androidhdmi-for-channels proxy
- 7655:8000 # Port used by ws-scrcpy
environment:
- IPADDRESS=${IPADDRESS} # Hostname or IP address of this androidhdmi-for-channels extension to be used in M3U file (also add port number if not in M3U)
- NUMBER_TUNERS=${NUMBER_TUNERS} # Number of tuners you'd like defined 1, 2, 3 or 4 supported
- TUNER1_IP=${TUNER1_IP} # Streaming device #1 with adb port in the form hostname:port or ip:port
- TUNER2_IP=${TUNER2_IP} # Streaming device #2 with adb port in the form hostname:port or ip:port
- TUNER3_IP=${TUNER3_IP} # Streaming device #3 with adb port in the form hostname:port or ip:port
- TUNER4_IP=${TUNER4_IP} # Streaming device #4 with adb port in the form hostname:port or ip:port
- ENCODER1_URL=${ENCODER1_URL} # Full URL for tuner #1 in the form http://hostname/stream or http://ip/stream
- ENCODER2_URL=${ENCODER2_URL} # Full URL for tuner #2 in the form http://hostname/stream or http://ip/stream
- ENCODER3_URL=${ENCODER3_URL} # Full URL for tuner #3 in the form http://hostname/stream or http://ip/stream
- ENCODER4_URL=${ENCODER4_URL} # Full URL for tuner #4 in the form http://hostname/stream or http://ip/stream
- STREAMER_APP=${STREAMER_APP} # Streaming device name and streaming app you're using in the form scripts/streamer/app (use lowercase with slashes between as shown)
- CHANNELSIP=${CHANNELSIP} # Hostname or IP address of the Channels DVR server itself
#- ALERT_SMTP_SERVER="smtp.gmail.com:587"
#- ALERT_AUTH_SERVER="smtp.gmail.com"
#- ALERT_EMAIL_FROM=""
#- ALERT_EMAIL_PASS=""
#- ALERT_EMAIL_TO=""
#- ALERT_WEBHOOK_URL=""
#- UPDATE_SCRIPTS=${UPDATE_SCRIPTS} # Set to true if you'd like the sample scripts and STREAMER_APP scripts updated whether they exist of not
#- UPDATE_M3US=${UPDATE_M3US} # Set to true if you'd like the sample m3us updated whether they exist of not
- TZ=${TZ} # Your local timezone in Linux "tz" format
volumes:
- /data/ah4c/scripts:/opt/scripts # pre/stop/bmitune.sh scripts will be stored in this bound host directory under streamer/app
- /data/ah4c/m3u:/opt/m3u # m3u files will be stored here and hosted at http://<hostname or ip>:7654/m3u for use in Channels DVR - Custom Channels settings
- /data/ah4c/adb:/root/.android # Persistent data directory for adb keys
restart: unless-stopped
First see https://github.com/sullrich/ah4c/blob/main/getting_started.txt