ADBTuner: A "channel tuning" application for networked Google TV / Android TV devices

That's unexpected. Can you provide the image id (hash) for the version you are running? It should look something like "a7b3415c96de"

Thanks for adding this! I’ve set it up, and will test it out with my Amazon devices to see how it goes.

I logged into Synology and deleted the container and ruan the command line and it fired up.
I'm not sure is container manager messed something up but I was able to get the container back online.

Thanks

This is working well, in my limited testing. I tuned in this morning, after not watching all night, and a channel using ADBTuner tuned in 3.64 seconds, per the log.

I noticed “Skipping keep alive tasks as it's currently the top or middle of the hour” in the log. Very clever. I presume this is there to minimize the chance of interfering with scheduled recordings. How wide a time is protected, out of curiosity? I tend to add a start buffer of a minute to my recordings, but occasionally do three.

Great! Thanks for testing!

Yeah, it's probably unnecessary because ADBTuner will already try for 10 seconds to reserve a tuner, but I didn't want a tuner locked for this keep alive feature to block a recording. It's a three minute window (:59 to :01 and :29 to :31).

1 Like

I'm trying to use a USB tuner and I guess I'm just a little unsure what to use for the Streaming Endpoint URL. Currently using this:

http://10.24.4.25:8089/devices/M3U-Transcode1/channels/12000/stream.mpg?format=ts

I have the USB Tuner setup and working with the nickname of Transcode1 and the channel 12000. When I play that channel it shows what's on Fire Stick. I used the USB HDMI Capture thread to get that setup.

I believe it should be something like:
http://x.x.x.x8089/devices/M3U-XXXX/channels/XXX/stream.mpg?format=ts&codec=copy

What are the XXX's referencing? I added the '&codec=copy' to the end but I still get nothing.

The first set is the IP address of your Channels DVR server. The second is the name of the device as configured in Channels. The last set is the channel number.

I don't know if there is an easier way to get the URL, but in the Channels interface, choose "Copy M3U URL" in the menu shown above. Then open that link in a new browser window and it should download a playlist file.

The URL will be in that playlist file.

It may be helpful to test that URL in VLC (file -> open network) to confirm everything is working correctly before adding it to ADBTuner.

1 Like

Thanks, getting somewhere!

I copy'd that URL and got:

http://10.24.4.25:8089/devices/M3U-Transcode1/channels/12000/hls/master.m3u8?

Opening that up I got:

http://10.24.4.25:8089/devices/M3U-Transcode1/channels/12000/hls/stream.m3u8?acodec=copy&bitrate=9996&indexed=true&resolution=1080&ssize=1&vcodec=h264

Putting the second one in VLC works, I can see the YouTube TV app open.

I put that URL into the Streaming Endpoint URL, and I have ESPN in my channel list.

But when trying to play the channel I get 'Streaming to the tuner failed. Press play to try again.' I'm assuming my next step is figuring out the correct URLs for the channels?

Good morning.
Updated experimental with keep alive. Tuning time is 4.88 seconds according to log. Much improved.

Have you found a way to open the Weather Channel app on a Firestick and display the live channel? Using Frndly now and works fine but would like to local conditions one the screen.

Best!

@turtletank First off thank you for this wonderful application. I’m using USB hdmi capture along with ADBTuner. It is working quite well but I do have a question. Is there a timeout after closing a channel in the channels app? I closed the stream more than 30 min ago and it seems ADBTuner is still tuned into and
”watching” the stream from the endpoint. The USB capture therefore is running and transcoding in the background even when the stream isn’t being watched.

Would it be possible after say a few minutes of the channel/stream being closed from within the channels app for the ADBTuner to release the connection to the captured stream so that my machine isn’t transcoding when it’s not necessary?
I’m using the experimental version but I also experienced this with the regular container.

@tmm1 is there anything that can be done about this in channels side?

