XMLTV, Kazer & U.S. categories

Added by log jam 9 days ago

Greetings all,

I am in the US, using over the air broadcast with roof antenna.
I have the following setup:

Server: Synology 216J
Tuners: 2x HDHomerun Connect receivers
Client: Raspberry Pi 3

I am using Zap for guide data which is working perfectly. Since I am a n00b with Linux, I was still able to slog through everything and get XMLTV guide data. The problem is, I would like a color EPG, not the grey one that’s currently displayed.

I’ve looked at many threads related to this, and to me it looks like the XMLTV, Kazer & French categories thread is closest to what I’m trying to achieve. The problem is, I’m just not experienced enough with Perl or Linux to be able to figure out what I need to change in order to adopt this to the US (ATSC). From the looks of it, it’s customized for French or European listings.

Does anyone have any experience getting this (color epg) to work in the US? From what I can gather, a script runs to post-process an XMLTV file, and generates a new file with the categories processed so that TVH can understand them.

I find it interesting that anything categorized as “Sports” does show up in the EPG with a blue color. Now, I would love to have all the other categories in color as well.

Thanks to one and all!


Replies (13)

RE: XMLTV, Kazer & U.S. categories - Added by Robert Cameron 9 days ago

The color/grey emoji issue is most likely related to the emoji font installed on your system. Changing browsers or installing a different font with emoji characters might change what is displayed. However, the color vs. grey emoji has nothing really to do with Tvheadend.

RE: XMLTV, Kazer & U.S. categories - Added by saen acro 9 days ago

Robert Cameron wrote:

The color/grey emoji issue is most likely related to the emoji font installed on your system. Changing browsers or installing a different font with emoji characters might change what is displayed. However, the color vs. grey emoji has nothing really to do with Tvheadend.

update to latest source code and you will see emoji
http://tvheadend.org/projects/tvheadend/repository/revisions/85c6c08c99b63c4e9aee59ff9fb040d3eb3456e6

RE: XMLTV, Kazer & U.S. categories - Added by log jam 9 days ago

Please forgive my ignorance, but I was referring to color vs. grey on my Kodi front end EPG.

Will doing what you said regarding the emoji font, make the front end (Kodi running TVH client) show correct colors in the EPG?

Also, I am running build 4.2.4, and do not see a "Content Type" column as pictured in

http://tvheadend.org/attachments/download/5985/Screenshot%20from%202017-11-25%2021-41-53.png

RE: XMLTV, Kazer & U.S. categories - Added by Robert Cameron 9 days ago

The emoji for content types was introduced in recent development builds (4.3).

In Kodi, colors for genres in the EPG is handled by your skin, not Tvheadend.

RE: XMLTV, Kazer & U.S. categories - Added by log jam 9 days ago

Is the emoji solution the only one that will work for me? In reading through the Kazer thread, I don't believe emojis were even mentioned. Can't this/these Kazer script(s) be adopted to work in the US?

RE: XMLTV, Kazer & U.S. categories - Added by Em Smith 8 days ago

I don't have an example for Zap data, but what happens with grabbers is that the xmltv file has programmes and each programme has one-or-more categories such as "sport", "baseball", "crime drama", "anime", etc.

For example, "Castle" is "Comedy, Crime drama, Episode, Series, Show, series". X-Men is "Action, Adventure, Fantasy, Feature Film, Movie, Science fiction, movie". The categories used by your grabber may be different.

These categories are then mapped on to genre names by Tvheadend. The genres are in a standard, but are much more restrictive than categories. They don't even differentiate between episodes and movies, or 99% of sports.

Where the match happens, such as your xmltv having a category of "sports" which matches a genre of "sports", then all is well and Kodi can then display a color.

But where no match occurs, such as "anime" then we can't assign a genre so Kodi doesn't assign a color.

