AndroidHDMI-for-Channels (ah4c) - FireTV LiveTV capture

I've been working on a FireTV LiveTV version of the ah4c project (androidhdmi-for-channels) that will allow those with HDMI encoders and FireTV devices to capture basically anything you can get to appear in the FireTV's LiveTV guide.

Since there's no real search function for "LiveTV" on these devices, we're basically stepping through the device's LiveTV guide for a channel match -- which means you want limit the number of channels in the LiveTV guide to maybe 60 or so maximum (it'll search top down or bottom up based on whichever is quicker).

There are some steps to prepare your FireTV device, but here's the docker-compose (recommended for use with Portainer-Stacks) to give you an idea how this is going to function:

version: '3.9'
services:
  ah4c:
    image: bnhf/ah4c:prime
    container_name: ah4c2
    hostname: ah4c2
    dns_search: localdomain # Specify the name of your LAN's domain, usually local or localdomain
    ports:
      #- 5037:5037 # Port used by adb-server
      - 7664:7654 # Port used by this androidhdmi-for-channels proxy
      - 7665:8000 # Port used by ws-scrcpy
    environment:
      - IPADDRESS=${IPADDRESS} # Hostname or IP address of this androidhdmi-for-channels extension to be used in M3U file (also add port number if not in M3U)
      - NUMBER_TUNERS=${NUMBER_TUNERS} # Number of tuners you'd like defined 1, 2, 3 or 4 supported
      - TUNER1_IP=${TUNER1_IP} # Streaming device #1 with adb port in the form hostname:port or ip:port
      - TUNER2_IP=${TUNER2_IP} # Streaming device #2 with adb port in the form hostname:port or ip:port
      - TUNER3_IP=${TUNER3_IP} # Streaming device #3 with adb port in the form hostname:port or ip:port
      - TUNER4_IP=${TUNER4_IP} # Streaming device #4 with adb port in the form hostname:port or ip:port
      - ENCODER1_URL=${ENCODER1_URL} # Full URL for tuner #1 in the form http://hostname/stream or http://ip/stream
      - ENCODER2_URL=${ENCODER2_URL} # Full URL for tuner #2 in the form http://hostname/stream or http://ip/stream
      - ENCODER3_URL=${ENCODER3_URL} # Full URL for tuner #3 in the form http://hostname/stream or http://ip/stream
      - ENCODER4_URL=${ENCODER4_URL} # Full URL for tuner #4 in the form http://hostname/stream or http://ip/stream
      - STREAMER_APP=${STREAMER_APP} # Streaming device name and streaming app you're using in the form scripts/streamer/app (use lowercase with slashes between as shown)
      - CHANNELSIP=${CHANNELSIP} # Hostname or IP address of the Channels DVR server itself
      #- ALERT_SMTP_SERVER="smtp.gmail.com:587"
      #- ALERT_AUTH_SERVER="smtp.gmail.com"
      #- ALERT_EMAIL_FROM=""
      #- ALERT_EMAIL_PASS=""
      #- ALERT_EMAIL_TO=""
      #- ALERT_WEBHOOK_URL=""
      - LIVETV_ATTEMPTS=${LIVETV_ATTEMPTS} # For FireTV Live Guide tuning only, set maximum number of attempts at finding the desired channel
      - CREATE_M3US=${CREATE_M3US} # Set to true to create device-specific M3Us for use with Amazon FireTV LiveTV channels -- requires a FireTV device
      - TZ=${TZ} # Your local timezone in Linux "tz" format
    volumes:
      - /data/ah4c/scripts:/opt/scripts # pre/stop/bmitune.sh scripts will be stored in this bound host directory under streamer/app
      - /data/ah4c/m3u:/opt/m3u # m3u files will be stored here and hosted at http://<hostname or ip>:7654/m3u for use in Channels DVR - Custom Channels settings
      - /data/ah4c/adb:/root/.android # Persistent data directory for adb keys
    restart: unless-stopped

Note I'm mapping port 7654 to 7664 in the above example, but that's because I have another version of this container for DirecTV app capture on 7654. Use the original port unless you have more than one running too. :slight_smile:

And, your environment variables should look something like this:

