HDMI for Channels

@Anvil_DVR

I discovered the Live TV guide IDs are unique to each FireStick device. Slowed me down a bit, but I now have a shell script to extract those IDs and create an M3U that's tied to a given stick. There will still be just one master M3U, with the device-specific versions created automagically as required.

A bit more testing, and whatnot, before I push a new ah4c container to Docker Hub. I'll keep you posted.

I have question about 4k. Bear with me because I don't have a 4k tv. Does the feed that comes over the air have the same hdcp 2.0 as the one that would come from streaming devices?

I'm glad you're the one figure this out. Will this work with multiple FireTV's

2 Likes

It will.

1 Like

Wouldnt it be a lot easier to have a python script just use windows pc server to pull up websites/logins and record from there? No extra device necessary.

Hardware encoding scales better (think multiple virtual tuners), but there is an all software extension that might be right for you. Head on over to the Chrome Capture thread, and see if that meets your needs:

@Anvil_DVR

I started a new thread regarding capturing Prime Video (or other channels that show in the FireTV LiveTV guide) using ah4c, an HDMI encoder and FireTV devices. It's ready to try:

Is there an atsc3 tuner that doesn't have drm that you can use with this method?

No.

I believe the ADB Tuner (@turtletank) will be able to import DRM channels once the HDHomerun app has DRM support.
I think a few people have been testing this, but I haven't gotten around to it.

I don't think there is any other way around DRM.

Well tvs can accept the signal is there no way to HDMI out a TV. I assume it can be reversed engineered. If man can make it man can break it

Sorry for spamming the boards, but can you guys check out my post about chrome capture?

1 Like

@bnhf
Maybe you can get me pointed in the right direction. This is first time I have used Portainer.
I installed portainer on my Synology 218+ (DSM 7.2.1-69057). I attempted to run thru Stacks but it would just time out. I used your compose file from docker hub and set my variables.
I then switched and added thru container page using the same environments and it’s says it’s running.
Jumped to my channels server and attempted to load and getting the error in the image.

I’m not sure if it is a permission issue or if I am installing correctly. I 'm not sure where these scripts are but I haven’t found them. Do I need to install some folders or files in File Station? I remember when I installed ESPN+ container.

Thanks in advance for any help.



Also, here is the last hour of the log, if that helps.

