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

Not that it's going to fix the specific issue you are currently troubleshooting here, but I just pushed a small update to both versions (latest and experimental) to automatically follow redirects when connecting to streaming endpoints.

Life has been too busy to even think about ADBTuner, but it seems LinkPi has taken over as the default encoder so I figured I could squeeze in a one line fix lol. This should let the URL displayed in the LinkPi user interface work directly without having to replace it with the actual target.

2 Likes

Doesn't seem to be a HLS/TS issue, tried both and still no video. I get this errors:

2024/01/22 11:27:02.743789 [ERR] Failed to start stream for ch9000: M3U: Tuner Unreachable: Timeout after 20s connecting to: http://10.10.11.16:5592/stream/1

2024/01/22 13:47:13.181803 [ERR] Failed to start stream for ch9000: M3U: Could not fetch playlist: 10.10.11.16:5592: GET: http://10.10.11.16:5592/stream/1: 404 Not Found

2024/01/22 13:47:01.133607 [ERR] Failed to start stream for ch9000: M3U: Could not fetch playlist: 10.10.11.16:5592 (Timeout): Get "http://10.10.11.16:5592/stream/1/1": net/http: timeout awaiting response headers

So it seems like Channels is not finding anything at ADBTuner redirect address http://10.10.11.16:5592/stream/1. I'm going to start over with the new update and see if it makes any difference (thanks @turtletank)

This doesn't look right. 5592 is the port # for the ADBTuner proxy, not the LinkPi. According to @spammedeeper, the direct LinkPi port should be 8090. And of course the IP for the LinkPi should be its actual IP or hostname, not the IP or hostname of the ADBTuner proxy server.

That is correct it is not wrong this is what my M3U looks like ....

192.168.50.68:5592/channels.m3u

#EXTM3U



#EXTINF:-1 channel-id="111682829099970017993847724086741201779" channel-number="851",HBOHDP
http://192.168.50.68:5592/stream/1



#EXTINF:-1 channel-id="272995653304883221103877914529337988442" channel-number="853",HBO2PHD
http://192.168.50.68:5592/stream/2



#EXTINF:-1 channel-id="156207044968725025997804086631792127666" channel-number="855",HBOSPHD
http://192.168.50.68:5592/stream/3



#EXTINF:-1 channel-id="123121321007286587620121231793810434900" channel-number="876",SHOWHDP
http://192.168.50.68:5592/stream/4


#EXTINF:-1 channel-id="140110306406999577732061602336437413113" channel-number="878",SHO2PHD
http://192.168.50.68:5592/stream/5

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