Recent nightly builds of Kodi will pass through categories unaltered so the skin could (but currently doesn't) parse and display colors or emoji or whatever they wanted based on the expanded list of categories. So, it could display a different color for baseball than weight-lifting.

Some grabbers re-write categories to try and force them to match a genre.

The Kazer thread appears to be mapping French words to English words so that they match genres. So the French "Meteo(rological)" is mapped to the standard name of "News / Weather report".

The problem with such mappings is that they often fail or provide non-sensical genres. For example, my guide is telling me that opera is non-musical, because the programme has multiple categories and one happened to match non-music.

As to how to fix your issue, unfortunately it's a case of either mapping the words to the standard names in "EN 300 468", or asking the skin to map the category names to colors.

RE: XMLTV, Kazer & U.S. categories - Added by Robert Cameron 8 days ago

The content categories that are generally used are published as part of the DVB standard. The DVB standard is put out by the European Telecommunications Standards Institute (ETSI – etsi.org). The portion that deals with content categories is EN 300 468 (ETSI European Standard (EN) 300 468, current version 1.15.1 released March 2016): "Digital Video Broadcasting(DVB); Specification for Service Information (SI) in DVB systems" (http://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf).

From pages 47–48, here are the defined categories:

Movie/Drama:
  • Movie/Drama (general)
  • Detective/Thriller
  • Adventure/Western/War
  • Science fiction/Fantasy/Horror
  • Comedy
  • Soap/Melodrama/Folkloric
  • Romance
  • Serious/Clasical/Religious/Historical movie/drama
  • Adult movie/drama
News/Current affairs:
  • News/Current affairs (general)
  • News/Weather report
  • News magazine
  • Documentary
  • Discussion/Interview/Debate
Show/Game show:
  • Show/Game show (general)
  • Game show/Quiz/Contest
  • Variety show
  • Talk show
Sports:
  • Sports (general)
  • Special events (Olympic Games, World Cup, etc.)
  • Sports Magazines
  • Football/Soccer
  • Tennis/Squash
  • Team sports (excluding football)
  • Athletics
  • Motor sport
  • Water sport
  • Winter sports
  • Equestrian
  • Martial sports
Children's/Youth programmes:
  • Children's/Youth programmes (general)
  • Pre-school children's programmes
  • Entertainment programmes for 6–14
  • Entertainment programmes for 10–16
  • Informational/Educational/School programmes
  • Cartoons/Puppets
Music/Ballet/Dance:
  • Music/Ballet/Dance (general)
  • Rock/Pop
  • Serious music/Classical music
  • Folk/Traditional music
  • Jazz
  • Musical/Opera
  • Ballet
Arts/Culture (without music):
  • Arts/Culture (without music, general)
  • Performing arts
  • Fine arts
  • Religion
  • Popular culture/Traditional arts
  • Literature
  • Film/Cinema
  • Experimental film/video
  • Broadcasting/Press
  • New media
  • Arts/culture magazines
  • Fashion
Social/Political issues/Economics:
  • Social/Political issues/Economics (general)
  • Magazines/Reports/Documentary
  • Economics/Social advisory
  • Remarkable people
Education/Science/Factual topics:
  • Education/Science/Factual topics (general)
  • Nature/Animals/Environment
  • Technology/Natural sciences
  • Medicine/Physiology/Psychology
  • Foreign countries/Expeditions
  • Social/spiritual sciences
  • Further education
  • Languages
Leisure hobbies:
  • Leisure hobbies (general)
  • Tourism/Travel
  • Handicraft
  • Motoring
  • Fitness and health
  • Cooking
  • Advertisement/Shopping
  • Gardening

Personally, I'm not fully certain how Kodi decides which color overlay matches which genre. In the default skin of Estuary, these images are are stored in skin.estuary/media/windows/pvr/epg-genres/, however they have unhelpful filenames of 0.png, 16.png, 32.png, etc. One could almost believe that the number equates to the first bit of "content nibble" defined for the SI, but I don't believe that the colors displayed match the categories if you do that. (Also, there are more images in the Estuary resources than there are categories defined.)

In any case, perhaps this will give you some direction of what category names are acceptable/expected when parsing guide information. Although the US does not use the DVB standard, most software seems to be based upon DVB standards rather than the US/North America's ATSC/SCTE standards.

RE: XMLTV, Kazer & U.S. categories - Added by log jam 6 days ago

Thanks guys! That's a lot of info to digest.

The emoji route means I need to update to a newer version of TVH, OR, I need to try to understand and modify the Kazer scripts to work in the US.

So in your opinions, which method would be better suited for me to accomplish my goal? :)

RE: XMLTV, Kazer & U.S. categories - Added by edit4ever ! 6 days ago

It depends on what your end goal is. As was stated above, the current way tvheadend and kodi interface are to attempt to match the categories provided by your xmltv file to one of the EN 300 468 categories above. The default Estuary skin in Kodi is set to recognize the 10 top level categories as a different color - but if you're using US based guide data (like zap) to generate the xmltv file - most of the time the category will not match of the phrases above. My zap2epg addon has some code in it to do extending remapping of the US category names to match the basic list that tvheadend/Kodi will handle - but do the colors actual mean anything to you?

So again, the question is - what do you want the colors to mean? You can create a custom map by customizing your xmltv file and/or the colors Estuary assigns to those categories. But it's a lot of work. You can take a look at my code here: https://github.com/edit4ever/script.module.zap2epg

In the US, guide colors are usually simplified down to something like: News, Movies, Family, Children and just list the additional category information in the program description. If you describe what you'd like to see happen - I can try to point you in the right direction for adjusting your setup.

RE: XMLTV, Kazer & U.S. categories - Added by edit4ever ! about 20 hours ago

FYI - not sure if this is the intention - but in the web UI, the genre column is labeled "Content Type" and the new categories icons (emoji) column is also labeled "Content Type".

I would think we would want one of these changed??

RE: XMLTV, Kazer & U.S. categories - Added by Em Smith about 16 hours ago

Well spotted.

I was going to suggest the pre-existing column should be renamed to genre since it is taken from the genre field. But then we use the phrase content type in the filter and the autorec too. So perhaps we should rename the new icon column. Now we just need to think of a word since it can contain the category icon, but will fall-back to genre icon if there is no category mapping.

I don't particularly like "Content Icon" but that might be the best name if no-one suggests better.

RE: XMLTV, Kazer & U.S. categories - Added by log jam about 4 hours ago

I appreciate you guys keeping this thread alive! I will try to wrap my head around it some more once winter break from school is here.

RE: XMLTV, Kazer & U.S. categories - Added by edit4ever ! about 2 hours ago

I think Content Icons is probably most accurate - even if strange sounding. Is there a reason we only list the category (content) icons in the epg and don't give the option for a text version?

Also - did you see my note about sorting? https://tvheadend.org/issues/3753#note-29

(1-13/13)