You can spin-up the container if you'd like to use the included version of ws-scrcpy (found on port 8000, or whatever you map it to on your ah4c host) to interact with your streaming devices, but don't set the $CREATE_M3US variable to true until you're ready to create the device-specific M3Us necessary to capture the channels in the FireTV LiveTV guide (prepare your LiveTV guide first!).

It's not unusual to have hundreds of channels in that guide, and you want to get that number down to less than 60 or so to have this extension work effectively for you. It's also recommended to go through Privacy Settings, Data Usage Monitoring, Notification Settings and Featured Content in Preferences to limit ads, pop-ups, monitoring and the like:

The most important thing though is to hide sources in the channel guide that you don't want to use. For example, here's my channel guide sources:


You can see I have everything except Prime Video Channels hidden. This gives me 24 channels in the guide, and then I have 3 channels within that group hidden leaving me with 21 total:

Your "master" livetv.m3u should then reflect the same channels you have showing in the guide. Here's mine for the premium channels I'm subscribed to:

#EXTM3U

#EXTINF:-1 channel-id="5MAXHD" tvc-guide-stationid="59961",5StarMAX East
http://{{ .IPADDRESS }}/play/tuner/5MAXHD

#EXTINF:-1 channel-id="ACMAXHD" tvc-guide-stationid="59948",ActionMAX HD East
http://{{ .IPADDRESS }}/play/tuner/ACMAXHD

#EXTINF:-1 channel-id="MAXHD" tvc-guide-stationid="34933",Cinemax HD East
http://{{ .IPADDRESS }}/play/tuner/MAXHD

#EXTINF:-1 channel-id="MAXHDP" tvc-guide-stationid="35975",Cinemax HD West
http://{{ .IPADDRESS }}/play/tuner/MAXHDP

#EXTINF:-1 channel-id="SZEAHD" tvc-guide-stationid="72015",Encore Action HD East
http://{{ .IPADDRESS }}/play/tuner/SZEAHD

#EXTINF:-1 channel-id="STZENHD" tvc-guide-stationid="36225",Encore HD East
http://{{ .IPADDRESS }}/play/tuner/STZENHD

#EXTINF:-1 channel-id="MGMHD" tvc-guide-stationid="65669",MGM+
http://{{ .IPADDRESS }}/play/tuner/MGMHD

#EXTINF:-1 channel-id="MGMDRHD" tvc-guide-stationid="103828",MGM+ DRIVE-IN
http://{{ .IPADDRESS }}/play/tuner/MGMDRHD

#EXTINF:-1 channel-id="MGMHTH" tvc-guide-stationid="67929",MGM+ HITS
http://{{ .IPADDRESS }}/play/tuner/MGMHTH

#EXTINF:-1 channel-id="MGMMRHD" tvc-guide-stationid="74073",MGM+ MARQUEE
http://{{ .IPADDRESS }}/play/tuner/MGMMRHD

#EXTINF:-1 channel-id="MOMAXHD" tvc-guide-stationid="59373",MoreMAX HD East
http://{{ .IPADDRESS }}/play/tuner/MOMAXHD

#EXTINF:-1 channel-id="MOVIEHD" tvc-guide-stationid="59963",MovieMAX HD East
http://{{ .IPADDRESS }}/play/tuner/MOVIEHD

#EXTINF:-1 channel-id="OUTMAXHD" tvc-guide-stationid="59952",OuterMAX HD East
http://{{ .IPADDRESS }}/play/tuner/OUTMAXHD

#EXTINF:-1 channel-id="STRZCIH" tvc-guide-stationid="67236",Starz Cinema HD East
http://{{ .IPADDRESS }}/play/tuner/STRZCIH

#EXTINF:-1 channel-id="STZCHD" tvc-guide-stationid="57569",Starz Comedy HD East
http://{{ .IPADDRESS }}/play/tuner/STZCHD

#EXTINF:-1 channel-id="STZEHD" tvc-guide-stationid="57573",Starz Edge HD East
http://{{ .IPADDRESS }}/play/tuner/STZEHD

#EXTINF:-1 channel-id="STZHD" tvc-guide-stationid="34941",Starz HD East
http://{{ .IPADDRESS }}/play/tuner/STZHD

