HDMI for Channels

I feel a bit foolish now. I just checked my firmware, and it still shows the 2017 one. I tried again, it says it succeeded, and tells me to reboot. I do, and it shows the old one. So I'm a bit embarrassed to say that the firmware doesn't seem to be sticking for me, either.

1 Like

Well one thing I have done on all my devices (I have 1 Onn and 2 Chromecast) is run a onetime pre-configuration script to squeeze out some more speed. I found it way way back in this thread. I use Windows batch files, but basically it looks like this. They aren't exactly pretty, but you can probably figure out the train on thought.

pre-configure

set device=192.168.1.194:5555
adb connect %device%
adb -s %device% shell settings put global window_animation_scale 0
adb -s %device% shell settings put global transition_animation_scale 0
adb -s %device% shell settings put global animator_duration_scale 0
adb -s %device% shell settings put secure sleep_timeout 0
adb -s %device% shell settings put system screen_off_timeout 2147460000

For my stopbmitunes I use just this. The 3 force-stops are just for additional apps I use too. You can see I have rem-ed out the youtube, but kept it just incase I need it sometime down the road. Always include the KEYCODE_HOME to stop the internet streaming.

stopbmitunes.bat

@echo off
set IP=192.168.1.135:5555
rem c:\platform-tools\adb -s %ip% shell am force-stop com.google.android.youtube.tvunplugged
c:\platform-tools\adb -s %ip% shell am force-stop com.weathergroup.twc
c:\platform-tools\adb -s %ip% shell am force-stop com.cbs.ott
c:\platform-tools\adb -s %ip% shell am force-stop com.haystack.android
sleep 2
c:\platform-tools\adb -s %ip% shell input keyevent KEYCODE_HOME

I have a nightly task that runs at a set time to do the maintenance. The force-stops here are probably unnecessary since the reboot does that... but I keep them because it doesn't hurt. Here is the basic script.

devicemaintenance.bat

@echo off
c:\platform-tools\adb connect 192.168.1.137:5555
c:\platform-tools\adb -s 192.168.1.137:5555 shell input keyevent KEYCODE_WAKEUP
c:\platform-tools\adb -s 192.168.1.137:5555 shell am force-stop com.google.android.youtube.tvunplugged
c:\platform-tools\adb -s 192.168.1.137:5555 shell am force-stop com.weathergroup.twc
c:\platform-tools\adb -s 192.168.1.137:5555 shell am force-stop com.cbs.ott
c:\platform-tools\adb -s 192.168.1.137:5555 shell am force-stop com.haystack.android
c:\platform-tools\adb -s 192.168.1.137:5555 shell input keyevent KEYCODE_HOME
c:\platform-tools\adb -s 192.168.1.137:5555 reboot
c:\platform-tools\adb kill-server
sleep 60
c:\platform-tools\adb connect 192.168.1.137:5555
c:\platform-tools\adb -s 192.168.1.137:5555 shell input keyevent KEYCODE_WAKEUP
rem c:\platform-tools\adb -s 192.168.1.137:5555 shell input keyevent KEYCODE_SLEEP
1 Like

Thanks for all this. I'll have to see if I can modify this to work on the Mac. For the "pre-configure", I modified it to this:

$DEVICE="192.168.1.167:5555"
adb connect $DEVICE
adb -s $DEVICE shell settings put global window_animation_scale 0
adb -s $DEVICE shell settings put global transition_animation_scale 0
adb -s $DEVICE shell settings put global animator_duration_scale 0
adb -s $DEVICE shell settings put secure sleep_timeout 0
adb -s $DEVICE shell settings put system screen_off_timeout 2147460000

But I get this error for each "settings" command: adb: unknown command settings

Remove the $ from $DEVICE
it should be
DEVICE="192.168.1.167:5555"

@KompilerDJ is correct.

And do not forget, that pre-configure script is really a one time deal. You shouldn't need to run it again unless you do something significant to your android device (like a factory reset).

Thanks, guys. I'm not getting an error, but now it is sitting for a while. Not sure how long this is supposed to take. I called the file (I named it onn1.sh) by running sh [path and name to file]

Update: I missed once instance of $DEVICE, but now I get a device "DEVICE" not found

1 Like

It's only the first $ that should have been removed, not the rest:

DEVICE="192.168.1.167:5555"
adb connect $DEVICE
adb -s $DEVICE shell settings put global window_animation_scale 0
adb -s $DEVICE shell settings put global transition_animation_scale 0
adb -s $DEVICE shell settings put global animator_duration_scale 0
adb -s $DEVICE shell settings put secure sleep_timeout 0
adb -s $DEVICE shell settings put system screen_off_timeout 2147460000

Thanks, everyone. I'm now trying this maintenance script on a Fire Cube. I'm now able to run the script, but get an "already connected to 192.168.7.157:5555"

If I take out the second line of the script (adb connect $DEVICE), I get "permission denied (path to the script on my Mac"

The already connected message is fine and can be ignored. When I ran it on my NAS, I got the already connected message and no other messages so I assumed that the other commands worked.

I wonder if you could eliminate the post-reboot delay by using one of those apps that launches an app when the device boots up. That way it’s already ready to go when you tune the channel.

That is what I use on XFINITY Stream ... the Initial startup takes a long time.

