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

Yeah, it's an easy misunderstanding, those are the Channels DVR logs so from that perspective it's correct, the Docker container logs would be more useful here.

Don't know if it willl help but @mnwxman132 created a Link Pi Encoder Family topic.
Just my post there so far but it might help.

Just in case someone is doing a search for an entry level LinkPi setup without trying to read hundreds of posts. I would also start with X264 encoding...for most universal playability then try X265 if you wish after everything is working.
I added my exact settings form ADBTuner in Channels... and the settings in ADBTuner and LinkPi...Along with personal experience so far... This is based on the help I received from @spammedeeper, @bnhf, @turtletank

@turtletank
Just wondering if it might be possible to add an enable button next to each tuner...it would be really helpful when testing out different devices so you don't have to give all the other tuners something to do first in CDVR or delete them and then re-add them after...an alternative might be to add a tuner number/priority that is user assigned then you would be able to just renumber the priority so the one being tested is #1
I really appreciate everything you have done to make this simple to use.

2 Likes

Agreed, it shouldn't be hard.


Shouldn't it be http://10.10.11.16:port/stream1 and not http://10.10.11.16:port/1?

Why are you including /Live ?

That's what is in the Play URL section and what ADB accepts:


This is what my m3u url at http://10.10.11.16:5592/channels.m3u looks like:

#EXTM3U

#EXTINF:-1 channel-id="27081777265462926658171838050863796401" channel-number="8000",HDMI Encoder
http://10.10.11.16:5592/stream/1

But when I hit http://10.10.11.16:5592/stream/1 either through Channels or VLC, my Fire TV switches correctly to the channel, starts streaming, but I get no video. I think ADBTuner is not redirecting http://10.10.11.16:5592/stream/1 to the HDMI encoder Endpoint, but I really don't know why.

1 Like

Sorry if this is a dumb question, but to start from the very beginning, if you open the "Dashboard" section in the LinkPi interface do you see the video output in the Preview section on the bottom?

Not a dumb question, and yes, I do see the snapshot in the Preview section and it does match the screen.

ADBTuner acts as a proxy server. It receives the incoming http request (/stream/1), fires the appropriate ADB commands to start the content, and then sends the video directly in the response.

We are going to need the logs from the docker container to troubleshoot this further. Without that information it's all just guessing.

Can you provide screenshots of your entire "Encode" and "Stream" screens?

Here are screenshots of my entire configuration

I appreciate you doing the update. I am running whatever is available at Github and I just did a pull, deleted, and re-loaded in docker and the issue persists. I've got a monitor plugged into the HDMI output and ADB tunes the channel just fine, and then appears to start and restart.

1 Like

Thanks. I don't see anything obviously problematic there. You can turn off RTSP though.

I think the next step will be docker logs on this. Can you provide the logs from a tuning attempt?

