Jump to content

How to get EPG on clients


Stef1971

Recommended Posts

Posted

Hi all,

 

I just switched from TV Mosaic to DVBViewer Pro with DMS. For streaming I use several iptv apps on both NVIDIA Shield and Apple TV 4K (I am still investigating which would be the best app for me).

 

The live streams are working like a charm, but I can't get the EPG to work on clients. If I enter http://username:password@10.0.1.40:8089/api/epg.html?lvl=2 on the server, Edge does open EPG information. However, when I enter this from another computer (MacBook), Safari tells me that the website is unavailable.

 

When I use the Kodi app (Shield), or MrMC app (Apple TV), I do get EPG info. So it doesn't look like a firewall issue.

 

Any tips how I can get EPG info into client IPTV apps?

 

Thank you!

Posted
vor 16 Stunden schrieb Stef1971:

However, when I enter this from another computer (MacBook), Safari tells me that the website is unavailable.

 

AFAIK Safari doesn't support username:password as part of an URL for security reasons. I've tried on a Mac Mini

 

http://username:password@server-pc: 8089

 

but the browser responded with a dialog box prompting me for username and password. After entering the credentials the DMS desktop web interface appeared. So you can just leave username:password out.

 

The DMS desktop web interface (or the mobile web interface, same URL with /ios appended, also for Android) is the basic facility for viewing EPG data in browsers on other computers/devices. Can you open it in Safari?

 

/api/epg.html?lvl=2 is an API call that delivers EPG data in a proprietary XML format. Browsers like Firefox (under Windows) that are able  to render XML data display it quite happily. However, the output is not meant for humans. It is used and processed by add-ons / apps that are designed for cooperating with the DMS, like the DVBViewer Add-On for Kodi or the DVBViewer Controller App for Android.

 

I've also tried /api/epg.html in Safari. Obviously the browser started to load something, but without getting to a visible result... it got stuck somehow and had to be closed and re-opened for being usable again. Well, that's Apple... it's all pretty and fine, unless you do something that does not conform to the Apple ways ;)

 

vor 17 Stunden schrieb Stef1971:

The live streams are working like a charm (...) Any tips how I can get EPG info into client IPTV apps?

 

If you want to see the EPG within your IPTV apps (not in a browser), please first tell us what you have done/configured for letting them play the DMS TV streams: Export/import of a M3U channel list? If not, are they Sat>IP or UPnP/DLNA clients?

 

Posted
vor 33 Minuten schrieb Griga:

I've also tried /api/epg.html in Safari. Obviously the browser started to load something, but without getting to a visible result... it got stuck somehow

 

Well, now I know why... the total amount of EPG data delivered by the DMS was simply too much for poor Safari, thus letting it freeze. After restricting the output to a single channel Safari displayed the XML text content, but without any formatting - just a mess and completely unusable.

 

Posted

Hi Griga,

 

Thanks for your reply.

 

5 hours ago, Griga said:

The DMS desktop web interface (or the mobile web interface, same URL with /ios appended, also for Android) is the basic facility for viewing EPG data in browsers on other computers/devices. Can you open it in Safari?

 

/api/epg.html?lvl=2 is an API call that delivers EPG data in a proprietary XML format. Browsers like Firefox (under Windows) that are able  to render XML data display it quite happily. However, the output is not meant for humans. It is used and processed by add-ons / apps that are designed for cooperating with the DMS, like the DVBViewer Add-On for Kodi or the DVBViewer Controller App for Android.

 

The DMS works brilliant, I can open it with Safari, watch live TV, and have full EPG access. Just checked with Firefox on the MacBook, and works fine indeed. I know the EPG data is not ment to be opened with a browser. I just wanted to be sure that the Windows firewall did not interfere (I am not very familiar with Windows :) ).

 

5 hours ago, Griga said:

I've also tried /api/epg.html in Safari. Obviously the browser started to load something, but without getting to a visible result... it got stuck somehow and had to be closed and re-opened for being usable again. Well, that's Apple... it's all pretty and fine, unless you do something that does not conform to the Apple ways ;)

 

I completely agree. Never start thinking 'out of the box' with Apple ?

 

5 hours ago, Griga said:

If you want to see the EPG within your IPTV apps (not in a browser), please first tell us what you have done/configured for letting them play the DMS TV streams: Export/import of a M3U channel list? If not, are they Sat>IP or UPnP/DLNA clients?

 

