Kodi Community Forum

Full Version: How to use fileinfo/streamdetails in NFO files · supported media flags in Estuary
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Started with thread Media flag for Ultra HD Blu-ray (4K Ultra HD) I tried to use the fileinfo tag in the NFO file.

Here is an example of my NFO file (e.g. "Red Sparrow (2018).BLURAY.nfo"):
xml:

<movie>
  <genre clear="true">Thriller</genre>
  <fileinfo>
    <streamdetails>
      <video>
        <codec>bluray</codec>
        <aspect>2.40</aspect>
        <width>1920</width>
        <height>1080</height>
      </video>
      <audio>
        <codec>dtshd_ma</codec>
        <language>eng</language>
        <channels>8</channels>
      </audio>
      <audio>
        <codec>dts</codec>
        <language>ger</language>
        <channels>6</channels>
      </audio>
      <subtitle>
        <language>eng</language>
      </subtitle>
      <subtitle>
        <language>ger</language>
      </subtitle>
    </streamdetails>
  </fileinfo>
  <actor clear="true">
    ...
  </actor>
</movie>
https://www.themoviedb.org/movie/401981-red-sparrow

Since there is no detailed description for the different sub-tags I had to guess or try to look at the source/ressources.
For the media flags I just use the filename of the corresponding .png files (but without the extension). This seems to work more or less fine.

For the given aspect ratio ("2.40") I don't see the corresponding flag icon. Since the icon exists in Estuary I think is should also be visible. What is wrong here?
With my NFO file I see the flag icons "7.1", "DTS-MA" and "1080 HD". This is more or less okay. I just wonder about the missing aspect ratio.

For languages I have several questions. On discs you have typically more languages and I'm interested in German end English. Often you have better English audio (e.g. "Dolby Atmos") than German (e.g. only "5.1") signals on the disc.
In my example it is DTS-HD MA 7.1 vs. DTS 5.1.
The sample nfo shows multiple audio tags.
Q1: What code do I have to use? "eng" should be okay and "ger" for German?
Q2: It seems that only the flag-icons for one audio signals are displayed. How does this work? Only the best? Or only the first or the last? Or somehow based on language settings in Kodi?
Q3: Are different subtitles supported? How do I have to write it in the NFO file? Am I right that Estuary does not support the display of subtitle info?

Since we often have better English audio (original audio) on discs it would be fine for me to have the info for both, English (original) and German (synced). In this case it is also good to know if there are also the English subtitles on disc (and unfortunately this is not always the case).
Data from the NFO files seems to be good in the database:
Code:
sqlite> SELECT * FROM streamdetails WHERE idFile = 598;
idFile|iStreamType|strVideoCodec|fVideoAspect|iVideoWidth|iVideoHeight|strAudioCodec|iAudioChannels|strAudioLanguage|strSubtitleLanguage|iVideoDuration|strStereoMode|strVideoLanguage
598|0|bluray|2.4|1920|1080|||||0||
598|1|||||dtshd_ma|8|eng||||
598|1|||||dts|6|ger||||
598|2||||||||eng|||
598|2||||||||ger|||

With having fVideoAspect = 2.4 I wonder why the existing flag icon will not be shown. For me this looks to be a bug. Or is there a limit of icons shown?
Image
(2021-02-01, 02:59)NeroRome Wrote: [ -> ]Data from the NFO files seems to be good in the database:
I don't think it is. Your snippet shows 1920 x 1080 which is an Aspect Ratio of 1.777778

The Aspect Ratio and Resolution need to match. I am not sure of how the logic works, but changing either Aspect Ratio or Resolution on their own does not work if they are mismatched. Both need to calculate to the same.

Image

My nfo file entry...
xml:
<video>
<codec>h264</codec>
<aspect>2.4</aspect>
<width>1920</width>
<height>800</height>
<durationinseconds>6697</durationinseconds>
<stereomode></stereomode>
</video>
<audio>
<codec>truehd</codec>
<language>eng</language>
<channels>8</channels>
</audio>
ad Q1: looking at the ISO 639 codes and LangCodeExpander.h I think "deu" is the better option to use (but "ger" should also work).
(2021-01-27, 19:17)NeroRome Wrote: [ -> ]Q1: What code do I have to use? "eng" should be okay and "ger" for German?
What file format are you using? mkv?

(2021-01-27, 19:17)NeroRome Wrote: [ -> ]Q2: It seems that only the flag-icons for one audio signals are displayed. How does this work? Only the best? Or only the first or the last? Or somehow based on language settings in Kodi?
IIRC it is the first, which is also normally the best. Other skins display more icons.

(2021-01-27, 19:17)NeroRome Wrote: [ -> ]Q3: Are different subtitles supported? How do I have to write it in the NFO file? Am I right that Estuary does not support the display of subtitle info?
What do you mean different? Different language or different formats?

Like this...
xml:
<streamdetails>
<video>
<codec>h264</codec>
<aspect>1.777778</aspect>
<width>1920</width>
<height>1080</height>
<durationinseconds>10629</durationinseconds>
<stereomode></stereomode>
</video>
<audio>
<codec>truehd</codec>
<language>eng</language>
<channels>6</channels>
</audio>
<audio>
<codec>ac3</codec>
<language></language>
<channels>6</channels>
</audio>
<subtitle>
<language>eng</language>
</subtitle>
<subtitle>
<language>eng</language>
</subtitle>
<subtitle>
<language>eng</language>
</subtitle>
<subtitle>
<language>eng</language>
</subtitle>
</streamdetails>
</fileinfo>

