kodi-pvr / pvr.vuplus

Kodi's Enigma2 client add-on
GNU General Public License v2.0
57 stars 55 forks source link

[Feature Request] Use EIT file as information source for DVB-S recordings #321

Closed ovz93br43v7 closed 3 years ago

ovz93br43v7 commented 3 years ago

See for reference: https://github.com/xbmc/xbmc/issues/19120

This is just a feature request, due to the fact that my DVB-S recordings are not named correctly like "S0xEyy" Kodi don't recognized the episodes. On my enigma2 receiver the app "EMC" is able to display the content of the "EIT" file (full name is "event information table"), so I hadn't to name the files in a specific way. More information about "EIT" can be found here --> https://de.wikipedia.org/wiki/Event_Information_Table or here (source of wikipedia article): https://portal.etsi.org/webapp/workprogram/Report_WorkItem.asp?WKI_ID=42952 Somebody has already extracted the script from the EMC to this script--> https://pypi.org/project/eitparser/ Here you can see an example how that is displayed in EMC, "EIT" information are displayed on the left side: https://www.dreambox-blog.com/wp-content/uploads/2011/11/EMCSelection-HD.jpg

So my feature request is that the content of the "EIT" file should be use as additional information source when the DVB-S recordings are not correctly named. The user defines what content [movies, tv shows, music...] is in the folder and whether the files are all in one folder or in separate folders with matching names. So here would be one point were the user could select: "no the files are not named please use the EIT data which is inside the folders".

Or other way: In my case Kodi has found a folder with TV shows: TV shows --> folder: name of the TV show e.g. "Star Trek" --> file names: "DVB-S recording named date-TV channel-title e.g. "Star Trek"" For every ts-file there is also a EIT data file with the same file name. In my case Kodi has detected the TV show but not the episodes because the files are not named in the correct way. When the "decision tree" comes to that point (and don't find anything about the file because it is not correctly named like SxxEyy) Kodi could look automatically whether there is a EIT data file with the same name and could use that info instead.

My receiver creates 6 files per recording. (.eit; .ts; .ts.ap; .ts.cuts; .ts.meta; .ts.sc) All named in the same way: e.g. 20160216 2210 - zdf_neo HD - Orphan Black date time - TV channel - name of movie or tv show Sample EIT data file can be found here: https://drive.google.com/file/d/1nGHKNhv3eQJXGSvbUI5iSXb6JTnT1Na2/view?usp=sharing Github has rejected every upload (.eit, .txt, .zip, .gz....)

phunkyfish commented 3 years ago

1) do you have the pvr.vuplus add-on installed?

2) do you see the correct season and episode names under TV->Recordungs?

ovz93br43v7 commented 3 years ago
  1. Yes now I have the addon.
  2. I see the recording on my receiver --> top folder: Name of TV show --> sometimes an additional sub folder --> episode name and description (seems to be the same descriptions which EMC shows)

The additional sub-folder seems to be an issue because of the name of the TV show: "Mystery Road - Verschwunden im Outback - Staffel 1 (1/6)" causes a top folder: "Mystery Road - Verschwunden im Outback - Staffel 1 (1" and an additional sub-folder "6)" because of the "/" in the name.

My problem is that I copied many recordings to my NAS and added this as resource to kodi and as stated above the names of the recordings are not "ok" for kodi. So I thought this EIT info could be useful in such a case.

phunkyfish commented 3 years ago

Can you post some screenshots?

If you share the folder from your STB instead of the NAS what happens?

Also, please note that if you copy the files from your STB to a NAS you can’t really expect kodi to read the eit files. These are an Enigma2 specific idiom and not a common standardised way of supplying this information. So we would need to figure this out via the PVR add-on somehow.

If we are successful in getting this working using the STB there is no reason you can’t set your STB to record to NAS and then it should work there too.

Lastly, what platform are you running kodi on? I remember seeing something about embedded / characters in folder names recently so maybe that is fixed in kod 19. Please include this in the screenshots from the top level to the bottom level.

ksooo commented 3 years ago

If I understand the request right, @ovz93br43v7 wants to extend Kodi library functionality with support for EIT files, just like we already have with NFO files.

ksooo commented 3 years ago

Kodi reads meta data from the EIT file, which is stored along with the video file, with the same name, and puts the data into video db.