I haven't done not much yet, as I could not find detailed documentation about it.

 

What I did:

 

  • Installed DMS, fully up and running, EPG working and Live TV accessible. 
  • Installed IStreamTV on Apple TV.-> dropped channels.m3u on the IP and Live TV works. I entered http://username:password@10.0.1.40:8089/api/epg.html?lvl=2, and the app returns "no EPG data available".
  • Installed TV Org and IPTV player on Apple TV -> entered http://username:password@10.0.1.40/channels.m3u and Live TV works perfect. Both apps replies an error on EPG url as above.
  • Installed MrMC on Apple TV -> works out of the box without the need of entering EPG url. Unfortunately the app is not stable.
  • On Philips Android TV and NVIDIA Shield Pro, only Kodi works out of the box with EPG, I tried several other apps, and also returned that no EPG info can be found.

I havent exported EPG data on DMS, as I am not sure how to access this remotely.

 

Server setup:

Win 10 on Intel Xeon, 8 gb.

2x Digital Devices Cine S2 

Octopus CI with Canal Digitaal (NL) smartcard.

 

Thanks!

 

 

 

Posted

As already said, api/epg.html?lvl=2 is only suitable for add-ons/apps that are specially written for the DMS. They already know the URL, so you don't have to enter it.

 

As an example, let's have a look at how the Simple IPTV Client for Kodi (which is not specially designed for the DMS) must be configured for receiving live streams and EPG from the DMS. Basically this PVR add-on requires two URLs, one for getting the M3U channel list and one for getting the EPG in XMLTV format.

 

The M3U URL (for a Kodi instance on the server PC) looks like this:

 

http://127.0.0.1:8089/channels.m3u?tags=122

 

The tags parameter is important. It lets the DMS include additional information in the M3U. The value 122 is the sum of

  • 2 = category as group-title tag (only when the category changes).
  • 8 = channel logo URL as tvg-logo tag.
  • 16 = EPG channel ID as tvg-id tag (for XMLTV data).
  • 32 = channel name as tvg-name tag.
  • 64 = channel number as tvg-chno tag.

If no channel logos are installed in DVBViewer/DMS and you don't want the client to inherit the DVBViewer channel numbers, you can leave out 8 and 64, yielding tags=50. Without EPG channel ID (16) the client will not be able to assign EPG data to the channel. For more details please open this document and let the search function of your browser (Ctrl+F) find "tags" (without double quotes).

 

Please note that by default the channel selection for the M3U file is specified by the Web Interface -> Configuration -> Show in channel list settings. They can be overridden by appending filter parameters to the URL, e.g. &favonly=1 (only favourite channels, as configured in the DVBViewer Channel Editor) or &tvonly=1 if no radio channels shall be included. Of course you can also download the M3U in a browser, if the client is not able to fetch it itself.

 

The EPG URL corresponding to the M3U looks like this

 

http://127.0.0.1:8089/api/epg.html?xmltv=1&xgrab=

 

The important parameter is xmltv=1. It lets the DMS export the EPG data in XMLTV format, which is supported by several IPTV clients. The empty xgrab= parameter indicates that the channel selection is not defined by a grab file, but by filter options. By default the EPG for all channels is included. Here you can again append parameters like &favonly=1 or &tvonly=1.

 

Please note that such EPG URLs don't work "stand alone". They must be combined with M3U import. Either a client gets a M3U file plus XMLTV EPG data, or it directly reads EPG data that is embedded in the received TV stream (which means, it "understands" the original DVB EPG data and knows how to handle it). A relevant option for the latter method is DMS Options (svcoptions.exe) -> Web/UPnP -> Live Stream Server -> Additional Streams -> EPG.

 

I hope this information makes ends meet...

 

Posted

Hi Griga,

 

Thanks for your detailed explanation of the M3U and EPG parameters. I have changed the extension to '/api/epg.html?xmltv=1&xgrab=' and it works perfectly fine now on all clients :) 

 

I will experiment later on today with other parameters to compress the huge amount of data.

 

I am happy, thank you ??

  • 4 years later...
Posted
On 4/23/2021 at 9:10 AM, Griga said:

The M3U URL (for a Kodi instance on the server PC) looks like this:

 

