Incompatible Channels work around Just Because....

iBoston

SatelliteGuys Pro
Original poster
Jul 15, 2014
2,642
2,203
North Central
Back a few months ago, Nasa 4K changed modes which made it not play on certain STB's. They since fixed it, but now i have the same dilemma with a handful of channels on 34.5w. My Enigma2 STB just won't play the video on them for what ever reason. Just like before with Nasa4K, i could do a workaround by streaming it from KODI.

I thought about it last night while i was trying to sleep. I love to channel surf through my channels and click the 'Channel Down' button going through all my channels on a particular satellite, or boutique list. I have written a few programs that automate my KODI, and my Yamaha AV receiver. What if i could write a program that monitors a list of enigma2 service references and automate the process......

Well, I took a couple hours, and i wrote just that. I made a list of the enigma2 service reference #'s for the corresponding channels that wont play on my STB. My program checks every second what service is playing on the STB, and the moment i switch to a channel in the list, the program automatically changes my Video input to my KODI and then the program automatically tells the KODI to stream/play the service channel... When im done watching that channel, on my remote, i just change the channel to the next channel, and if it needs to play through kodi, it automatically initiates the next stream, and if its a channel the STB can play, the program automatically switches the video source back to my STB. - I don't have to do anything other then hit the channel change on my remote and my program automatically makes the adjustments that are needed. The program is smart enough to know what video source its on, so im not changing video sources every time, only when needed, ie switching from compatible channel to a non compatible channel.

I don't have to leave the program running all the time, but i could. I just launch it when i want to channel surf through my list that i know contains incompatible STB channels. There is about a 1-2 second delay when switching back and forth, but it works great and requires no further effort on my part than changing the channel via the STB remote.

Yea, im bragging a bit, but i think it was cool that my idea works, and seems to be very stable. I went through 40 channels switching back and forth probably 20 times and it worked perfectly. I love the versatility you get with enigma2 receivers.
 
Here is some sample code... This will at least show you the foundation of how i communicate with the different devices.

Code to Get Kodi to Play URL stream.
Ref is the Enigma2 channel service ID.

1. Clear Play List
2. Add M3U/URL to playlist
3. Play playlist