#EXTINF:-1 channel-id="STZHDP" tvc-guide-stationid="34949",Starz HD West
http://{{ .IPADDRESS }}/play/tuner/STZHDP

#EXTINF:-1 channel-id="STRZIBH" tvc-guide-stationid="67235",Starz inBlack HD East
http://{{ .IPADDRESS }}/play/tuner/STRZIBH

#EXTINF:-1 channel-id="STZKHD" tvc-guide-stationid="57581",Starz Kids & Family HD East
http://{{ .IPADDRESS }}/play/tuner/STZKHD

#EXTINF:-1 channel-id="THMAXHD" tvc-guide-stationid="59954",ThrillerMAX East
http://{{ .IPADDRESS }}/play/tuner/THMAXHD

Add or subtract channels from this M3U to match the channels you have available. Once this setup is complete, you can redeploy the container with CREATE_M3US set to true. This will step through the guide on each of your defined devices to create a device-specific slave playlist that'll be used to tune to the appropriate channel.

There's an M3U editor that can be found at [http://<your_hostname_ip:7654], and then click on M3U editor followed by livetv.m3u. Channels should be added using their "official" unique call sign for the channel-id, and for the last part of the http://{{ .IPADDRESS }}/play/tuner/5MAXHD URL (shown in bold).

The channels in your livetv.m3u need to exactly match what's in the LiveTV guide on your devices (which also need to match each other). The "Channel Name" in particular should match letter-for-letter and case-for-case with your streaming device, as everything is sorted in strict alphabetical order.

I've been using this for a week or so myself, and it's been working well. Creating a version that will automagically create the device-specific M3Us was a touch tricky, but appears to be working fine also.

4 Likes

Cool Beans.
I will give this a try as time permits. Thank you
For all your work on this!

I must have screwed something up, this is what I am seeing.

image

These are my variables

I think you're good -- but I found a pretty obvious mistake on my end. Can't fully test atm, as I have multiple recordings in progress. Looks like it's fixed though, and the new bnhf/ah4c:prime image is built and pushed. So, re-pull and redeploy and let me know how it goes.

1 Like

Looks better.
I will get back to this tomorrow.
Thanks!

A couple of questions:

The station ID is to help Channels find guide data?
What is the easiest way to find the ID?

Also, I understand the m3u editor, where to do I get the actual m3u?
Maybe you could show an example with this as a source in channels....
Just to make sure I understand everything.

Thanks again!

Since we need individual M3U files for each FireStick, using the station's call sign is just a convenient thing to use as a record locator in the different M3U files -- something that'll stay consistent after we change the URL from what's shown in the master to what we'll use in the device-specific file.

The easiest way to find it is by searching Zap2it, using your zip code and satellite as the source:

The call signs they use work well, and if you right click on the station's logo and open it in a new tab, the Gracenote ID can be found in the logo's URL:

https://zap2it.tmsimg.com/h3/NowShowing/19548/s19548_ll_h15_aa.png?w=55

Use the number after "NowShowing"

If Zap2It doesn't have the info, you can use Channels itself via this URL:

http://<your_hostname_or_ip>:8089/tms/stations/"Showtime Women"

Where Showtime Women is the station you're looking for. Output appears like this:

[{"type":"Satellite","name":"Showtime Women","callSign":"ShoWomen","stationId":"25272","bcastLangs":["en"],"preferredImage":{"uri":"https://tmsimg.fancybits.co/assets/s25272_ll_h15_ac.png?w=360\u0026h=270","height":"270","width":"360","primary":"true","category":"Logo","text":"","tier":""},"videoQuality":{"signalType":"Digital","videoType":"SDTV","truResolution":""}},{"type":"Satellite","name":"Showtime Women (Pacific)","callSign":"ShoWomen","stationId":"25273","bcastLangs":["en"],"preferredImage":{"uri":"https://tmsimg.fancybits.co/assets/s25272_ll_h15_ac.png?w=360\u0026h=270","height":"270","width":"360","primary":"true","category":"Logo","text":"","tier":""},"videoQuality":{"signalType":"Digital","videoType":"SDTV","truResolution":""}},{"type":"Satellite","name":"Showtime Women HD","callSign":"ShoWomenHD","stationId":"68338","bcastLangs":["en"],"preferredImage":{"uri":"https://tmsimg.fancybits.co/assets/s68338_ll_h15_aa.png?w=360\u0026h=270","height":"270","width":"360","primary":"true","category":"Logo","text":"","tier":""},"videoQuality":{"signalType":"Digital","videoType":"HDTV","truResolution":"HD 1080i"}},{"type":"Satellite","name":"Showtime Women HD (Pacific)","callSign":"WOMNPHD","stationId":"69116","bcastLangs":["en"],"preferredImage":{"uri":"https://tmsimg.fancybits.co/assets/s68338_h3_ba.png?w=360\u0026h=270","height":"270","width":"360","primary":"true","category":"Logo","text":"","tier":""},"videoQuality":{"signalType":"Digital","videoType":"HDTV","truResolution":"HD 1080i"}},{"type":"Streaming","name":"Showtime Women PST HD Stream","callSign":"WOMNPHS","stationId":"102945","bcastLangs":["en"],"preferredImage":{"uri":"https://tmsimg.fancybits.co/assets/s68338_ll_h15_aa.png?w=360\u0026h=270","height":"270","width":"360","primary":"true","category":"Logo","text":"","tier":""},"videoQuality":{"signalType":"Digital","videoType":"HDTV","truResolution":"HD 1080p"}}]

Call signs are not as accurate, but the Gracenote IDs are spot-on, so you'll probably want to use both to build a good M3U. Submit your M3U back to me when you're done, and I'll add it to the master so future user's will only need to delete stations they don't have.

If you want to edit the M3U as a file, you'll find it on the Docker host under /data/ah4c/m3u (assuming you used /data as your root directory in your volume bindings):

    volumes:
      - /data/ah4c/scripts:/opt/scripts # pre/stop/bmitune.sh scripts will be stored in this bound host directory under streamer/app
      - /data/ah4c/m3u:/opt/m3u # m3u files will be stored here and hosted at http://<hostname or ip>:7654/m3u for use in Channels DVR - Custom Channels settings
      - /data/ah4c/adb:/root/.android # Persistent data directory for adb keys

In terms of future plans for this particular ah4c project variant, I'm planning to merge the DirecTV script with this FireTV LiveTV version.

In other words, you'll be able to use a common set of tuners for DTV app and LiveTV guide capture (Prime Channels and others). HDMI encoder with FireTV devices required (4K MAX, 3rd Gen Cube, or better recommended).

1 Like

Well, its close.
Its not matching channels for some reason.
It will either stop on the wrong channel, or go right on by and give up.
here is my current m3u

#EXTM3U

#EXTINF:-1 channel-id="5MAXHD" tvc-guide-stationid="59961",5StarMAX East
http://192.168.1.2:7654/play/tuner/5MAXHD

#EXTINF:-1 channel-id="ACMAXHD" tvc-guide-stationid="59948",ActionMAX HD East
http://192.168.1.2:7654/play/tuner/ACMAXHD

#EXTINF:-1 channel-id="MAXHD" tvc-guide-stationid="34933",Cinemax HD East
http://192.168.1.2:7654/play/tuner/MAXHD

#EXTINF:-1 channel-id="MAXHDP" tvc-guide-stationid="35975",Cinemax West
http://192.168.1.2:7654/play/tuner/MAXHDP

#EXTINF:-1 channel-id="SZEAHD" tvc-guide-stationid="72015",Encore Action HD East
http://192.168.1.2:7654/play/tuner/SZEAHD

#EXTINF:-1 channel-id="STZENHD" tvc-guide-stationid="36225",Encore HD East
http://192.168.1.2:7654/play/tuner/STZENHD

#EXTINF:-1 channel-id="MGMHD" tvc-guide-stationid="65669",MGM+
http://192.168.1.2:7654/play/tuner/MGMHD

#EXTINF:-1 channel-id="MGMDRHD" tvc-guide-stationid="103828",MGM+ DRIVE-IN
http://192.168.1.2:7654/play/tuner/MGMDRHD

#EXTINF:-1 channel-id="MGMHTH" tvc-guide-stationid="67929",MGM+ HITS
http://192.168.1.2:7654/play/tuner/MGMHTH