C:\Windows\System32>docker logs f166 --details --since=15m
2024-01-22 22:46:53.714 - server - Setting unique m3u id: 46857547987720174055886310626649471755
2024-01-22 22:46:53.740 - uvicorn.access - 172.17.0.1:43058 - "POST /admin/channel HTTP/1.1" 303
2024-01-22 22:46:53.747 - uvicorn.access - 172.17.0.1:43058 - "GET / HTTP/1.1" 200
2024-01-22 22:46:53.758 - uvicorn.access - 172.17.0.1:43058 - "GET /css/style.css?t=1705963613 HTTP/1.1" 200
2024-01-22 22:46:53.759 - uvicorn.access - 172.17.0.1:43062 - "GET /js/main.js?t=1705963613 HTTP/1.1" 200
2024-01-22 22:46:53.797 - lib.adb - ADB: Connecting to device (attempt 1).
2024-01-22 22:46:53.801 - lib.adb - ADB: Connecting to device (attempt 1).
2024-01-22 22:46:53.953 - lib.adb - ADB: Connected.
2024-01-22 22:46:53.954 - lib.adb - ADB: 192.168.42.157 - dumpsys display
2024-01-22 22:46:53.956 - lib.adb - ADB: Connected.
2024-01-22 22:46:53.956 - lib.adb - ADB: 192.168.42.157 - pm list packages -3
2024-01-22 22:46:54.014 - lib.adb - ADB: 192.168.42.157 - getprop ro.build.version.release
2024-01-22 22:46:54.034 - uvicorn.access - 172.17.0.1:43078 - "GET /admin/tuner/installed-packages?=1705963613772 HTTP/1.1" 200
2024-01-22 22:46:54.047 - lib.adb - ADB: Android Version: 9.0.
2024-01-22 22:46:54.063 - httpx - HTTP Request: GET http://192.168.42.189/live/stream0 "HTTP/1.1 301 Moved Permanently"
2024-01-22 22:46:54.064 - uvicorn.access - 172.17.0.1:43062 - "GET /admin/tuner/metadata?
=1705963613770 HTTP/1.1" 200
2024-01-22 22:47:25.921 - uvicorn.access - 172.17.0.1:35924 - "GET /channels.m3u HTTP/1.1" 200
2024-01-22 22:51:02.441 - server - Reserved tuner 1
2024-01-22 22:51:02.441 - server - Using tuner id: 1
2024-01-22 22:51:02.441 - uvicorn.access - 172.17.0.1:53880 - "GET /stream/3 HTTP/1.1" 307
2024-01-22 22:51:02.445 - server - Tuner: Tuning to AXSTV on Sling-Tuner1
2024-01-22 22:51:02.446 - lib.adb - ADB: Connecting to device (attempt 1).
2024-01-22 22:51:02.562 - lib.adb - ADB: Connected.
2024-01-22 22:51:02.562 - lib.adb - ADB: 192.168.42.157 - dumpsys display
2024-01-22 22:51:02.629 - lib.adb - ADB: 192.168.42.157 - getprop ro.build.version.release
2024-01-22 22:51:02.660 - lib.adb - ADB: Android Version: 9.0.
2024-01-22 22:51:02.660 - lib.adb - ADB: 192.168.42.157 - pm list packages -3
2024-01-22 22:51:02.760 - lib.adb - ADB: 192.168.42.157 - pidof com.sling
2024-01-22 22:51:02.811 - lib.adb - ADB: Stopping media playback.
2024-01-22 22:51:02.811 - lib.adb - ADB: 192.168.42.157 - input keyevent KEYCODE_MEDIA_STOP
2024-01-22 22:51:03.574 - lib.adb - ADB: 192.168.42.157 - am start -a android.intent.action.VIEW -d "Stream Live TV Now | Get Started" com.sling
2024-01-22 22:51:05.273 - server - Tuner: Waiting for playback start. Status: unknown
2024-01-22 22:51:07.652 - server - Tuner: Waiting for playback start. Status: unknown
2024-01-22 22:51:08.712 - server - Tuner: Tuning completed in 6.27 seconds. Display was on, application (com.sling) was running.
2024-01-22 22:51:08.712 - lib.adb - ADB: Closing connection - 192.168.42.157
2024-01-22 22:51:08.713 - uvicorn.access - 172.17.0.1:53880 - "GET /stream/1/3 HTTP/1.1" 200
2024-01-22 22:51:08.724 - root - Tuner: Stream open (attempt 1).
2024-01-22 22:51:08.733 - httpx - HTTP Request: GET http://192.168.42.189/live/stream0 "HTTP/1.1 301 Moved Permanently"
2024-01-22 22:51:08.736 - server - Tuner: Playback failed.
2024-01-22 22:51:08.737 - lib.adb - ADB: Connecting to device (attempt 1).
2024-01-22 22:51:08.783 - lib.adb - ADB: Connected.
2024-01-22 22:51:08.783 - lib.adb - ADB: Stopping media playback.
2024-01-22 22:51:08.783 - lib.adb - ADB: 192.168.42.157 - input keyevent KEYCODE_MEDIA_STOP
2024-01-22 22:51:10.048 - lib.adb - ADB: 192.168.42.157 - input keyevent KEYCODE_MEDIA_PAUSE
2024-01-22 22:51:11.090 - lib.adb - ADB: Closing connection - 192.168.42.157
2024-01-22 22:51:11.090 - server - Released tuner 1
2024-01-22 22:51:11.091 - server - Tuner: Cleanup complete. Sling-Tuner1 (AXSTV)
2024-01-22 22:51:11.091 - server - http disconnect
2024-01-22 22:51:12.137 - server - Reserved tuner 1
2024-01-22 22:51:12.137 - server - Using tuner id: 1
2024-01-22 22:51:12.138 - uvicorn.access - 172.17.0.1:53880 - "GET /stream/3 HTTP/1.1" 307
2024-01-22 22:51:12.140 - server - Tuner: Tuning to AXSTV on Sling-Tuner1
2024-01-22 22:51:12.141 - lib.adb - ADB: Connecting to device (attempt 1).
2024-01-22 22:51:12.183 - lib.adb - ADB: Connected.
2024-01-22 22:51:12.184 - lib.adb - ADB: 192.168.42.157 - dumpsys display
2024-01-22 22:51:12.240 - lib.adb - ADB: 192.168.42.157 - getprop ro.build.version.release
2024-01-22 22:51:12.273 - lib.adb - ADB: Android Version: 9.0.
2024-01-22 22:51:12.273 - lib.adb - ADB: 192.168.42.157 - pm list packages -3
2024-01-22 22:51:12.364 - lib.adb - ADB: 192.168.42.157 - pidof com.sling
2024-01-22 22:51:12.450 - lib.adb - ADB: Stopping media playback.
2024-01-22 22:51:12.450 - lib.adb - ADB: 192.168.42.157 - input keyevent KEYCODE_MEDIA_STOP
2024-01-22 22:51:13.261 - lib.adb - ADB: 192.168.42.157 - am start -a android.intent.action.VIEW -d "Stream Live TV Now | Get Started" com.sling
2024-01-22 22:51:14.898 - server - Tuner: Waiting for playback start. Status: unknown
2024-01-22 22:51:15.104 - server - Tuner: Tuning completed in 2.96 seconds. Display was on, application (com.sling) was running.
2024-01-22 22:51:15.104 - lib.adb - ADB: Closing connection - 192.168.42.157
2024-01-22 22:51:15.105 - uvicorn.access - 172.17.0.1:53880 - "GET /stream/1/3 HTTP/1.1" 200
2024-01-22 22:51:15.111 - root - Tuner: Stream open (attempt 1).
2024-01-22 22:51:15.117 - httpx - HTTP Request: GET http://192.168.42.189/live/stream0 "HTTP/1.1 301 Moved Permanently"
2024-01-22 22:51:15.121 - server - Tuner: Playback failed.

