HDMI for Channels

Can you share how you got the channel changing working in nextpvr?
Thanks.

1 Like

I'm glad that the sharing of my travails helps others, this is such a cool project that I'm excited about! And hopefully this will pave the way for others to dive in and get it going for their CDVR setups too. I suspect I'll be expanding upon it soon. In the meantime I went back to review the original main.go script and I see where the bmituneb.sh filename came from, it's for setups with multiple encoders, since I only have one currently, I had just removed the first listing and not the second one, but didn't confirm that my actual file names matched exactly... duh. Thankfully @tmm1 caught that quickly :slight_smile:

Anyway, if I add more encoders with more Android TV dongles, do I just need to duplicate and edit these three scripts with their different IP addresses, so I have one set for each encoder?

prebmitune.sh
bmitune.sh
stopbmitune.sh

prebmituneb.sh
bmituneb.sh
stopbmituneb.sh

prebmitunec.sh
bmitunec.sh
stopbmitunec.sh

prebmituned.sh
bmituned.sh
stopbmituned.sh

...and then Channels DVR will be smart enough to manage them as separate tuners as usual (like, say for example, I'm watching MSNBC but scheduled a recording at the same time for a show on USA?)

1 Like

Right now we are still in the testing phase ... more to come.... probably a WIKI.

Thanks

I do not want to start documentation in this thread and have it lost in the Chatter.... gets confusing with different members doing different things.

Yeah, and only available for local pickup, no shipping, from the few zip codes where it is available. Interesting marketing strategy, I suppose, but I try to avoid having to go inside Walmart.

So as I was checking, a Brickseek search landed me on this product listing on Amazon, the new Onn 4K for just $10 more and shipping right away. While supplies last of course. Odd that a regular search on Amazon doesn't reveal this particular listing. At least it didn't for me.

There are also plenty of these available on eBay in the $31-$60 range.

2 Likes

Just a quick question. I use Directv Stream as provider. I know that when I use their app. I have to have activity or it’ll close the stream after 4 hours. I would think the other services have something similar but don’t know. Is it possible to send a command every couple hrs to defeat the “Are you watching screen”?

For those wanting a hdmi encoder with ir blaster for a STB instead of adb commands for an android box - I’d say the easiest way would be a Hauppauge HD PVR2 1512 (not gaming edition)

Can output 1080i60/720p60 or 1080p30 and when set up through NextPVR as the M3U backend, you can then bring that m3u into channels and have nextpvr doing the channel switching/ir blasting, while using channels far superior app and video player.

Just a note that only the windows version of NextPVR seems to support hdmi encoders like the Hauppauge hd pvr2 etc

Edit: also need to be mindful this device does not support hdcp so would need a cheap hdmi splitter/device that can strip the hdcp

I have one of those units now. I'm struggling with the settings. Would you mind sharing how you setup yours? Here is how mine is currently setup.

Also, how did you setup the source in channels?

Any reason you chose H.264 instead of H.265? At least on my box, these settings seem to be working well:

I was switching those around as I was flailing about trying to get it working. I was able at one point to see in Channels a snippet of a video by using the http://192.168.0.116/ts/1_0 that they list as the TS Preview URL.

"Chromecast with Google TV" ($29 for HD, $49 for 4K) is a good device choice for this. It's available just about everywhere. The HD version should be fine for this application.

With the few HDMI encoders I tested, I found that h265 significantly increased cpu load and latency. As such, it might not be worth it. Especially on a local network where the bitrate reduction won't have much value. Depending on the playback device it might also trigger a transcode to h264 on playback. IMO, it's worth at least playing around with both options when you get to a point where you are optimizing things.

It might be helpful to first get the HDMI encoder running outside of Channels DVR.

In VLC Media Player click file, open network, paste that "TS Preview URL" into the URL box, and then click "open". If the video output from your streaming device appears here then the streaming box is working correctly and you can move on to the Channels config.

You should change the frame rate (FPS) to 60 in the encoder config though.

On the main 'system setting page' change system mode to '1*1080p@50/60'; this will allow 60fps under the 'video' tab.

As others have mentioned, test with vlc:

http://192.168.1.120/ts/1_0

Thanks @turtletank and @jad3675. Made that change and got it working in VLC. It now works in a custom channel selecting Stream Format-->MPEG-TS and using the preview URL which in my case is http://192.168.0.116/ts/1_0.

1 Like

I found that issue as well with H.265. Especially for commercial skipping took way too long. I ended up using H.264.

3 Likes

Does the referenced encoder bypass/strip HDCP? Or is another device required?

So I've been testing settings and different scenarios. Manually selecting a channel from the Guide or On Now to play live works, most of the time. Not always though, and when channel surfing I'll either get "503" or a "connection to the HDHomeRun was lost. Press play to try again" error. And pressing play to try again, even multiple times, doesn't work. Exiting back to the Guide or On Now, and manually selecting a channel though, eventually does work. I've put these channels in a Collection of their own so I know to interface with them differently.

And thankfully, recordings thus far, tuned into by the server, seem to be proceeding without a hitch. I did change from H.265 back to H.264 on Encoder #1 due to the comskip speed advice, mentioned above, thanks! The PQ actually looks a bit sharper to me, H.265 looked a little soft, but that could be just my imagination.

All things considered though, things are working pretty well in CDVR as I get it dialed in... enough that I've started to add more than just the NBCU channels to the mix. YouTube TV has some other channels that never had TVE compatibility, channels like MTV Classic, NewsNation, and BBC News, so I've started adding some of them in too.

What other TVE holdouts (or externally launchable apps, with exclusive streaming content, specifically with mappable guide data) have you all found worth integrating via these HDMI encoders?

FWIW here's my current Custom Channel text:

#EXTM3U

#EXTINF:-1 channel-id="NBC",NBC
http://10.0.1.21:7654/play/tuner/nbc

#EXTINF:-1 channel-id="MSNBC",MSNBC
http://10.0.1.21:7654/play/tuner/msnbc

#EXTINF:-1 channel-id=E!" tvc-guide-stationid="61812"  tvg-shift="+3",E!
http://10.0.1.21:7654/play/tuner/e!

#EXTINF:-1 channel-id="Bravo" tvc-guide-stationid="58625",Bravo
http://10.0.1.21:7654/play/tuner/bravo

#EXTINF:-1 channel-id="Oxygen",Oxygen
http://10.0.1.21:7654/play/tuner/oxygen

#EXTINF:-1 channel-id="USA", tvc-guide-stationid="58452" tvg-shift="+3",USA
http://10.0.1.21:7654/play/tuner/usa

#EXTINF:-1 channel-id="SyFy" tvg-shift="+3",SyFy
http://10.0.1.21:7654/play/tuner/syfy

#EXTINF:-1 channel-id="CNBC",CNBC
http://10.0.1.21:7654/play/tuner/cnbc

#EXTINF:-1 channel-id="Golf",Golf
http://10.0.1.21:7654/play/tuner/golf

#EXTINF:-1 channel-id="NFL",NFL Network
http://10.0.1.21:7654/play/tuner/nfl

#EXTINF:-1 channel-id="NewsNation",NewsNation
http://10.0.1.21:7654/play/tuner/newsnation

#EXTINF:-1 channel-id="MTV Classic" tvg-shift="+9",MTV Classic
http://10.0.1.21:7654/play/tuner/mtvclassic

#EXTINF:-1 channel-id="BBC News",BBC News
http://10.0.1.21:7654/play/tuner/bbcnews

#EXTINF:-1 channel-id="Smithsonian" tvc-guide-stationid="65799", Smithsonian Channel
http://10.0.1.21:7654/play/tuner/smithsonian

And here is my current bmitune.sh config:

#!/bin/bash
HOME="input keyevent KEYCODE_HOME; sleep 1"
PRIME1="input keyevent 19 19 19 19; sleep 1; input keyevent 21 21 21; sleep 1; input keyevent 22; sleep 1; input keyevent 23; sleep 1"
PRIME2="input keyevent 19; sleep 1"
PRIME3="input keyevent --longpress 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67"
SEARCH1="input keyevent 66; sleep 2"
SEARCH2="input keyevent 66"


#NBC
if [ $1 = "nbc" ];then
HOME="input keyevent KEYCODE_HOME; sleep 1"
adb shell am start -a android.intent.action.VIEW -d https://tv.youtube.com/watch/9iwfkw-dMAw?onboard=1 -n com.google.android.youtube.tvunplugged/com.google.android.apps.youtube.tvunplugged.activity.MainActivity
fi

#MSNBC
if [ $1 = "msnbc" ];then
HOME="input keyevent KEYCODE_HOME; sleep 1"
adb shell am start -a android.intent.action.VIEW -d https://tv.youtube.com/watch/q6bWEVqhP8o?onboard=1 -n com.google.android.youtube.tvunplugged/com.google.android.apps.youtube.tvunplugged.activity.MainActivity
fi

#E!
if [ $1 = "e!" ];then
HOME="input keyevent KEYCODE_HOME; sleep 1"
adb shell am start -a android.intent.action.VIEW -d https://tv.youtube.com/watch/ILTrUfLFrHI?onboard=1 -n com.google.android.youtube.tvunplugged/com.google.android.apps.youtube.tvunplugged.activity.MainActivity
fi

#Bravo
if [ $1 = "bravo" ];then
HOME="input keyevent KEYCODE_HOME; sleep 1"
adb shell am start -a android.intent.action.VIEW -d https://tv.youtube.com/watch/xNk2Sv4t4Tc?onboard=1 -n com.google.android.youtube.tvunplugged/com.google.android.apps.youtube.tvunplugged.activity.MainActivity
fi

#Oxygen
if [ $1 = "oxygen" ];then
HOME="input keyevent KEYCODE_HOME; sleep 1"
adb shell am start -a android.intent.action.VIEW -d https://tv.youtube.com/watch/v4upAc0UExk?onboard=1 -n com.google.android.youtube.tvunplugged/com.google.android.apps.youtube.tvunplugged.activity.MainActivity
fi

#USA
if [ $1 = "usa" ];then
HOME="input keyevent KEYCODE_HOME; sleep 1"
adb shell am start -a android.intent.action.VIEW -d https://tv.youtube.com/watch/DJ7m0fdLKEY?onboard=1 -n com.google.android.youtube.tvunplugged/com.google.android.apps.youtube.tvunplugged.activity.MainActivity
fi

#SYFY
if [ $1 = "syfy" ];then
HOME="input keyevent KEYCODE_HOME; sleep 1"
adb shell am start -a android.intent.action.VIEW -d https://tv.youtube.com/watch/2_WogcoZ1cY?onboard=1 -n com.google.android.youtube.tvunplugged/com.google.android.apps.youtube.tvunplugged.activity.MainActivity
fi

#CNBC
if [ $1 = "cnbc" ];then
HOME="input keyevent KEYCODE_HOME; sleep 1"
adb shell am start -a android.intent.action.VIEW -d https://tv.youtube.com/watch/GIBoX-XF5i0?onboard=1 -n com.google.android.youtube.tvunplugged/com.google.android.apps.youtube.tvunplugged.activity.MainActivity
fi

#Golf
if [ $1 = "golf" ];then
HOME="input keyevent KEYCODE_HOME; sleep 1"
adb shell am start -a android.intent.action.VIEW -d https://tv.youtube.com/watch/XK34g7QRvGk?onboard=1 -n com.google.android.youtube.tvunplugged/com.google.android.apps.youtube.tvunplugged.activity.MainActivity
fi

#NFL Network
if [ $1 = "nfl" ];then
HOME="input keyevent KEYCODE_HOME; sleep 1"
adb shell am start -a android.intent.action.VIEW -d https://tv.youtube.com/watch/_pYg9qMKKIA?onboard=1 -n com.google.android.youtube.tvunplugged/com.google.android.apps.youtube.tvunplugged.activity.MainActivity
fi

#NFL Network
if [ $1 = "newsnation" ];then
HOME="input keyevent KEYCODE_HOME; sleep 1"
adb shell am start -a android.intent.action.VIEW -d https://tv.youtube.com/watch/ZIzM3eNrylg?onboard=1 -n com.google.android.youtube.tvunplugged/com.google.android.apps.youtube.tvunplugged.activity.MainActivity
fi

#MTV Classic
if [ $1 = "mtvclassic" ];then
HOME="input keyevent KEYCODE_HOME; sleep 1"
adb shell am start -a android.intent.action.VIEW -d https://tv.youtube.com/watch/isxl2N52bUQ?onboard=1 -n com.google.android.youtube.tvunplugged/com.google.android.apps.youtube.tvunplugged.activity.MainActivity
fi

#AMC+
if [ $1 = "bbcnews" ];then
HOME="input keyevent KEYCODE_HOME; sleep 1"
adb shell am start -a android.intent.action.VIEW -d https://tv.youtube.com/watch/g5BmB1qXulc?onboard=1 -n com.google.android.youtube.tvunplugged/com.google.android.apps.youtube.tvunplugged.activity.MainActivity
fi



1 Like

It takes the input and presents it as a ts stream that can be used in VLC or channels.

1 Like

So you're not using an HDMI "splitter" in between your streaming box and the IP Encoder?

1 Like