#EXTINF:-1 channel-id="MGMMRHD" tvc-guide-stationid="74073",MGM+ MARQUEE
http://192.168.1.2:7654/play/tuner/MGMMRHD

#EXTINF:-1 channel-id="MOMAXHD" tvc-guide-stationid="59373",MoreMAX HD East
http://192.168.1.2:7654/play/tuner/MOMAXHD

#EXTINF:-1 channel-id="MOVIEHD" tvc-guide-stationid="59963",MovieMAX HD East
http://192.168.1.2:7654/play/tuner/MOVIEHD

#EXTINF:-1 channel-id="OUTMAXHD" tvc-guide-stationid="59952",OuterMAX HD East
http://192.168.1.2:7654/play/tuner/OUTMAXHD

#EXTINF:-1 channel-id="STRZCIH" tvc-guide-stationid="67236",Starz Cinema HD East
http://192.168.1.2:7654/play/tuner/STRZCIH

#EXTINF:-1 channel-id="STZCHD" tvc-guide-stationid="57569",Starz Comedy HD East
http://192.168.1.2:7654/play/tuner/STZCHD

#EXTINF:-1 channel-id="STZEHD" tvc-guide-stationid="57573",Starz Edge HD East
http://192.168.1.2:7654/play/tuner/STZEHD

#EXTINF:-1 channel-id="STZHD" tvc-guide-stationid="34941",Starz HD East
http://192.168.1.2:7654/play/tuner/STZHD

#EXTINF:-1 channel-id="STZHDP" tvc-guide-stationid="34949",Starz HD West
http://192.168.1.2:7654/play/tuner/STZHDP

#EXTINF:-1 channel-id="STRZIBH" tvc-guide-stationid="67235",Starz inBlack HD East
http://192.168.1.2:7654/play/tuner/STRZIBH

#EXTINF:-1 channel-id="STZKHD" tvc-guide-stationid="57581",Starz Kids & Family HD East
http://192.168.1.2:7654/play/tuner/STZKHD

#EXTINF:-1 channel-id="THMAXHD" tvc-guide-stationid="59954",ThrillerMAX East
http://192.168.1.2:7654/play/tuner/THMAXHD

#EXTINF:-1 channel-id="AMCPLUS" tvc-guide-stationid="114759",AMC+
http://192.168.1.2:7654/play/tuner/AMCPLUS

#EXTINF:-1 channel-id="HBO" tvc-guide-stationid="10240",HBO
http://192.168.1.2:7654/play/tuner/HBO

#EXTINF:-1 channel-id="HBO 2" tvc-guide-stationid="10241",HBO 2
http://192.168.1.2:7654/play/tuner/HBO 2

#EXTINF:-1 channel-id="HBOCOMEDY" tvc-guide-stationid="18429",HBO COMEDY
http://192.168.1.2:7654/play/tuner/HBOCOMEDY

#EXTINF:-1 channel-id="HBOFAM" tvc-guide-stationid="34879",HBO FAMILY
http://192.168.1.2:7654/play/tuner/HBOFAM

#EXTINF:-1 channel-id="HBOSLAE" tvc-guide-stationid="74447",HBO SIGNATURE
http://192.168.1.2:7654/play/tuner/HBOSLAE

#EXTINF:-1 channel-id="HBO" tvc-guide-stationid="10244",HBO WEST
http://192.168.1.2:7654/play/tuner/HBO

#EXTINF:-1 channel-id="HBOZONE" tvc-guide-stationid="18431",HBO ZONE
http://192.168.1.2:7654/play/tuner/HBOZONE

#EXTINF:-1 channel-id="PPLUSHISUN" tvc-guide-stationid="121825",HISTORY & UNDISCOVERED
http://192.168.1.2:7654/play/tuner/PPLUSHISUN

#EXTINF:-1 channel-id="PPLUSM" tvc-guide-stationid="121830",MOVIES
http://192.168.1.2:7654/play/tuner/PPLUSM

#EXTINF:-1 channel-id="SHOWTM" tvc-guide-stationid="87770",SHOWTIME
http://192.168.1.2:7654/play/tuner/SHOWTM

#EXTINF:-1 channel-id="SHOWTIME" tvc-guide-stationid="11117",SHOWTIME WEST
http://192.168.1.2:7654/play/tuner/SHOWTIME