cp: can't stat '/tmp/scripts/firetv/dtvstream/bmitune.sh': No such file or directory
2023-09-27T18:13:05.236487105Z List of devices attached
2023-09-27T18:13:05.269254010Z No existing ./scripts/onn/youtubetv/prebmitune.sh found or UPDATE_SCRIPTS set to true
2023-09-27T18:13:05.270032147Z cp: can't stat '/tmp/scripts/firetv/dtvstream/prebmitune.sh': No such file or directory
2023-09-27T18:13:05.264937556Z failed to authenticate to 10.0.1.74:5555
2023-09-27T18:13:05.237104855Z
2023-09-27T18:13:05.296772573Z No existing hulu.m3u found or UPDATE_M3US set to true
2023-09-27T18:13:05.286928087Z cp: can't stat '/tmp/scripts/onn/youtubetv/reboot.sh': No such file or directory
2023-09-27T18:13:05.284661235Z cp: can't stat '/tmp/scripts/onn/youtubetv/keep_alive.sh': No such file or directory
2023-09-27T18:13:05.282255360Z cp: can't stat '/tmp/scripts/onn/youtubetv/isconnected.sh': No such file or directory
2023-09-27T18:13:05.281211094Z cp: can't stat '/tmp/scripts/firetv/dtvstream/stopbmitune.sh': No such file or directory
2023-09-27T18:13:05.280530387Z No existing ./scripts/onn/youtubetv/stopbmitune.sh found or UPDATE_SCRIPTS set to true
2023-09-27T18:13:05.278446256Z cp: can't stat '/tmp/scripts/firetv/dtvstream/bmitune.sh': No such file or directory
2023-09-27T18:13:05.277777249Z No existing ./scripts/onn/youtubetv/bmitune.sh found or UPDATE_SCRIPTS set to true
2023-09-27T18:13:05.283460566Z cp: can't stat '/tmp/scripts/firetv/dtvstream/isconnected.sh': No such file or directory
2023-09-27T18:13:05.285670252Z cp: can't stat '/tmp/scripts/firetv/dtvstream/keep_alive.sh': No such file or directory
2023-09-27T18:13:05.288161977Z cp: can't stat '/tmp/scripts/firetv/dtvstream/reboot.sh': No such file or directory
2023-09-27T18:13:05.295109158Z No existing foo-fighters.m3u found or UPDATE_M3US set to true
2023-09-27T18:13:05.293227235Z No existing directv.m3u found or UPDATE_M3US set to true
2023-09-27T18:13:05.392603619Z [ENV] ALERT_AUTH_SERVER
2023-09-27T18:13:05.298092630Z No existing youtubetv.m3u found or UPDATE_M3US set to true
2023-09-27T18:13:05.391573772Z [START] androidhdmi-for-channels is starting
2023-09-27T18:13:05.299734331Z No existing sling.m3u found or UPDATE_M3US set to true
2023-09-27T18:13:05.392170740Z [ENV] Not loading env
2023-09-27T18:13:05.392498840Z [ENV] IPADDRESS 10.0.1.194:7654
2023-09-27T18:13:05.392553917Z [ENV] ALERT_SMTP_SERVER
2023-09-27T18:13:05.392651610Z [ENV] ALERT_EMAIL_FROM
2023-09-27T18:13:05.392689687Z [ENV] ALERT_EMAIL_PASS
2023-09-27T18:13:05.392737347Z [ENV] ALERT_EMAIL_TO
2023-09-27T18:13:05.392775105Z [ENV] ALERT_WEBHOOK_URL
2023-09-27T18:13:05.392828042Z [ENV] ALLOW_DEBUG_VIDEO_PREVIEW
2023-09-27T18:13:05.392885541Z [ENV] Creating tuner 1
2023-09-27T18:13:05.392926944Z [ENV] ENCODER1_URL http://10.0.1.70/0.ts
2023-09-27T18:13:05.392988228Z [ENV] TUNER1_IP 10.0.1.74:5555
2023-09-27T18:13:05.393046210Z [ENV] CMD1
2023-09-27T18:13:05.393240222Z [ENV] PRE SCRIPT ./scripts/firetv/dtvstream/prebmitune.sh
2023-09-27T18:13:05.393197652Z [ENV] TEECMD1
2023-09-27T18:13:05.393292277Z [ENV] START SCRIPT ./scripts/firetv/dtvstream/bmitune.sh
2023-09-27T18:13:05.393332017Z [ENV] STOP SCRIPT ./scripts/firetv/dtvstream/stopbmitune.sh
2023-09-27T18:13:05.393382894Z [ENV] REBOOT SCRIPT ./scripts/firetv/dtvstream/reboot.sh
2023-09-27T18:13:05.393431541Z [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
2023-09-27T18:13:05.393540841Z - using code: gin.SetMode(gin.ReleaseMode)
2023-09-27T18:13:05.393494318Z - using env: export GIN_MODE=release
2023-09-27T18:13:05.393593683Z
2023-09-27T18:13:05.393700145Z [GIN-debug] HEAD /favicon.ico --> github.com/gin-gonic/gin.(*RouterGroup).StaticFile.func1 (2 handlers)
2023-09-27T18:13:05.399859031Z [GIN-debug] Loaded HTML Templates (11):
2023-09-27T18:13:05.393627580Z [GIN-debug] GET /favicon.ico --> github.com/gin-gonic/gin.(*RouterGroup).StaticFile.func1 (2 handlers)
2023-09-27T18:13:05.400133709Z - config.html
2023-09-27T18:13:05.400042215Z - status_and_logs.html
2023-09-27T18:13:05.400097979Z -
2023-09-27T18:13:05.400240004Z - index.html
2023-09-27T18:13:05.400174707Z - editm3u.html
2023-09-27T18:13:05.400277691Z - logs.html
2023-09-27T18:13:05.400315068Z - status.html
2023-09-27T18:13:05.401066303Z [GIN-debug] GET /status --> main.statusPageHandler (2 handlers)
2023-09-27T18:13:05.400461595Z - stream.html
2023-09-27T18:13:05.400388718Z - m3us.html
2023-09-27T18:13:05.400424574Z - routes.html
2023-09-27T18:13:05.400352086Z - edit.html
2023-09-27T18:13:05.400586764Z [GIN-debug] HEAD /static/*filepath --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (2 handlers)
2023-09-27T18:13:05.400758740Z [GIN-debug] GET /m3u/:channel --> main.run.func4 (2 handlers)
2023-09-27T18:13:05.400802146Z [GIN-debug] GET /env --> main.run.func5 (2 handlers)
2023-09-27T18:13:05.400983954Z [GIN-debug] GET /logs/json --> main.run.func9 (2 handlers)
2023-09-27T18:13:05.400926154Z [GIN-debug] GET /status/andlogs --> main.run.func8 (2 handlers)
2023-09-27T18:13:05.400675161Z [GIN-debug] GET /routes --> main.run.func2 (2 handlers)
2023-09-27T18:13:05.400716860Z [GIN-debug] GET /play/tuner:tuner/:channel --> main.run.func3 (2 handlers)
2023-09-27T18:13:05.400630566Z [GIN-debug] GET / --> main.run.func1 (2 handlers)
2023-09-27T18:13:05.400498421Z
2023-09-27T18:13:05.400539149Z [GIN-debug] GET /static/*filepath --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (2 handlers)
2023-09-27T18:13:05.400886051Z [GIN-debug] GET /logs --> main.run.func7 (2 handlers)
2023-09-27T18:13:05.400842013Z [GIN-debug] GET /logs/text --> main.run.func6 (2 handlers)
2023-09-27T18:13:05.401025823Z [GIN-debug] GET /video --> main.run.func10 (2 handlers)
2023-09-27T18:13:05.401148412Z [GIN-debug] GET /stream --> main.run.func11 (2 handlers)
2023-09-27T18:13:05.401107184Z [GIN-debug] GET /api/status --> main.apiStatusHandler (2 handlers)
2023-09-27T18:13:05.401677559Z [GIN-debug] Listening and serving HTTP on :7654
2023-09-27T18:13:05.401638960Z [START] androidhdmi-for-channels is ready
2023-09-27T18:13:05.401512551Z [GIN-debug] GET /editm3u/:file --> main.run.func19 (2 handlers)
2023-09-27T18:13:05.401333016Z [GIN-debug] GET /edit --> main.run.func15 (2 handlers)
2023-09-27T18:13:05.401286619Z [GIN-debug] GET /status/channelsactivity --> main.run.func14 (2 handlers)
2023-09-27T18:13:05.401241384Z [GIN-debug] GET /test/email --> main.run.func13 (2 handlers)
2023-09-27T18:13:05.401188575Z [GIN-debug] GET /test/webhook --> main.run.func12 (2 handlers)
2023-09-27T18:13:05.401382512Z [GIN-debug] POST /save --> main.run.func16 (2 handlers)
2023-09-27T18:13:05.401424576Z [GIN-debug] POST /m3usave/:file --> main.run.func17 (2 handlers)
2023-09-27T18:13:05.401471769Z [GIN-debug] GET /m3us --> main.run.func18 (2 handlers)
2023-09-27T18:13:05.401557963Z [GIN-debug] GET /config --> main.run.func20 (2 handlers)
2023-09-27T18:13:05.401598556Z [GIN-debug] POST /configsave --> main.run.func21 (2 handlers)
2023-09-27T18:13:06.799719610Z
2023-09-27T18:13:06.800563119Z > [email protected] start
2023-09-27T18:43:05.501466277Z [STATS] CPU usage: 2.3340915284211885%
2023-09-27T18:13:08.123851847Z http://127.0.0.1:8000 http://172.17.0.3:8000
2023-09-27T18:13:08.122877180Z http://bf4dce417379:8000 http://localhost:8000
2023-09-27T18:13:08.122699673Z Listening on:
2023-09-27T18:13:06.800846432Z
2023-09-27T18:13:06.800759954Z > node ./index.js
2023-09-27T18:43:05.502409235Z [STATS] Memory used percent: 12.573637926215575%
2023-09-27T18:43:05.502367855Z [STATS] Memory used: 728 MiB
2023-09-27T18:43:05.502327863Z [STATS] Total memory: 5787 MiB
2023-09-27T18:43:05.502290128Z [STATS] NumGC = 0
2023-09-27T18:43:05.502249136Z [STATS] Sys = 13 MiB
2023-09-27T18:43:05.502209885Z [STATS] TotalAlloc = 3 MiB
2023-09-27T18:43:05.502125964Z [STATS] Alloc = 3 MiB

You're going to want to get this project running using Portainer-Stacks. It'll be worth it -- and you'll be better off in the long run for future projects.

It appears from your logs and description that you likely have an issue with the volume you're trying to bind. Which is this section of the docker-compose:

    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

The part to the left of the colon can be whatever you want it to be, and is where your persistent files will be stored on the Docker host (your Synology). The part to the right of the colon are the directories you're mapping to inside the container -- these are not to be changed.

Since you're likely not running Docker or Portainer as root, you'll need to be sure the directories you're mapping to are ones that your "user" can access. Choose a base directory that works for you on the host, for example I use /data/ah4c, and then scripts, m3u and adb will be created for me under that base.

EDIT: Follow the same basic structure though, specifying paths that have scripts, m3u and adb as the final sub-directories, and group them under a directory called ah4c. What you have as a parent directory to ah4c is whatever works for you.

1 Like

We have Silicon Dust support now thanks to @Edwin_Perez donating a couple units.

See https://github.com/sullrich/ah4c/blob/761ca801996939116a62b9cdd334612be472f92c/m3u/silicondust.m3u#L4

3 Likes

I just noticed you're running a slightly outdated docker-compose that's pulling bnhf/ah4c:test, but you want to use bnhf/ah4c:test2. Anyway, the compose you want to use is here:

1 Like

Still not having any luck (yet). Attached are screenshots of Volume created and deployment error (partial).
Used the docker compose that you tagged.

One thing I noticed is that no place to specify the volume in Stacks. I created the volume in Volume but haven’t been able attach to a container.

Gonna take a break & chill for tonight. I’m sure we’ll figure it out after some libations!

Portainer was installed with root.

The volumes get specified in your docker-compose. Make sure you grab the whole thing from the code block in the post I linked.

Still trying but no luck. I’ve attached a notification snippet and a screenshot of my folder architecture.
I get a lot of errors for tuners and encoders from 2-4 (that’s probably normal) but the bind mount failure is probably the issue.

I’m going to move the data folder to the portainer folder and see if it helps.
Network myah4c_default Creating Network myah4c_default Created Container ah4c Creating Container ah4c Created Container ah4c Starting Error response from daemon: Bind mount failed: '/data/ah4c/scripts' does not exists

So Close. You need to add volume1 to the beginning of the path. So your path should be /volume1/data/ah4c/scripts

1 Like