The only way I’ve found to stop the transcoding and watch activity is to visit the ADBTuner webpage, I believe this causes a device refresh of the tuner(s) and that action stops the usb capture in channels when a stream isn’t being watched.

Edit: this is not repeatable. Just tried this again immediately after closing the channel and I didn’t get the same result. It seems it might work after a certain amount of time, I’m not sure.

Edit 2: it seems like after about 5min after closing the channel, visiting the ADBTuner webpage will clear the transcode activity. 3min is not long enough to clear it.

It looks like I might not be doing a great job closing connections after the client (viewer) disconnects. I will look into this when I get a chance.

2 Likes

Unfortunately that app doesn't support deeplinks so it cannot be automated via ADBTuner.


@Rice I pushed an update to the experimental version that should fix the issue you are seeing with the usb device transcoding sessions in Channels DVR not closing immediately after the client disconnects. Let me know if you run into any issues. Thanks.

Looks like that did the trick!! Appreciate the quick fix.

Updated to latest experimental but now i can't access adbtuner anymore :frowning:
Recreated and deployed again but no fix , any idea from below log?

./entrypoint.sh: line 3: alembic: command not found
Traceback (most recent call last):
  File "/app/server.py", line 1, in <module>
    import anyio
ModuleNotFoundError: No module named 'anyio'
./entrypoint.sh: line 3: alembic: command not found
Traceback (most recent call last):
  File "/app/server.py", line 1, in <module>
    import anyio
ModuleNotFoundError: No module named 'anyio'
./entrypoint.sh: line 3: alembic: command not found
Traceback (most recent call last):
  File "/app/server.py", line 1, in <module>
    import anyio
ModuleNotFoundError: No module named 'anyio'
./entrypoint.sh: line 3: alembic: command not found
Traceback (most recent call last):
  File "/app/server.py", line 1, in <module>
    import anyio
ModuleNotFoundError: No module named 'anyio'
./entrypoint.sh: line 3: alembic: command not found
Traceback (most recent call last):
  File "/app/server.py", line 1, in <module>
    import anyio
ModuleNotFoundError: No module named 'anyio'
./entrypoint.sh: line 3: alembic: command not found
Traceback (most recent call last):
  File "/app/server.py", line 1, in <module>
    import anyio
ModuleNotFoundError: No module named 'anyio'
./entrypoint.sh: line 3: alembic: command not found

Can you provide the hash for the image you are running? It should be one of the following:

c01d78a7b9c2 AMD64
db508439e9b9 ARM64

(this is the shortened version of the hash, you might see a longer one that starts with these characters depending on where you get the info)

I´m not sure where to look in Portainer, but running on Asus nas (arm64)
Does this help

Image:"turtletank99/adbtuner:experimental",
Labels:{
com.docker.compose.config-hash:"1de6e98d476b230497debe941f967af57b7442d85fdb0f8b3d7d6a3d2ea95aa0",
com.docker.compose.container-number:"1",
com.docker.compose.depends_on:"",
com.docker.compose.image:"sha256:51158af9acc39b18b5540483695a98bc2cdc955b9ae517c98ec0e02db9d35c1c",
com.docker.compose.oneoff:"False",
com.docker.compose.project:"adbtuner",
com.docker.compose.project.config_files:"/data/compose/1/docker-compose.yml",
com.docker.compose.project.working_dir:"/data/compose/1",
com.docker.compose.service:"adbtuner",
com.docker.compose.version:"2.20.2"
turtletank99/adbtuner:experimental@sha256:254c2bfc2347c259b2599eafe4ebf52e6006a2c13cdaf6b1f1fa4745dae6dce2

I've never used Portainer so I can't provide much insight on how it's configured. It seems like you might be using an older build. Can you force Portainer to download a specific version?

turtletank99/adbtuner@sha256:a99ac49fcddac3de332689a0a168c9ce058ae8ff6a8e36474558ac75b4ba85a9