Anamorphic DVD - aspect ratio
#1
The new TinyMediaManager (3.0.5) reports the incorrect aspect ratio for anamorphic DVD-rips. This used to be an issue with TinyMediaManager but was corrected in a later version of 2.x. The bug seems to have reverted with the new version. Sample MediaInfo below:

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main [email protected]@Main
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 17 min
Bit rate                                 : 758 kb/s
Width                                    : 720 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9

In TinyMediaManager 3.0.5 this shows as a 4x3 aspect ratio (and is stored as such in the NFO), but the actual aspect ratio is 16x9.
Reply
#2
do you mean https://forum.kodi.tv/showthread.php?tid...ght=aspect ?
I suppose this has never been implemented since tmm does calculate the aspect ratio on its own and we're not evaluating the values from mediainfo
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
Reply
#3
(2019-11-28, 16:10)mlaggner Wrote: do you mean https://forum.kodi.tv/showthread.php?tid...ght=aspect ?
I suppose this has never been implemented since tmm does calculate the aspect ratio on its own and we're not evaluating the values from mediainfo

Yes, I'm the original poster on that thread also. I could've sworn that handling the aspect ratio flag was implemented in a 2.x version, though. The flag should be evaluated to determine the aspect ratio (and/or display width / height) since an appropriate player will read that value and display the video according to the flags, not just based on the pixel width / height. Not as much an issue for HD content but a large percentage of SD content will have this issue since the DVD specs allowed for anamorphic video to take full advantage of the limited resolution when the video was widescreen.
Reply
#4
Can you please open this file with MediaInfo GUI, and export the result to XML?
tinyMediaManager - THE media manager of your choice :)
Wanna help translate TMM ?
Image
Reply
#5
(2019-11-29, 09:35)myron Wrote: Can you please open this file with MediaInfo GUI, and export the result to XML?

Sure, here you go:

https://paste.kodi.tv/rebobotaca
Reply
#6
Just checking in on this as it's been a little while. I have my projector set to read the aspect ratio flag and adjust the zoom / lens shift to display titles as full frame as possible based on their aspect ratios (2.4:1 screen) so it's an issue for me on playback in Kodi if the aspect ratio is set incorrectly. Thanks again.
Reply
#7
well, imho Kodi reads that info on its own when the file is accessed - using the values from the NFO file is just being used as long as Kodi did not access the media file.
If I am not wrong, the data from tmm does not have _any_ influence how Kodi does its playback
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
Reply
#8
(2020-01-04, 11:26)mlaggner Wrote: well, imho Kodi reads that info on its own when the file is accessed - using the values from the NFO file is just being used as long as Kodi did not access the media file.
If I am not wrong, the data from tmm does not have _any_ influence how Kodi does its playback

I just tested in Kodi 17.6 (DSPlayer) and the setting persists if my nfo has the correct aspect ratio listed, after I play the video file. I believe you're correct that the nfo does not impact Kodi's playback, but for my setup I wrote a script to read the aspect radio in the database on playback and to adjust the projector settings for the optimal position based on the aspect ratio. For most users it's probably not an issue if the aspect ratio isn't listed correctly, but for me it does impact the experience. Both Ember Media Manager and MediaElch do handle the aspect ratio correctly, for what it's worth.
Reply
#9
myron has already implemented a fix for 3.1 - we will prefer the aspect ratio from mediainfo over the calculated one: https://gitlab.com/tinyMediaManager/tiny...cbe204d041
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
Reply
#10
(2020-01-04, 17:49)mlaggner Wrote: myron has already implemented a fix for 3.1 - we will prefer the aspect ratio from mediainfo over the calculated one: https://gitlab.com/tinyMediaManager/tiny...cbe204d041

Perfect, thanks!
Reply
#11
(2020-01-04, 17:49)mlaggner Wrote: myron has already implemented a fix for 3.1 - we will prefer the aspect ratio from mediainfo over the calculated one: https://gitlab.com/tinyMediaManager/tiny...cbe204d041

Just installed 3.1 - while this is now correctly picking up the aspect ratio flag from Mediainfo, it's also ignoring the crop values. In some cases there are movies with letterboxing or pillarboxing encoded into the file. Setting crop flags results in the correct detection of the visible picture dimensions within the video file within TinyMediaManager 3.1. However, that information is now not used to determine the aspect ratio.

See, for instance, this video, where it's encoded with 34 pixels and 36 pixels of black bars on top and bottom, and a 2 pixel bar on the right.

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                                 : V_MPEG4/ISO/AVC
Duration                                 : 1 h 41 min
Bit rate                                 : 5 219 kb/s
Nominal bit rate                         : 5 500 kb/s
Width                                    : 1 918 pixels
Original width                           : 1 920 pixels
Height                                   : 1 010 pixels
Original height                          : 1 080 pixels
Display aspect ratio                     : 16:9