http://127.0.0.1:8089/channels.m3u?tags=122

 

The tags parameter is important. It lets the DMS include additional information in the M3U. The value 122 is the sum of

  • 2 = category as group-title tag (only when the category changes).
  • 8 = channel logo URL as tvg-logo tag.
  • 16 = EPG channel ID as tvg-id tag (for XMLTV data).
  • 32 = channel name as tvg-name tag.
  • 64 = channel number as tvg-chno tag.

 

With the newer DVBViewer Pro releases which include custom channel numbers, DMS doesn't include the correct channel number as tvg-chno tag when exporting the M3U with tags 64. Can this be fixed? Thank you!

Posted

And is there a way to let DMS export the SAT>IP spec M3U with tvg-chno tag as well?

Posted
vor 9 Stunden schrieb Retrofan:

And is there a way to let DMS export the SAT>IP spec M3U with tvg-chno tag as well?

 

The tags parameter can also be used for RTSP, e.g. http://127.0.0.1:8089/rtspchannels.m3u?tags=122

 

Additionally there is a "Live stream M3U configuration" tweak (-> launch DMSTweaker.bat) that applies to all live stream M3U exports. It is overridden by the tags parameter, if present.

 

vor 10 Stunden schrieb Retrofan:

DMS doesn't include the correct channel number as tvg-chno tag when exporting the M3U with tags 64. Can this be fixed?

 

In the next release I can introduce another value 128 = LCN channel number as tvg-chno tag. However, if there is no LCN for a channel, the  tvg-chno tag will be omitted.

 

Posted
22 hours ago, Griga said:

In the next release I can introduce another value 128 = LCN channel number as tvg-chno tag. However, if there is no LCN for a channel, the  tvg-chno tag will be omitted.

 

O, yes, please, that's great, thanks!

Posted
22 hours ago, Griga said:

The tags parameter can also be used for RTSP, e.g. http://127.0.0.1:8089/rtspchannels.m3u?tags=122

 

Thanks, but is DMS capable exporting native SAT>IP M3U with added tvg-chno parameter? (the URL of the SAT>IP M3U contains mtype, msys and pids).

Posted

DMSTweaker -> Use Sat>IP URL syntax for RTSP channel list

Posted (edited)
On 4/30/2025 at 6:28 PM, Griga said:

DMSTweaker -> Use Sat>IP URL syntax for RTSP channel list


Thanks, that looks better! However, the tnr (transponder?) parameter isn't part of the SAT>IP spec AFAIK. What does it exactly?

Edited by Retrofan
Posted
vor 2 Stunden schrieb Retrofan:

However, the tnr (transponder?) parameter isn't part of the SAT>IP spec AFAIK. What does it exactly?

 

In the standard Sat>IP parameters there is important information missing, which comprises annoying restrictions compared to the full Media Server capabilities. It prevents decryption of channels, for example. That's why the DMS provides ways to include additional data in the URL.

 

The first method is to use the Channel ID instead of the Sat>IP query syntax in RTSP URLs. This allows the DMS to identify the channel in its channel list and use its own set of tuner data. RTSP clients without profound DVB and Sat>IP knowledge like VLC usually don't mind about Sat>IP parameters. They just take the URL "as it is" without understanding what it means and send it to the server for getting the video/audio stream in return. The important thing is that the server knows how to deal with it. However, you can't use such  URLs for also getting data from another Sat>IP server like tvheadend that doesn't know this kind of channel IDs.

 

That's why the DMS provides an alternative method which is compatible with other Sat>IP servers. The appended tnr (tuner) parameter contains an almost complete set of the DVBViewer Media Server's own tuner data for a channel, as displayed by the DVBViewer Channel Editor and used by DVBViewer/DMS for channel handling. In particular it contains the Service ID and PMT PID (required for decryption), Network and TransportStream ID (required for assigning EPG data to a channel), DiSEqC (required for DiSEqC > 1.0), channel group (required for selecting specific tuners), the satellite orbital position etc.

 

This allows the DVBViewer Media Server to do things that can't be done with pure Sat>IP. Adding custom parameters is covered by the Sat>IP query syntax specifications: "Unknown attributes shall be ignored by the server." So tvheadend and other Sat>IP servers should not care about it.

 

Posted

O cool, thanks, that sounds great!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...