ksooo commented 3 years ago

The addon would create and store the eit file, kodi core needs to be extended to handle eit files. Alternative would be the addon writes an NFO file which it creates from an EIT file.

ovz93br43v7 commented 3 years ago

@phunkyfish I use a FireTV 4k. I have to figure out how I can make screenshots on a FireTV. But from what exactly screenshots? The shown EIT data description which is shown? Or from the folder / sub-folder issue?

You are right when I use a shared folder from the STB in Kodi then the description is shown like in EMC. Is then the description provided from the STB?!? Or does Kodi read the EIT file?

@ksooo You are right I thought the EIT data could help to get descriptions during library scanning when the files are not correctly named. Sorry my explanation is probably a bit confusing

phunkyfish commented 3 years ago

@ksooo

Are eit files a thing? EIT data is usually embedded in a stream and not stored in local files. For Enigma2 each recording has meta data returned when we get a recordings list so we never have to read the EIT data. That is what the backend is for.

I stand corrected if EIT files are used outside of Enigma2. I’ve just never seen them.

phunkyfish commented 3 years ago

@ovz93br43v7 when the PVR add-on reads the recordings it reads the meta data via OpenWebIf. This is essentially the EIT data, but it is read by the STB and sent in XML format.

Because the path to the recordings is the same whether it’s a video file or a PVR recording Kodi is able to use this meta data as it detects its the same file.

ksooo commented 3 years ago

Are eit files a thing?

No idea, tbh. Heard of that first in this PR.

ovz93br43v7 commented 3 years ago

Mhm okay, my STB (VU+ Solo2 with VTI Image) creates for every recording these six files: .eit; .ts; .ts.ap; .ts.cuts; .ts.meta; .ts.sc All files with the same name. And because I saw in the EMC github repo somebody who has extracted the "read EIT part" to this project: https://pypi.org/project/eitparser/ I thought this is probably very easy for somebody of the Kodi team to add this *.eit files as information source.

But as stated above I'm not an expert / programmer, so this was just an idea how to recycle already existing information from the EIT file.

phunkyfish commented 3 years ago

Are eit files a thing?

No idea, tbh. Heard of that first in this PR.

I think potentially adding to the ffmpeg demuxer an EIT parser for the data embedded in a stream is possible and may even make sense. But as PVR backends parse this data already it may not be worthwhile.

phunkyfish commented 3 years ago

Mhm okay, my STB (VU+ Solo2 with VTI Image) creates for every recording these six files: .eit; .ts; .ts.ap; .ts.cuts; .ts.meta; .ts.sc All files with the same name. And because I saw in the EMC github repo somebody who has extracted the "read EIT part" to this project: https://pypi.org/project/eitparser/ I thought this is probably very easy for somebody of the Kodi team to add this *.eit files as information source.

But as stated above I'm not an expert / programmer, so this was just an idea how to recycle already existing information from the EIT file.

PVR add-ons are written in C++ and the kodi core is the same. Sure we can port the code to C++ but it then begs the question whether or not we should support all embedded epg formats of which there are many. For users with multiple sources of TV channels/recordings it would probably mean some that have the data displayed and other that don’t. To me that’s the job of the backend to provide all that data in a consistent way.

If this problem should be solved it might be better to have a script running on your NAS that converts the eit file to .NFO format. That should require only minimal changes to the above script.

phunkyfish commented 3 years ago

@ovz93br43v7

it looks like someone already created something to convert EIT to nfo files. Do you want to try running it on your NAS and see does it work?

https://gist.github.com/marcohald/5a58698c71d36ae62a2ac897917eecac

ovz93br43v7 commented 3 years ago

I always thought every enigma2 STB saves this *.eit file. But good to know that there are differences between the STB's.

Awesome thanks for the link to this converter script. That's what I was looking for.

phunkyfish commented 3 years ago

The script works in Python 2 I will see can I convert it to Python 3 at some point.

phunkyfish commented 3 years ago

Here is a Python 3 version of the script: https://github.com/phunkyfish/enigma2-eit-kodi-nfo-generator

Note that the script will only add movie nfo files. This can easily be changed to TV. Just change the movie tags to tvshow tags in the readit function.

ovz93br43v7 commented 3 years ago

Awesome thank you!