SD content is listed as HD (720) content
#1
Some SD content is listed as HD content in my library (actual Kodi 21 nightly, but behaviour also present with previous versions).

What rules does Kodi use to determine whether content is HD or SD?
Can I set somewhere that only resolutions greater than or equal to 720p are listed as HD?
When it comes to naming, I'm already working with "hdtv" and "sdtv".

I've picked some examples from a TV-show in my library:
S03E03 - Show-name.hdtv.mkv -> Resolution is 1280x720 -> Is correctly listed as HD
S03E02 - Show-name.sdtv.mkv -> Resolution 1024x576 -> Is also listed as HD 720 in Kodi -> incorrect according to my understanding
S02E04 - Show-name.sdtv.avi -> Resolution 656x368 -> Is correctly listed as SD

Can I influence this somehow (e.g. via the as.xml)?
Reply
#2
(2024-01-16, 18:20)guenzelsen Wrote: S03E02 - Show-name.sdtv.mkv -> Resolution 1024x576
Can you post the MediaInfo output of this episode please?
Reply
#3
Please find the output from the mentioned file below.
Another observation: If a video is in 16:9 format with height 576, it's recognized as HD 720.
If a video is in 4:3 format with height 576 (width 720), it's recognized as SD (let me know, if you need a mediainfo from such file also).

Wilsberg:
Allgemein
Unique ID                                : 178864833953286939681559915365710468254 (0x86901D2D318B7931B723F70EA158949E)
Complete name                            : \\My-SERVER\Serien\Wilsberg\Season 03\S03E02 - Wilsberg.sdtv.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 1,40 GiB
Duration                                 : 1 h 28 min
Overall bit rate                         : 2 262 kb/s
Frame rate                               : 25,000 FPS
Encoded date                             : 2020-02-09 09:53:59 UTC
Writing application                      : mkvmerge v8.2.0 ('World of Adventure') 64bit
Writing library                          : libebml v1.3.1 + libmatroska v1.4.2

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Ja
Format settings, Reference frames        : 4 frames
Format settings, GOP                     : M=1, N=50
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 1 h 28 min
Bit rate mode                            : konstant
Bit rate                                 : 2 200 kb/s
Width                                    : 1 024 Pixel
Height                                   : 576 Pixel
Display aspect ratio                     : 16:9
Frame rate mode                          : konstant
Frame rate                               : 25,000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : progressiv
Bits/(Pixel*Frame)                       : 0.149
Stream size                              : 1,36 GiB (97%)
Language                                 : Deutsch
Default                                  : Ja
Forced                                   : Nein

Audio
ID                                       : 2
Format                                   : AAC LC SBR
Format/Info                              : Advanced Audio Codec Low Complexity with Spectral Band Replication
Commercial name                          : HE-AAC
Format settings                          : Implicit
Codec ID                                 : A_AAC-2
Duration                                 : 1 h 28 min
Bit rate                                 : 56,0 kb/s
Channel(s)                               : 2 Kanäle
Channel layout                           : L R
Sampling rate                            : 44,1 kHz
Frame rate                               : 21,533 FPS (2048 SPF)
Compression mode                         : Lossy
Stream size                              : 35,5 MiB (2%)
Language                                 : Deutsch
Default                                  : Ja
Forced                                   : Nein


Reply
#4
The 'rules' for determining the resolution are as follows
cpp:
if (iWidth == 0 || iHeight == 0)
    return "";

  else if (iWidth <= 720 && iHeight <= 480)
    return "480";
  // 720x576 (PAL) (768 when rescaled for square pixels)
  else if (iWidth <= 768 && iHeight <= 576)
    return "576";
  // 960x540 (sometimes 544 which is multiple of 16)
  else if (iWidth <= 960 && iHeight <= 544)
    return "540";
  // 1280x720
  else if (iWidth <= 1280 && iHeight <= 962)
    return "720";
  // 1920x1080
  else if (iWidth <= 1920 && iHeight <= 1440)
    return "1080";
  // 4K
  else if (iWidth <= 4096 && iHeight <= 3072)
    return "4K";
  // 8K
  else if (iWidth <= 8192 && iHeight <= 6144)
    return "8K";
  else
    return "";

As you can see, both width and height are taken into consideration. I'm not aware of anything in AS.xml to override that. hdtv and sdtv in filenames will only benefit you, unless you are using a skin that specifically looks for that information.
Learning Linux the hard way !!
Reply
#5
Thanks
I can now understand the logic behind.
However it still feels wrong that for example 4:3 DVD files are labled as SD, while 16:09 DVD files are labled HD 720.
Reply
#6
(2024-01-16, 21:33)guenzelsen Wrote: However it still feels wrong that for example 4:3 DVD files are labled as SD, while 16:09 DVD files are labled HD 720.

As said at Kodinerds as well, the presented mediainfo output is not the original video file which was downloaded from german mediatheks. The original file, which I now downloaded myself, has the resolution 720*576. That's what it is. The user modified the video and stretched it and therefor changed the resolution. Because of the logic mentioned before and the fact the current video is different from the orignal one, it's pretty clear that Kodi shows it as HD. Normal DVD files don't have a 1024*576 resolution. Those are bound to 720*576.

The mediainfo from the original file is: 

Code:

General
Complete name                            : Wilsberg-Filmriss_-_Wilsberg-1682101082.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (isom/mp42)
File size                                : 1.45 GiB
Duration                                 : 1 h 28 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 2 338 kb/s
Frame rate                               : 25.000 FPS
Encoded date                             : 2015-01-15 12:37:31 UTC
Tagged date                              : 2015-01-15 12:37:31 UTC
Copyright                                : © 2015 zdf_neo

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 1 h 28 min
Bit rate mode                            : Constant
Bit rate                                 : 2 200 kb/s
Maximum bit rate                         : 3 300 kb/s
Width                                    : 720 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : MBAFF
Scan type, store method                  : Interleaved fields
Scan order                               : Bottom Field First
Bits/(Pixel*Frame)                       : 0.212
Stream size                              : 1.36 GiB (94%)
Language                                 : German
Encoded date                             : 2015-01-15 12:37:31 UTC
Tagged date                              : 2015-01-15 12:38:23 UTC
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 1 h 28 min
Bit rate mode                            : Variable
Bit rate                                 : 128 kb/s
Maximum bit rate                         : 135 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 81.0 MiB (5%)
Language                                 : German
Encoded date                             : 2015-01-15 12:37:31 UTC
Tagged date                              : 2015-01-15 12:38:23 UTC

As you can see, the original video is pretty clear for its resolution and AR (aspect ratio):

Width                                    : 720 pixels
Height                                   : 576 pixels
Display aspect ratio              : 16:9

So there's no need to modify the video at all. Kodi will play the video in 16:9 pretty fine (I tested with current master from today). But, and that's totally fine, if you modify the video and make it different from the origin, then it's clear that Kodi might show something different than the source you got it from.
Reply
#7
Correct
My DVD example was insufficient.
Especially as the above mentioned TV-Show episode is not a DVD format.

1024x576 is PAL-wide, which is SD content.
Kodi lables this as HD 720.

Suggestion is, to change the logic in Kodi to have a more accurate file labeling.
Reply

Logout Mark Read Team Forum Stats Members Help
SD content is listed as HD (720) content0