1 Like

Ok so it looks like you aren’t using the new build that follows redirects. You are going to have install that or figure out what it’s redirecting to and use that as the streaming endpoint URL.

This would normally be:

http://192.168.42.189:8090/stream0

but check your port settings on the linkpi device (options -> system) that the http port is set to 8090

Or just run curl -I http://192.168.42.189/live/stream0 from a computer on the same network (presuming cURL is installed). This will output the redirect path.

2 Likes

C:\Windows\System32>docker pull turtletank99/adbtuner
Using default tag: latest
latest: Pulling from turtletank99/adbtuner
Digest: sha256:3dd4e0cd0ac96136e9011fa604bad8c8301887e88bef317b4ab44c965615a658
Status: Image is up to date for turtletank99/adbtuner:latest
docker.io/turtletank99/adbtuner:latest
docker stop adbtuner
docker rm adbtuner
C:\Windows\System32>docker run -d --restart unless-stopped --init -p 5592:5592 --name adbtuner -v adbtuner_config:/app/.config turtletank99/adbtuner
e2d731c2db7b2db4f30d524719612591f39908c534664f17748ba71f5dbed83e

So I should have the latest version...did a test...same issue happens

Hey @laughsbrightly, welcome to Club LinkPi.

So your LinkPi config looks good. I looked at your screenshot of your ADBT Config, and the logs you posted. Just want to make sure, the box for Streaming Endpoint you have configured is:

Along with this error in the log:

2024-01-22 22:51:15.117 - httpx - HTTP Request: GET http://192.168.42.189/live/stream0 "HTTP/1.1 301 Moved Permanently"

I had this issue. The streaming links with "/live/streamX" is just a redirect for the actual streaming link. In your case, the following is the actual URL for the your HTTP (TS) Stream 0:

http://192.168.42.189:8090/stream0

Replace the link above in the Streaming Endpoint setting in ADBT (red box in picture) and let me know if works.

Happy Encoding!

Thanks for that. The issue I was having was that ADB would NOT accept that link. (and VLC would not play the stream). Posted here as a PSA for others trying this. If you have the issues I did - POWER CYCLE. After powering off both devices, bringing the encoder up first, and then the Fire stick, everything just worked. VLC started playing the stream, ADB took the 8090 port, and my one recording test has been perfect.
I will do more testing tomorrow, but I think I'm good.