Display aspect ratio of the uncropped video is 16x9. Factoring in the crop values the actual aspect ratio is 1.9:1, or approximately 1.85:1. TinyMediaManager 3.1 shows this video as having a 1.78:1 aspect ratio.

You can use this formula to determine the correct aspect ratio, factoring in both the display aspect ratio and the pixel dimensions:

Display aspect ratio * (Width / Height) / (Original width / Original height)

That should account for scenarios where the pixel dimensions don't accurately capture the display aspect ratio, as well as for the crop values.

So, for instance, a video with these specs:

Width                                    : 696 pixels
Original width                           : 720 pixels
Height                                   : 480 pixels
Original height                          : 480 pixels
Display aspect ratio                     : 16:9

...would be correctly determined to have an aspect ratio of 1.72:1.
Reply
#12
well this would break the whole algorithm we use (which is built on the algorithm Kodi uses).
I am wondering why that works at Kodi...

have to discuss that with myron because he is the "mediainfo" guy
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
Reply
#13
Well, whilst we get the detailed AR from mediainfo, we need to find a "common AR" for displaying (at least for an icon)
1.87, 1.88 are not "common", 1.85 is.
MediaInfo has all the details it needs, and display this accordingly (using the AR calculation formular you posted earlier)

> Display aspect ratio of the uncropped video is 16x9. Factoring in the crop values the actual aspect ratio is 1.9:1, or approximately 1.85:1.
> TinyMediaManager 3.1 shows this video as having a 1.78:1 aspect ratio.
Hmm... since this value is below 2, it should haven been always "rounded" to 1.85. Dunno how the 1.78 came from.
1.9 and other common formats have been added recently, should be better with next build.

Would be fine, if you could export another XML for us (from the letterboxed movie you posted last)
tinyMediaManager - THE media manager of your choice :)
Wanna help translate TMM ?
Image
Reply
#14
(2020-01-07, 16:03)myron Wrote: Well, whilst we get the detailed AR from mediainfo, we need to find a "common AR" for displaying (at least for an icon)
1.87, 1.88 are not "common", 1.85 is.
MediaInfo has all the details it needs, and display this accordingly (using the AR calculation formular you posted earlier)

> Display aspect ratio of the uncropped video is 16x9. Factoring in the crop values the actual aspect ratio is 1.9:1, or approximately 1.85:1.
> TinyMediaManager 3.1 shows this video as having a 1.78:1 aspect ratio.
Hmm... since this value is below 2, it should haven been always "rounded" to 1.85. Dunno how the 1.78 came from.
1.9 and other common formats have been added recently, should be better with next build.

Would be fine, if you could export another XML for us (from the letterboxed movie you posted last)
Sorry, I never saw this reply for some reason. Here are a few examples. TinyMediaManager 3.1.5 still doesn't factor in the crop flags, although it does show the resolution based on the crop flags.
Quote:Width                                    : 1 920 pixels
Height                                   : 802 pixels
Original height                          : 1 080 pixels
Display aspect ratio                     : 16:9
The above should have an aspect ratio of 2.39 but reports as 1.78.
Quote:Width                                    : 672 pixels
Height                                   : 448 pixels
Display aspect ratio                     : 16:9
Correctly reports as 1.78.
Quote:Width                                    : 672 pixels
Original width                           : 720 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
Incorrectly reports as 1.78. This is actually 1.66.
Reply
#15
sorry, but according to your examples, I cannot imagine how I should write code off it:

Post #1:
Quote:Width                                    : 720 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
we should use the display aspect ratio (this is what myron implemented)

Post #14:
Quote:Width                                    : 1 920 pixels
Height                                   : 802 pixels
Original height                          : 1 080 pixels
Display aspect ratio                     : 16:9 
we should NOT take the display ratio, BUT calculate it from original height/ width?
Quote:Width                                    : 672 pixels
Height                                   : 448 pixels
Display aspect ratio                     : 16:9
we could calculate from width/height OR take display aspect ratio?
Quote:Width                                    : 672 pixels
Original width                           : 720 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
we should calculate with original width/height and NOT take display aspect ratio?

would be helpful if we get mediainfo XMLs for all these examples - according to these examples I cannot imagine how I should turn that into code
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
Reply



Logout Mark Read Team Forum Stats Members Help
Anamorphic DVD - aspect ratio0
This forum uses Lukasz Tkacz MyBB addons.