I use on my FireTV AutoStart - No root_2.2_Apkpure.apk

I know this is a bit of an older comment now, but I have to say - I totally get it. Many of us have to pay for these stations as a package in any event as we are beyond OTA range, and now we're having to spend hundreds of dollars to roughly simulate the capability we have enjoyed for free* in those packages to which we already subscribe.

2 Likes

This is more for hobbyist and Tinkerers.

Been having some issues with my encoder recently.
Seems to be working great for 30mins and then cuts outs.
Been changing all settings etc but always happens.

Then saw the stats and it said the cpu temp was 95-100 at one point which seems way too high for me?
Maybe I haven’t been giving it enough airflow.

What do everyone else’s seem to run at?

Cheers

Seems to be, at this point.

1 Like

Reduced tune time to ~4 seconds for a common provider! Also tested a Magewell PRO device and able to capture at 1080P/60 with incredible quality. All available now in the repo.

I did not give comskip a chance to do its magic but this should give an idea of latest speeds with mecool + magewell device running on a ancient i7 3.7ghz computer (2013?) with rtx 3060.

OH, one other thing! If you want 5.1 edit the env to set -ac 6. Works GREAT with the Magewell pro card!

3 Likes

Actually my maintenance script after reboot makes sure it wakes my first device and does a YoutubeTV launch. The other tuners I just leave in their freshly rebooted state because I rarely need them.

This is what I run everytime I reboot my Channels DVR server on boot.... Checks to see if XFINITY Stream is running if not starts it.

adb -s %device% shell pidof com.xfinity.cloudtvr.tenfoot>NUL
set ret=%errorlevel%
if %ret% NEQ 0 adb -s %device% shell am start -n com.xfinity.cloudtvr.tenfoot/com.xfinity.common.view.LaunchActivity

For those that have Cable or OTA DRM ... this is the Script I use to Change the channels on the HDHR units... Slice guide must be off You have to change set first=2.1 to whatever your first channels is. ....I am sure it can be tailored to use HDMI for channels ... which I do not use.

@echo off

setlocal
set device=192.168.50.189:5555
SET PATH=%PATH%;C:\platform-tools\
set first=2.1

SET "var="&for /f "delims=0123456789." %%i in ("%1") do set var=%%i
if defined var (
    echo "error:  invalid character"
    goto :ends
)

set line=
set channel=%1
set /a counter=0

:loop
    set /a counter += 1
    if %counter% EQU 2 (
        set line=%line%;input keyevent
    )
    set digit=%channel:~0,1%
    set channel=%channel:~1%
    if "%digit%" NEQ "." (
        if "%line%" == "" (
            set line=shell input keyevent KEYCODE_%digit%;sleep 1.0
        ) else (
            set line=%line% KEYCODE_%digit%
        )
    ) else  (
        set line=%line% KEYCODE_PERIOD
    )
if NOT "%channel%" == "" goto loop
set channel=%1
if "%channel%" == "%first%" (
    set line=%line%;input keyevent 111; sleep 0.25;input keyevent 19 66
) else (
    set line=%line%;input keyevent 111; sleep 0.25; input keyevent 66
)

if %counter% gtr 6 (
    echo "error: max 6 characters"
    goto :ends
)

adb connect %device% >NUL
set ret=%errorlevel%
if "%ret%" NEQ "0" (
    echo "error: adb not found"
    goto :ends
)

adb -s %device% shell "dumpsys power | grep =Awake" >NUL
set ret=%errorlevel%
if "%ret%" == "1" adb -s %device% shell input keyevent KEYCODE_WAKEUP ; sleep 2

adb -s %device% shell pidof com.silicondust.view >NUL
set ret=%errorlevel%
if "%ret%" == "0" goto home:
    adb -s %device% shell am force-stop com.silicondust.view >NUL
    adb -s %device% shell sleep 1
    adb -s %device% shell am start -W -n com.silicondust.view/.App >NUL 2>NUL
    adb -s %device% shell sleep 6
    goto :adbtune

:home
    adb -s %device% shell "am start -W -n com.silicondust.view/.App | grep -q WARM"
    set ret=%errorlevel%
    if "%ret%" == "0" (
        adb -s %device% shell sleep 4
    )

:adbtune

adb -s %device% shell sleep 0.5; input keyevent 19 19 19;sleep 0.5; input keyevent 21 21 21 66

adb -s %device% %line%

@REM ffmpeg -v panic -re -f dshow -rtbufsize 40M -video_size 1280x720 -framerate 30  -i video="USB3. 0 capture":audio="Digital Audio Interface (USB3. 0 capture)"  -vcodec h264_qsv -b:v 4000k -acodec aac -f mpegts -
@REM ffmpeg -v panic -re -i http://172.16.3.60/1.ts -codec copy -f mpegts -
curl -s http://192.168.50.242:8086/8.ts
@REMadb -s %device% shell sleep 5

adb -s %device% shell sleep 1; input keyevent 4

:ends

Interesting. I wonder if we are able to change channels on the HDhomerun app, thus giving us access to all of our channels via this?

The above Script I posted above Changes the Channels on the HDHR APP... maybe someone can tailor it to use HDMI for Channels. I use NEXTPVR Extras and feed the M3U into Channels DVR.