Support MKV container crop flag
#1
Some DVDs are encoded with black bars on all four sides of the image. It's not that obnoxious, but it would be nice to crop out the bars without re-encoding the video. This appears to be possible with third party video players (e.g. VLC) that respect crop flags found in the .mkv container. The movie file isn't changed, it's just presented differently.

My goal is to turn this:

Image

into this:

Image

by using MKVToolNix to edit the cropping tags of the .mkv container header:

Image

A little searching shows that I'm not the first Kodi user to suggest this feature. While he was able to get perfect cropped playback in VLC, my cropped videos show a green line on the right side of the image. The movie plays fine when I crop the same video with handbrake, so I don't think it's a dimension/aspect ratio problem. Here's a screenshot from VLC of my cropped/tagged .mkv to illustrate:

Image

Here is a sample of the original clip.
Here is a sample of the cropped clip.
Here is a sample of the encoded, cropped clip.
Reply
#2
+1

If this is something that's a part of MKV (and it is) then Kodi should try and support it. It would solve some minor issues, even if the user doesn't notice it.
Like electricity, most people only notice when a good feature ISN'T working, that's the sign *of* a good feature.
Reply
#3
Have you considered using zoom?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#4
There are two problems I can think of with zoom.

1) The black borders aren't always even, meaning the video isn't always centered. Zoom would cut off part of the image.

2) AFIAK, zoom has to be manually set for each video through the OSD. Supporting the .MKV crop flag would automate things.



Edit: Another reason I don't use zoom is that I've been experiencing a bug in Kodi where the settings from the OSD are applied to all videos, even if "set as defaults for all videos" isn't selected. Sure, this is a bug that will probably be squashed (may just be my installation?), but it re-enforces a design ethos I've come to adopt for using Kodi -- sandbox as much as possible.

Files should play back correctly from the get-go. Relying on another layer of complexity (i.e. OSD adjustments) reduces stability and simplicity.
Reply
#5
(2016-01-01, 21:16)nickr Wrote: Have you considered using zoom?

I knew I should have mentioned this before; zoom isn't perfect, and a preset crop parameter IN the MKV can't be beat by definition.
Plus, it's something that if implemented, should be on by default, as opposed to zooming, or even the auto zoom/crop function.

I'm not saying this is easy to implement or anything, I'm just saying its something that'd be a great fit for Kodi.
Reply
#6
Good points.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#7
Just stumbled upon this after trying some cropped mkv in KODI without successs.

+1 from me - i'd love to see mkv crop support in KODI Smile
A Confluence ZEITGEIST (Modernized Confluence Skin)  |  Kodi 17.7 DSPlayer x64 BETTERGUI (2020 build)
Reply
#8
+1 from me too! This would also let the JSON RPC report the proper aspect ration for bluray rips. Alternatively, I suppose a new scraper could sample an mkv and set aspect ratio automatically as part of the Movie library's metadata, at least then the library data would be correct.
Reply
#9
+1 here as well. Haven't seen any updates in a while, and it seems like this is still not supported in the latest version of Kodi, unfortunately.
Reply
#10
cropping info is still not exposed by ffmpeg: https://trac.ffmpeg.org/ticket/4489
Reply
#11
Any world if MKV cropping will be properly support soon?
Reply
#12
Best if you ask that question at ffmpeg.org
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki) || Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#13
So Kodi is basically waiting on ffmpeg to support it?
Reply
#14
Correct. If you click on the link in the post by FernetMenta, you will see it is an old issue that has been reported to them, but there seems to be no interest in finalising the issue.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki) || Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#15
Thanks for the reply. I'm mainly looking to crop my MKV files so Kodi reports the correct aspect ratio metadata. Most of my videos are bluray remuxes so they are reported as 16:9. I was thinking this is would be my answer to fixing the issue because I don't want to re-encode everything just to crop out the black bars
Reply



Logout Mark Read Team Forum Stats Members Help
Support MKV container crop flag0
This forum uses Lukasz Tkacz MyBB addons.