I have never seen subtitle flags in Estuary. Other skins display them, though.
(2021-02-01, 04:21)Karellen Wrote: [ -> ]What file format are you using? mkv?
The issue is just for stub-files (e.g. "Red Sparrow (2018).BLURAY.disc", plus NFO file), i.e. physical discs. Currently I'm not taking care of video-container files.
 
(2021-02-01, 04:21)Karellen Wrote: [ -> ]IIRC it is the first, which is also normally the best. Other skins display more icons.
I don't think so. It looks the "best" is displayed always.
I tried some different ways. Also with having German first (and also switched the regional setting to German) "7.1" + "DTS-MA", i.e. data for the English signal, are displayed.
Code:
sqlite> SELECT * FROM streamdetails WHERE idFile = 598;
idFile|iStreamType|strVideoCodec|fVideoAspect|iVideoWidth|iVideoHeight|strAudioCodec|iAudioChannels|strAudioLanguage|strSubtitleLanguage|iVideoDuration|strStereoMode|strVideoLanguage
598|0|bluray|2.4|1920|1080|||||0||
598|1|||||dts|6|deu||||
598|1|||||dtshd_ma|8|eng||||
598|2||||||||deu|||
598|2||||||||eng|||

I'm mostly interested on German audio signals but it would be fine to have also info for the English audio signal, since typically both are on discs.
 
(2021-02-01, 04:21)Karellen Wrote: [ -> ]What do you mean different? Different language or different formats?
Since my use case is just for physical discs (Blu-ray, DVD) it would be nice to see details of the audio codecs and subtitles of the discs in my Kodi library.
The audio codec is good to know, especially if there is a better one for one language (e.g. often Atoms in English and only a 5.1 in German).
The existing subtitles is good to know since it's sometimes helpful to have them in the language of the audio signals.
As native German speaker I'm also interested in English (original) audio signals sometimes. In this case English subtitles are sometimes very helpful to me (for the case I don't understand every word by audio but I know it, if it is written on the subtitle). I don't like e.g. English audio with German subtitles.
Matching audio and subtitles on disc is not always the case, especially for older movies or in case of non-mainstream movies.
(2021-02-01, 03:53)Karellen Wrote: [ -> ]
(2021-02-01, 02:59)NeroRome Wrote: [ -> ]Data from the NFO files seems to be good in the database:
I don't think it is. Your snippet shows 1920 x 1080 which is an Aspect Ratio of 1.777778

The Aspect Ratio and Resolution need to match. I am not sure of how the logic works, but changing either Aspect Ratio or Resolution on their own does not work if they are mismatched. Both need to calculate to the same.

...
Well, it's hard to say for physical discs.
Typically you only have the ratio, in my case "16:9 (2.40:1 Letterbox)" and something like "FULL-HD 1080p" on the keep case.
I'm not sure if the video stream is encoded as 1920 x 1080 (= Full-HD), including black stripes, or in 1920 x Huh.
I just tried to use the info I have on the keep case.

BTW: Only setting "width" or "height" (only one of them), or without both, will cause of not having the "1080 HD" icon shown. It would be fine to have it, especially if I don't see a Blu-ray icon and for me it's good to know if it is a Blu-ray or a DVD.

Also 2.4 with 1920 x 800 does not change anything for me. I just have the "1080 HD" icon but no aspect ratio icon.
xml:
<video>
<aspect>2.4</aspect>
<width>1920</width>
<height>800</height>
</video>

Code:
sqlite> SELECT * FROM streamdetails WHERE idFile = 598;
idFile|iStreamType|strVideoCodec|fVideoAspect|iVideoWidth|iVideoHeight|strAudioCodec|iAudioChannels|strAudioLanguage|strSubtitleLanguage|iVideoDuration|strStereoMode|strVideoLanguage
598|0||2.4|1920|800|||||0||
598|1|||||dts|6|deu||||
598|1|||||dtshd_ma|8|eng||||
598|2||||||||deu|||
598|2||||||||eng|||
(2021-02-01, 03:53)Karellen Wrote: [ -> ]My nfo file entry...

I also tried to copy your NFO data (don't care if it is correct for my movie):
Code:
sqlite> SELECT * FROM streamdetails WHERE idFile = 598;
idFile|iStreamType|strVideoCodec|fVideoAspect|iVideoWidth|iVideoHeight|strAudioCodec|iAudioChannels|strAudioLanguage|strSubtitleLanguage|iVideoDuration|strStereoMode|strVideoLanguage
598|0|h264|2.4|1920|800|||||6697||
598|1|||||truehd|8|eng||||
I don't have the codec icon and also not the aspect ratio icon (but I have your time, "7.1", "DOLBY-HD" and "1080 HD", in this order!).

It looks this is not working the same way for stub files.
I don't know where you are going wrong. So provide the full nfo file, and also a Debug Log which captures you scanning the movie.
What I expect is: show aspect ratio icon (the nearest matching one) if it is set in the database (streamdetails.fVideoAspect), without considering the resolution.

Also the/a Full-HD icon should IMHO be shown if iVideoWidth is 1920 or iVideoHeight is 1080 in the database (streamdetails), i.e. also if only one is set to a FullHD value (because Height might be lower than 1080 for scope ratios).


There is another aspect I wonder: If I deactivate "Show media flags" in "Skin settings" the icons are still shown (also after restart of Kodi). I would expect to have no icons with this setting disabled, i.e. only the duration should be displayed.

The support of media source icons is another aspect I expect but this is not implemented in Estuary yet.