Code:
M3U = "http://192.168.1.200:8001/" + Ref
  
              'clear playlist
              Json = "{ ""jsonrpc"": ""2.0"", ""method"": ""Playlist.Clear"", ""params"": { ""playlistid"": 1 }, ""id"": 1 }"
              htm = xWait.CallURL(IP, Port, "/jsonrpc", Json, , , , , True)
              Spit "Kodi : Erase Playlist : " + IIf(xWait.ReturnStatusCode = 200, "OK", CStr(xWait.ReturnStatusCode))
              
              'Add M3U to playlist
              M3U = Replace(M3U, "[IP]", DSRIP)
              Json = "{ ""jsonrpc"": ""2.0"", ""method"": ""Playlist.Insert"", ""id"": 1, ""params"": [ 1,0,  { ""file"": """ + M3U + """  } ] }"
              htm = xWait.CallURL(IP, Port, "/jsonrpc", Json, , , , , True)
              Spit "Kodi : Declare Playlist : " + IIf(xWait.ReturnStatusCode = 200, "OK", CStr(xWait.ReturnStatusCode))
           
              'Play it
              Json = "{  ""jsonrpc"": ""2.0"", ""method"": ""Player.Open"", ""id"": 1, ""params"": [  {  ""playlistid"": 1, ""position"": 0 }, {  ""resume"": true } ] }"
              htm = xWait.CallURL(IP, Port, "/jsonrpc", Json, , , , 10, True)
              Spit "Kodi : Start Stream : " + IIf(xWait.ReturnStatusCode = 200, "OK", "Failed!")
              InKodiStream = (xWait.ReturnStatusCode = 200)

Here is the code that fetches the current channel being played on the Enigma2 STB

Code:
Public Function IsE2KodiChannel(sRef As String) As Boolean
  Dim tmp As String
  Dim xml As String
  Dim Ref As String
  Dim ok As Boolean
  Dim CNT As Long
  Dim tic As Long
  
  Const Eip = "192.168.1.200"
  
  CNT = 0
  ok = False
  If GotEnigma And GotPong(Eip) Then
    Do
      tmp = "http://" + Eip + "/web/subservices"
      xml = WaitURL(tmp)
      If Len(Trim(xml)) > 0 Then
        ok = True
        If ok Then
          sRef = StripIT("<e2servicereference>", "</e2servicereference>", xml, , True, True)
          tic = InStr(sRef, "::")
          If tic > 0 Then
            sRef = Left(sRef, tic)
          End If
          IsE2KodiChannel = E2List.Exists(sRef)
        End If
      End If
      If ok Then Exit Do
      CNT = CNT + 1
      If CNT > 10 Then Exit Do
      DoEvents
    Loop
  End If
End Function

Here is the code to fetch/set Yamaha AV receiver

Code:
Private Function retVideoSource(Optional ReturnFriendly As Boolean = False) As String
   Dim html As String
   
   If GotYamaha Then
     GotYamahaCount = GotYamahaCount + 1
     html = WaitURL("http://" + Yip + "/YamahaRemoteControl/ctrl", False, "<YAMAHA_AV cmd=""GET""><Main_Zone><Basic_Status>GetParam</Basic_Status></Main_Zone></YAMAHA_AV>", True)
     retVideoSource = SurroundIT("Input_Sel", ">", "</", html)
     If ReturnFriendly Then retVideoSource = MyInput(retVideoSource)
     CmbY.Text = MyInput(retVideoSource)
   End If
End Function

      If Not retVideoSource() = Yamaha Then
        SrvURL = "http://" + Yip + "/YamahaRemoteControl/ctrl"
        Post = "<YAMAHA_AV cmd=""PUT""><Main_Zone><Input><Input_Sel>" + Yamaha + "</Input_Sel></Input></Main_Zone></YAMAHA_AV>"
        PushURL SrvURL, Post
 
  • Like
Reactions: FTA4PA
Nice work to automate it.

Out of curiosity, what channels on 34.5w don't play nice with your receiver, and any idea why?

Here are a list of the channels that will not play video on my DreamBox 920 and DreamBox 520 units.

Code:
    "Arirang TV South Korean [English]"
    "AprendeTV"
    "BOLIVIA TV"
    "CANAL 11"
    "CCI Channel"
    "CLAVE"
    "COLOR VISION"
    "CUBAVISION INTERNACIONAL"
    "Ecuavision HD"
    "Ecuavision Internacional"
    "RTG"
    "RTV"
    "SUN CHANNEL"
    "TELEANTILLAS"
    "Telesistema 11"
    "TV CULTURA"

11079v10000 and 11652v10000 are the only two transponders that have this weird format, but its not all the channels in those muxes. For example : AME47 and others on 11652 plays video fine and SeoTV on 11079 and others play video fine. In another words, not all channels in either muxes won't play video, only the ones listed above.

I haven't used any special program to look at the codec information between the ones that work and the ones that don't work, but looking just at VLC codec information, working and non working channels look to be the same, so i have no clue why they won't play video.

Maybe someone can suggest a program that gives more specific detail on the codec being utilized to see if i can see any differences. It is not limited to just my one STB, its the same on all my DreamBox units. I have a cheap Axas Enigma2 STB, and that plays all the channels on 34.5 without any problems at all. So, i assume it to be some modification of the codec that the hardware chip in the dreamboxes cannot handle.

On another note, being my program only really utilizes URL calls and Json requests, i would think i could write an Enigma2 plugin that could do all the work of my windows program. I would need to find out if there is a way to call a php script when ever there is a channel change on an enigma2 STB, in which case the php script would be more simple and efficient. I wrote it in windows because all the foundation work had already been done via my DSRC program written to control the Digicipher Commercial Receivers project. I just had to add specific functions to tailor it to the work i wanted to do with this current project.

screenshot.3.jpg
screenshot006.png
 
Last edited:
  • Like
Reactions: Keith Brannen
From my AZBox (which does play all the channels) I streamed to my computer and used PotPlayer to view. I did notice that all the channels that aren't playing for you have the same information/format:
345w182.jpg


Whereas some of those that are playing for you in the same 720x480 format have the following:
345w136.jpg


The difference appears to be the line after 720x480, those listed as 1.82:1 don't play, and those listed as 1.36:1 do play! Strange, but I wonder whether there is something there that is causing the problem.
 
  • Like
Reactions: iBoston
If memory serves me, i had this problem one time before on 97w about 2-3 years ago on one of the channels there.. I believe it was either WalkTV or AMGTV. One of them didn't give me video... I have a fix for it now, so i won't fret over it. I just needed something that was a bit seemless otherwise i would just never tune to the channels. Ill keep an eye out should i stumble upon this anywhere else to see if any additional lack-of-video channels will have the same aspect ratio.
 
  • Like
Reactions: Keith Brannen
Okay, I am finished with version 1 of the program. I moved it to its own separate program, ie not apart of the DSRC program. I also made it so it can be configured via config files. I also made a slow mode so its not querying the service every second. When your actively turning channels, it is quick to pick up channel changes, and when you have been idle for awhile, it goes into slow mode. I am going to give this a try and run it on my server and see how it goes.

The first time you run the program without any configuration, it runs you through allowing you to specify settings and creates a dummy channels.txt file for you to add your customer enigma2 service ID's.

screenshot.1.jpg
screenshot.2.jpg
screenshot.3.jpg
 
Well, i have been running the program 24/7 for a couple weeks. I am impressed with how stable it is. Its so stable, i added Arirang to my News Boutique List. In another words, the once incompatible channels are now intermixed with normal channels.

Someone here in the family (wont mention relation) is not technically savvy. Power on/off is the high bar. - I added a little feature to the program... But, ill get back to that in a moment.

Within the STB timer guide, I set up a daily timer that zaps/turns to the DW News channel every morning at 5am. So, I thought they could just power on and watch the morning news... Well, that is only if we turned off the system watching satellite input. But - what if we were watching a movie on the DVD player before we went to bed... In another words, in the morning, the channel would be correct, but you wouldn't see anything because the input would still be on DVD... Plan foiled...

So, back to the little feature, since the program monitors whether or not the AV receiver is pingable. (On/Off), I added an option of AutoInputOnPowerRestore. If the AV receiver is turned off for more than a minute, when you power it back on, the program will automatically change the INPUT to satellite.

So, person wakes up, turns on power button, and wallah the channel is on DW news, and the INPUT of the receiver is on Satellite and the volume is good. (AV receiver has a feature to return to the set default volume)

Tranquility in home restored....
 

Users Who Are Viewing This Thread (Total: 1, Members: 0, Guests: 1)

Who Read This Thread (Total Members: 7)

Latest posts

Top