There are definitely issues with your M3U, and I'll give you a more complete response on that shortly. In the meantime, could you post the generated device-specific M3U as well?

I would guess in your case that's going to be the IP address of the FireStick with a .m3u at the end. It'll be found in the same folder with livetv.m3u.

Ok, so to distill it down, here are the issues I see:

Call signs never have spaces, and are always unique. Don't use SD call signs or Gracenote IDs if HD versions are available. This screen capture from Zap2It shows appropriate call signs for HBO:

As you can see HBO HD East's call sign should be HBOHD, and HBO HD West should be HBOHDP for example. Right clicking on the logo next to HBOHD and opening the image in a new tab would show you what the Gracenote Station ID should be for that channel:

https://zap2it.tmsimg.com/h3/NowShowing/19548/s19548_ll_h15_aa.png?w=55

Which in this case should be 19548 (use the number after /NowShowing/ as it's sometimes different from the .png filename.

The Channel Name (which is after the comma on the first line of each M3U record) should exactly match the channel name in the FireTV LiveTV guide. I'd suggest that should be down to the case level for best alphabetical sorting, i.e. use upper and lower case to match:

Manage Channels - Prime Video Channels is the best place to see the exact channel name you should use.

Clearly I don't have a grasp on the m3u's

Here is the device specific m3u.

#EXTM3U

#EXTINF:-1 channel-id="5MAXHD" tvc-guide-stationid="59961",5StarMAX East
http://192.168.1.2:7654/play/tuner/

#EXTINF:-1 channel-id="ACMAXHD" tvc-guide-stationid="59948",ActionMAX HD East
http://192.168.1.2:7654/play/tuner/57

#EXTINF:-1 channel-id="AMCPLUS" tvc-guide-stationid="114759",AMC+
http://192.168.1.2:7654/play/tuner/11

#EXTINF:-1 channel-id="MAXHD" tvc-guide-stationid="34933",Cinemax HD East
http://192.168.1.2:7654/play/tuner/67

#EXTINF:-1 channel-id="MAXHDP" tvc-guide-stationid="35975",Cinemax West
http://192.168.1.2:7654/play/tuner/38

#EXTINF:-1 channel-id="SZEAHD" tvc-guide-stationid="72015",Encore Action HD East
http://192.168.1.2:7654/play/tuner/71

#EXTINF:-1 channel-id="STZENHD" tvc-guide-stationid="36225",Encore HD East
http://192.168.1.2:7654/play/tuner/52

#EXTINF:-1 channel-id="HBO" tvc-guide-stationid="10240",HBO
http://192.168.1.2:7654/play/tuner/18

#EXTINF:-1 channel-id="HBO 2" tvc-guide-stationid="10241",HBO 2
http://192.168.1.2:7654/play/tuner/74

#EXTINF:-1 channel-id="HBOCOMEDY" tvc-guide-stationid="18429",HBO COMEDY
http://192.168.1.2:7654/play/tuner/49

#EXTINF:-1 channel-id="HBOFAM" tvc-guide-stationid="34879",HBO FAMILY
http://192.168.1.2:7654/play/tuner/33

#EXTINF:-1 channel-id="HBOSLAE" tvc-guide-stationid="74447",HBO SIGNATURE
http://192.168.1.2:7654/play/tuner/35

#EXTINF:-1 channel-id="HBO" tvc-guide-stationid="10244",HBO WEST
http://192.168.1.2:7654/play/tuner/50

#EXTINF:-1 channel-id="HBOZONE" tvc-guide-stationid="18431",HBO ZONE
http://192.168.1.2:7654/play/tuner/58

#EXTINF:-1 channel-id="PPLUSHISUN" tvc-guide-stationid="121825",HISTORY & UNDISCOVERED
http://192.168.1.2:7654/play/tuner/32

#EXTINF:-1 channel-id="MGMHD" tvc-guide-stationid="65669",MGM+
http://192.168.1.2:7654/play/tuner/41

#EXTINF:-1 channel-id="MGMDRHD" tvc-guide-stationid="103828",MGM+ DRIVE-IN
http://192.168.1.2:7654/play/tuner/22

#EXTINF:-1 channel-id="MGMHTH" tvc-guide-stationid="67929",MGM+ HITS
http://192.168.1.2:7654/play/tuner/66

#EXTINF:-1 channel-id="MGMMRHD" tvc-guide-stationid="74073",MGM+ MARQUEE
http://192.168.1.2:7654/play/tuner/80

#EXTINF:-1 channel-id="MOMAXHD" tvc-guide-stationid="59373",MoreMAX HD East
http://192.168.1.2:7654/play/tuner/30

#EXTINF:-1 channel-id="MOVIEHD" tvc-guide-stationid="59963",MovieMAX HD East
http://192.168.1.2:7654/play/tuner/12

#EXTINF:-1 channel-id="PPLUSM" tvc-guide-stationid="121830",MOVIES
http://192.168.1.2:7654/play/tuner/34

#EXTINF:-1 channel-id="OUTMAXHD" tvc-guide-stationid="59952",OuterMAX HD East
http://192.168.1.2:7654/play/tuner/56

#EXTINF:-1 channel-id="SHOWTM" tvc-guide-stationid="87770",SHOWTIME
http://192.168.1.2:7654/play/tuner/21

#EXTINF:-1 channel-id="SHOWTIME" tvc-guide-stationid="11117",SHOWTIME WEST
http://192.168.1.2:7654/play/tuner/83

#EXTINF:-1 channel-id="STRZCIH" tvc-guide-stationid="67236",Starz Cinema HD East
http://192.168.1.2:7654/play/tuner/24

#EXTINF:-1 channel-id="STZCHD" tvc-guide-stationid="57569",Starz Comedy HD East
http://192.168.1.2:7654/play/tuner/16

#EXTINF:-1 channel-id="STZEHD" tvc-guide-stationid="57573",Starz Edge HD East
http://192.168.1.2:7654/play/tuner/68

#EXTINF:-1 channel-id="STZHD" tvc-guide-stationid="34941",Starz HD East
http://192.168.1.2:7654/play/tuner/44

#EXTINF:-1 channel-id="STZHDP" tvc-guide-stationid="34949",Starz HD West
http://192.168.1.2:7654/play/tuner/19

#EXTINF:-1 channel-id="STRZIBH" tvc-guide-stationid="67235",Starz inBlack HD East
http://192.168.1.2:7654/play/tuner/69

#EXTINF:-1 channel-id="STZKHD" tvc-guide-stationid="57581",Starz Kids & Family HD East
http://192.168.1.2:7654/play/tuner/78

#EXTINF:-1 channel-id="THMAXHD" tvc-guide-stationid="59954",ThrillerMAX East
http://192.168.1.2:7654/play/tuner/54

In this case especially, the M3U needs to spot-on, but you are in the ballpark -- a few adjustments and you'll be there. Once you have the M3U the way you want it, restart the container (re-pull and redeploy switch set to on) and a new device-specific version will be generated for you.

EDIT: Also, make sure the URL part after /play/tuner/ exactly matches the channel-id, once you've sorted those out.

EDIT2: I have made some minor improvements today, so when you're ready to build the device-specific M3U again, go ahead and stop the stack, and add: UPDATE_SCRIPTS=${UPDATE_SCRIPTS}
to the environment section of your docker-compose and UPDATE_SCRIPTS and true to the environment variables section. That'll pull the most recent ah4c:prime image and update the scripts as well.

Here's a partial screenshot to show you what it should look like:

1 Like

When everything is hunky-dory, we don't want to see any records like this in your device-specific M3U:

#EXTINF:-1 channel-id="5MAXHD" tvc-guide-stationid="59961",5StarMAX East
http://192.168.1.2:7654/play/tuner/

Note the missing unique ID after /play/tuner/. We can't have any of these missing, but having the one in the first record is the worst of all -- as that's how we confirm we're at the top of the guide.

Ok,
I'm trying to get just the channels you have included since I have all of those.
I have noticed that Cinemax West is different than what I am seeing.
I removed "HD" because that is what I am seeing on the FireTV.

One other thing I noticed is there is a banner in the middle of the guide for a TV Series. Perhaps that is messing things up?

This is the device m3u now.

#EXTM3U

#EXTINF:-1 channel-id="5MAXHD" tvc-guide-stationid="59961",5StarMAX East
http://192.168.1.2:7654/play/tuner/55

#EXTINF:-1 channel-id="ACMAXHD" tvc-guide-stationid="59948",ActionMAX HD East
http://192.168.1.2:7654/play/tuner/57

#EXTINF:-1 channel-id="MAXHD" tvc-guide-stationid="34933",Cinemax HD East
http://192.168.1.2:7654/play/tuner/67

#EXTINF:-1 channel-id="MAXHDP" tvc-guide-stationid="35975",Cinemax West
http://192.168.1.2:7654/play/tuner/38

#EXTINF:-1 channel-id="SZEAHD" tvc-guide-stationid="72015",Encore Action HD East
http://192.168.1.2:7654/play/tuner/71

#EXTINF:-1 channel-id="STZENHD" tvc-guide-stationid="36225",Encore HD East
http://192.168.1.2:7654/play/tuner/16

#EXTINF:-1 channel-id="MGMHD" tvc-guide-stationid="65669",MGM+
http://192.168.1.2:7654/play/tuner/52

#EXTINF:-1 channel-id="MGMDRHD" tvc-guide-stationid="103828",MGM+ DRIVE-IN
http://192.168.1.2:7654/play/tuner/18

#EXTINF:-1 channel-id="MGMHTH" tvc-guide-stationid="67929",MGM+ HITS
http://192.168.1.2:7654/play/tuner/74

#EXTINF:-1 channel-id="MGMMRHD" tvc-guide-stationid="74073",MGM+ MARQUEE
http://192.168.1.2:7654/play/tuner/49

#EXTINF:-1 channel-id="MOMAXHD" tvc-guide-stationid="59373",MoreMAX HD East
http://192.168.1.2:7654/play/tuner/33

#EXTINF:-1 channel-id="MOVIEHD" tvc-guide-stationid="59963",MovieMAX HD East
http://192.168.1.2:7654/play/tuner/35

#EXTINF:-1 channel-id="OUTMAXHD" tvc-guide-stationid="59952",OuterMAX HD East
http://192.168.1.2:7654/play/tuner/50

#EXTINF:-1 channel-id="STRZCIH" tvc-guide-stationid="67236",Starz Cinema HD East
http://192.168.1.2:7654/play/tuner/58

#EXTINF:-1 channel-id="STZCHD" tvc-guide-stationid="57569",Starz Comedy HD East
http://192.168.1.2:7654/play/tuner/32

#EXTINF:-1 channel-id="STZEHD" tvc-guide-stationid="57573",Starz Edge HD East
http://192.168.1.2:7654/play/tuner/41

#EXTINF:-1 channel-id="STZHD" tvc-guide-stationid="34941",Starz HD East
http://192.168.1.2:7654/play/tuner/22

#EXTINF:-1 channel-id="STZHDP" tvc-guide-stationid="34949",Starz HD West
http://192.168.1.2:7654/play/tuner/66

#EXTINF:-1 channel-id="STRZIBH" tvc-guide-stationid="67235",Starz inBlack HD East
http://192.168.1.2:7654/play/tuner/80

#EXTINF:-1 channel-id="STZKHD" tvc-guide-stationid="57581",Starz Kids & Family HD East
http://192.168.1.2:7654/play/tuner/30

#EXTINF:-1 channel-id="THMAXHD" tvc-guide-stationid="59954",ThrillerMAX East
http://192.168.1.2:7654/play/tuner/12

Shouldn't be, I have those "ads" too, and I'm accounting for those in the script.

Looks right to me, and actually matches your first attempt, with the exception of the first record. If you updated the ah4c:prime image, hopefully you're seeing some better results now.

EDIT: From here forward, you should have CREATE_M3US set to false. No reason to recreate this file on every container launch, unless you actually need to generate a new device-specific M3U for whatever reason.

Something I just thought of, that might be tripping you up, is that you need to do a "Reload M3U" from the Channels DVR settings page for this specific source, every time you make a change to the "master" (livetv.m3u) and want to test. This is a Channels DVR requirement.

No, its not working.
Seems to always pick the wrong channel.
5 star max and actionmax works, the rest mess up.

Yes I do this....