Why? You're ready early for Christmas.
Something about reading āif your still on the fenceā and then looking at that imageā¦
This actually looks like a fun project. Ive been lurking on the sidelinesā¦.
I typically just view the encoder using VLC - I have (4) VLC shortcuts on my desktop, one for each encoder input. I can have a small window open for each encoder on my PC and watch as I play around.
It'll be interesting to see what everyone's experiences will be regarding overall stability. I'm currently using (4) Xbox 360's to feed the encoder, and aside from a 5:10 AM automatic reboot of all four each day and that they can heat my entire basement, it's been fairly stable.
The apps that the streaming stick is using to play the television as well as the occasional upgrades to the sticks hopefully doesn't get too out of hand. I wonder if a specific streaming stick could be rooted to get better control of it, and most Channels users would then probably purchase that stick.
Nice work! I've got one android unit running only due to duplicating what you have done on this thread. Thanks. Once everything is running and stable is there any reason the pile of boxes and wires could be located to another room? I'd like to put all of this next to my Synology NAS downstairs. I'd also love to get the Go scripts and ADB install running on the Synology instead of my Mac since the androidhdmi-for-channels processes need to run 24/7 for the DVR. I have no clue if this is even possible.
Wondering if we can get a write up on this, can we use any app like Fubo tv Hulu tv or any app tying to use Plaenta tv that my in laws watch polish tv and they have are time with the app
Sure, so long as the hardware is on the same LAN as your CDVR server, it shouldnāt matter. I was considering that too. I may end up moving one of my tuners to another room if only to clear some space in that cabinet. The other I will leave in the living room but only because of the aforementioned HDMI splitter that shares its 4K output simultaneously with my TVās input #2. If you donāt have that set up, then all of your gear can go to another room. It just needs network connectivity, and AC power.
This is new, so folks here are still experimenting, I haven't seen anyone try Fubo yet, but Hulu Live works, using different commands to launch to the correct channel, thanks to this awesome share by @jad3675:
I'm thinking Planeta TV's app would work too, you'd just need to figure that part out: how to launch the Planeta app, and more importantly, how to get it to start playing the livestream, if it doesn't automatically default to that.
Mmm interesting wonder if I can use n8n.io and a web hook to change the channel Iām gonna get the hardware and test might just try to emulate android on my pc and test you have woken the beast lol
Thanks for the suggestion of sending keyevent 86 (stop media) instead of closing the YouTube TV app. Not having to restart the YouTube TV app definitely helps in tuning speed.
I don't know if this is just with the devices I'm using, but this doesn't quite work with the first tuning attempt after the device wakes up from sleep. The YouTube TV app appears to open the correct channel, but the output is just a black screen.
As a compromise I added the following to prebmitune.sh to force a restart of the YouTube TV app, but only if the device was asleep.
prebmitune.sh
WAKE="input keyevent KEYCODE_WAKEUP"
CLOSE_YOUTUBE_TV="am force-stop com.google.android.youtube.tvunplugged"
# YouTube TV sometimes fails to load video if the app is already open when waking up from sleep.
IS_ASLEEP=`adb shell dumpsys display | grep mScreenState=OFF`
if [ $IS_ASLEEP ];
then
adb shell $CLOSE_YOUTUBE_TV; sleep 2
adb shell $WAKE; sleep 2
fi
There is probably a less aggressive fix, but this works for now to at least make sure the stream loads for a scheduled program.
Very cool, thanks for that! I was wondering how to tighten things up, especially when waking the device up from sleep. I inserted that text:
#!/bin/bash
IPADD="10.0.1.122:5555"
CONNECT="connect 10.0.1.122"
WAKE="input keyevent KEYCODE_WAKEUP"
HOME="input keyevent KEYCODE_HOME"
CLOSE_YOUTUBE_TV="am force-stop com.google.android.youtube.tvunplugged"
# YouTube TV sometimes fails to load video if the app is already open when waking up from sleep.
IS_ASLEEP=`adb shell dumpsys display | grep mScreenState=OFF`
if [ $IS_ASLEEP ];
then
adb shell $CLOSE_YOUTUBE_TV; sleep 2
adb shell $WAKE; sleep 2
fi
adb $CONNECT
adb $CONNECT
adb $CONNECT
adb shell $WAKE
adb shell $WAKE
#adb shell $WAKE
#adb shell $HOME; sleep 2
#adb shell am start com.google.android.youtube.tvunplugged; sleep 2
#adb shell am force-stop com.google.android.youtube.tvunplugged
I think that's correct? Are the commands underneath still appropriate and required?
Move one adb $CONNECT to immediately after the CLOSE_YOUTUBE_TV definition.
The rest of those at the bottom can be removed.
Thanks for that too. Such a great improvement. I just reviewed this thread to track my progress and see these...
With all of the recent tweaks, these YTTV->HDMI source channels are changing very quickly now, taking less than a second each. Which is just as fast, if not faster, than any regular TVE stream. Sweet!
Was looking for a way to run the androidhdmi-for-channels.sh script as an app on my mac instead of having an open terminal window open and so I can put it into my startup items to launch on mac startup. This seems to do the trick.
Good idea. And here's a free GUI utility that can handle the same: Platypus - Create Mac apps from command line scripts |
Thanks for the tip. I like Platypus much better. I can set it up to show the script output in the app window in case something is not working and to keep tabs on the script.
Recent article about the Onn device and how it compares to Chromecast.
Has anyone tried to do all of this on a Windows PC? I think that the go program can be compiled but what about the .sh scripts? Any advice on a windows implementation?
I gave an example of a batch script above.
You will see where that script was to control two devices. You can test by changing the ip addresses and also changing the adb command then saving as bmitune.bat to test. You should be able to then do ābmitune.bat 731ā (or whatever number you setup) from the command prompt.
This thread has piqued my interest.
Dusted off an old Amazon Fire TV and was able to get adb working so I have my first tuner somewhat ready.
Also dusted off a Roku Ultra but when I try to issue a REST API command it says 404 for the keypress/home command. I was able to verify that the rest api is working as the / of the URL shows a status xml response. Did they remove the rest api abilities from the Roku Ultra?
One other question. My channels DVR is on a Mac Mini and I have access to a blackmagic HDMI capture card that I could potentially plugin. Is there a way to record from this capture card using ffmpeg?
Many thanks to everyone in this thread - this is the answer to TVE going fooey.
On the Roku, did you make sure to use HTTP POST for the keypress request.