Possible issue with aspect ratio on anamorphic NTSC DVDs

Please post here for issues related to DVD discs
Post Reply
Shasarak
Posts: 15
Joined: Mon Jan 07, 2019 12:54 pm

Possible issue with aspect ratio on anamorphic NTSC DVDs

Post by Shasarak »

Okay, this is going to be tricky to explain! :)

For a long time I've been trying to figure out why it is that I get some strange artefacts when playing back a 16:9 NTSC DVD remux in Kodi (having used MakeMKV to do the remux). Specifically, if I specify software decoding, set deinterlacing to Off, scaling to Nearest Neighbour, and output resolution to 480p, there's some odd image corruption. After some investigation, I've discovered that the reason Kodi does this is that it's allocating the wrong window size for the video: 719 pixels wide instead of 720. I've also discovered a possible anomaly in the container metadata, and a way to adjust the metadata in such a way that Kodi no longer distorts the picture.

What I am trying to figure out now is, is the container metadata actually valid according to the MKV spec (meaning that there is a bug in Kodi - it ought to play these files correctly and it doesn't) or is there actually a bug in MakeMKV which makes it assign the wrong metadata, and Kodi is just doing what the spec is telling it to do? I'm hoping you guys can figure this out for me!

Here's a link to a test clip, as created by MakeMKV: https://www.dropbox.com/s/pceo6kidzr7jm ... t.mkv?dl=0
And here is the version with the metadata "fixed" so that it plays correctly in Kodi: https://www.dropbox.com/s/ca43l83ozw2fd ... d.mkv?dl=0

To illustrate the difference between the two, here's a piece of the output that I get running ffprobe.exe against both files. Note the difference in SAR and DAR values.

The original:

Code: Select all

Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 32:27 DAR 16:9], SAR 853:720 DAR 853:480, 29.97 fps, 29.97 tbr, 1k tbn
The "fixed" version:

Code: Select all

 Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 32:27 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn
How did I produce the "fixed" version, you ask? By using ffmpeg to set the aspect ratio:

Code: Select all

ffmpeg -i 480i_60_deinterlace_test.mkv -aspect 16:9 -c copy 480i_60_deinterlace_test_fixed.mkv
So, can anyone tell me if I'm looking at a Kodi bug or a MakeMKV bug?
Last edited by Shasarak on Wed Feb 22, 2023 8:50 pm, edited 1 time in total.
morbius
Posts: 176
Joined: Mon Aug 13, 2018 7:17 am

Re: Possible issue with aspect ratio on anamorphic NTSC DVDs

Post by morbius »

I've also run ffprobe against various mkvs, some very old and some new, and am also seeing a potential oddity in the metadata for 16:9 NTSC DVD mkv files created by makemkv. 4:3 NTSC and PAL DVDs don't have this issue based on the files I've checked so far.
Post Reply