XMLTV limited output/conversion

Added by saen acro 5 days ago

At home I use SSIPTV on my SmartTV but there is a problem with EPG
EPG is huge and with unused contents


<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE tv SYSTEM "xmltv.dtd">
<tv generator-info-name="TVHeadend-4.3-1783~gec90d31" source-info-name="tvh-TVServer">
<channel id="7bcc00006a1daf203ac172a27b33014d">
  <icon src="http://tv.local:8000/l/RTL.png"/>
<programme start="20190408170000 +0300" stop="20190408180000 +0300" channel="7bcc00006a1daf203ac172a27b33014d">
  <title lang="bul">Meine Geschichte-Mein Leben</title>
  <desc lang="bul">Dokusoap, D 2018.</desc>
<programme start="20190408180000 +0300" stop="20190408183000 +0300" channel="7bcc00006a1daf203ac172a27b33014d">
  <title lang="bul">Freundinnen-Jetzt erst recht</title>
  <desc lang="bul">Dailysoap, D 2019 (Staffel: 1, Folge: 155).</desc>
<programme start="20190408183000 +0300" stop="20190408190000 +0300" channel="7bcc00006a1daf203ac172a27b33014d">
  <title lang="bul">Unter uns</title>
  <desc lang="bul">Dailysoap, D 2018.</desc>

idea is to be converted to shorter format,
just to include TITLE only, without desc, sub-title, category etc.


<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE tv SYSTEM "xmltv.dtd">
<programme start="20190408170000 +0300" stop="20190408180000 +0300" channel="RTL">
  <title lang="bul">Meine Geschichte-Mein Leben</title>
<programme start="20190408180000 +0300" stop="20190408183000 +0300" channel="RTL">
  <title lang="bul">Freundinnen-Jetzt erst recht</title>
<programme start="20190408183000 +0300" stop="20190408190000 +0300" channel="RTL">
  <title lang="bul">Unter uns</title>

Is anyone have idea how can be done that?

Replies (4)

RE: XMLTV limited output/conversion - Added by Em Smith 5 days ago

It seems your EPG needs to be <5MB and can't be compressed.

It looks easy enough to update the code to add a "&format=short" to the request processor to skip desc, etc., but would it be useful without episode numbering and description?

I'd probably want to keep channel tags since presumably your tv uses that to match with the playlist and display channel logos.

However, would that make your epg fit the tv limits? Trying it with my OTA, I'd still be around 6MB. (By doing grep -e programme -e '<title' -e display -e icon on my existing xml file as a rough test).

You can add a limit in Tvheadend for how many days epg it keeps in channel->channels, select all, edit, limit epg (days). Perhaps that might help? I don't know if it immediately reduces the EPG days or if it just applies to new updates.

The SSIPTV suggests it can get its own EPG and avoid using the Tvheadend EPG, ?

It might be easiest to set up some web server, run a crontab to grab the xml from Tvheadend, run the grep above and send the output to a file on the web server. Then you set your tv to get the xml from the web server instead of from Tvheadend.

So something like:

#! /bin/sh
OUTPUT=/var/www/.../channels.xml # or wherever webserver stores files
curl http://tv.local:9981/xmltv/channels' | egrep '<?xml|<!DOC|</?tv|</?channel|</?display|</?programme|</?title|</?desc' > $OUTPUT.tmp && mv $OUTPUT.tmp $OUTPUT > /dev/null 2>&1

RE: XMLTV limited output/conversion - Added by saen acro 4 days ago

SSIPTV show only TITLE rest of attributes is not used

also how can be removed this translation of name inside channel and this section also
in example

7bcc00006a1daf203ac172a27b33014d >>> RTL

even and on other software's importing TVH epg not show "human readable" name just HASH value

-rw-r--r-- 1 root   root   5803447 Apr 15 09:15 channels.xml <<< with removed lines
-rw-r--r-- 1 root   root   5771768 Apr 15 09:22 channels1.xml <<< as previous without channels section
-rwxr-xr-x 1 root   root       277 Apr 15 09:15*
-rw-r--r-- 1 root   root   8044208 Apr 15 09:17 xmltv.xml  <<< original size 
-rw-r--r-- 1 root   root   8000065 Apr 15 09:26 xmltvshort.xml  <<< when used &format=short /wged used/

when add &format=short to bash script result is empty file ??

#! /bin/sh
OUTPUT=/abyssws/htdocs/channels.xml # where web server stores files
curl 'http://localhost:9981/xmltv/channels&format=short' | egrep '<?xml|<!DOC|</?tv|</?channel|</?display|</?programme|</?title|</?desc' > $OUTPUT.tmp && mv $OUTPUT.tmp $OUTPUT > /dev/null 2>&1

SSIPTV offered EPG service do not support my preferred language

What should be 24 or 72h call?

RE: XMLTV limited output/conversion - Added by Em Smith 4 days ago

The "&format=short" doesn't exist yet in the code. I meant we can add it to the server if it is of benefit. (In xmltv.c line 159 we'd effectively add "goto done;" before the "if" statement, and add "done:" before line 212 which writes the "</programme>", you can add those two lines yourself if you want to force xmltv to not have those fields since I won't have time to do the proper fix this week).

The SSIPTV is a bit confusing, because this topic says it does not use "tvg-id" to link a playlist to the xmltv.

So I think it is saying it ignores tvg-id from the .m3u file, reads the channel name "Boomerang", and uses that for the "programme" tags in the xmltv file. But, the programme tags in the xmltv file are tvg-id tags not channel name tags.

#EXTINF:-1 tvg-id="a14232...",CNN
<programme start="20190414144500 +0100" stop="20190414165500 +0100" channel="a14232...">

So, I don't understand how it links the two together.

SSIPTV should use the display-name from the channels section to convert the hash to the human readable format, since that is how most of the xmltv files are that I have seen.

Examples I've seen are:

  <programme start="20120901081500 -0600" stop="20120901093000 -0600" channel="">

 <programme start="20181212022500 +0100" stop="20181212024500 +0100" channel="">

  <channel id="">
    <display-name>RTL Plus</display-name>

The reason it is a hash is because it is unique, whereas the forum suggests you can have two channels from different sources with the same name but different contents like "Discovery" being "Discovery (Europe)" or "Discovery (America)" received in the same house. (And I have about ten channels all called "ITV", but are all have different region shows).

Have you tried manually changing the file to see if it would process the name correctly? So if "abcdef1234567890" is your Boomerang channel, add a "| sed 's/abcdef1234567890/Boomerang/g'" to your processing line after the grep.

curl 'http://localhost:9981/xmltv/channels' | egrep '<?xml|<!DOC|</?tv|</?channel|</?display|</?programme|</?title|</?desc' | sed 's/abcdef1234567890/Boomerang/g' > $OUTPUT.tmp && mv $OUTPUT.tmp $OUTPUT > /dev/null 2>&1

RE: XMLTV limited output/conversion - Added by saen acro 4 days ago

Most of other software's use human readable names aka not use hashed name translation.
Xtreamcodes for example import epg correctly but then matching hashed name manually needed
same with Stalker Portal/Ministra
most of them accept Epg generated by without problem /with correct chanidents or by channel SiD/