New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VobSub & PGS subtitles are stretching to fill output resolution instead of video resolution #14866
Comments
Can confirm (Linux x86_64) on git master (v18) |
Have tested some idx/sub subtitles, they all fit with screen, not fit with video area. see the forum thread. |
Why? Current behavior is clearly wrong (at least it seems that way to me) |
To clarify: I don't really see a reason why bitmap subtitles should fit with screen (as opposed to video). Are there files were that is the expected behavior? |
all the idx/sub subtitles i download from subtitle sites and tested is fit in screen. see my post in forum. |
Hm? And you think that is correct behavior? Also it would be terrific to discuss this in one location and not two at the same time. |
I don't want to judge which is correct behavior. I prefer to admit that there are two kinds of fact standards in the market, and support both of them to enhance the user experience. What should be discussed is the code implementation. And an other way is not add setting option, just automatically judge the subtitle type when playing. |
Were you able to establish what exactly the differences between those files were? (Yes, I've read the forum thread) Or do we need more samples? |
Scaling subtitles to screen/render area is wrong in all cases because aspect ratio of screen/render area might be different to ar of video. The creator of the subs can't have any knowledge of ar of the screen the subs will be rendered. Put kodi into windowed mode and change size and ar of the window. This should not affect subtitles. |
@FernetMenta may be compare the sub ar to the video ar, if matched, align sub to video is exactly correct. otherwise, align sub to screen will less stretch. |
The AR of bitmap subs should never be changed IMO regardless of alignment
|
I agree. I would be surprised if subs have their own AR. To my knowledge it is defined by video/source AR. That also fixed an issue with ass: https://github.com/xbmc/xbmc/pull/14224/files |
some vobsub sub size is 1920x1080 and the video size is 1920x800. like the sub made use BDSup2Sub. see https://forum.kodi.tv/showthread.php?tid=337326&pid=2791704#pid2791704 |
These files could be considered broken fwiw, but the most sensible thing to do might be to fit them to the render rectangle (without AR changing of course) - like CSS |
I looked into the code. We should treat subs the same way we treat video. That is scaling to render (destination) area by preserving AR. https://github.com/xbmc/xbmc/blob/master/xbmc/cores/VideoPlayer/VideoRenderers/OverlayRenderer.cpp#L261 |
let me think about it ... |
Since starting this a week ago I've changed my mind on this issue. But after looking at other rips online, I've realised no one else does this, they leave the subtitles untouched. If the video is sourced from a bluray the subtitles will always say it belongs to a 1920x1080 video, even if the video has been cropped to remove the black bars. ^ If you've seen the film you'll know you cannot trust this man. If you changed the default behaviour in Kodi to my preference, you'll upset everyone else who gets their TV & Film from publicly available rips (ie, from torrent sites). |
We will make sure the apect ratio of subs wonˋt be changed. This is correct for all cases. |
@FernetMenta maybe still align to screen and use your method to keep the ar? |
I've been watching some untouched 720x576 (4:3) DVD videos recently with VobSub subtitles (also 720x576) and the subtitles get stretched horizontally. |
I'm experiencing similar behavior with PGS subs. I have both a 21:9 and a 16:9 monitor on the same system. 16:9 monitor: https://i.imgur.com/JCHvKEj.png 16:9 monitor: https://i.imgur.com/d03OGiV.jpg |
Has there ever been an update to this? It's sort of annoying having subs look differently depending if I'm watching on my 16:10 tablet or TV. |
OP here. |
As far as I remember, we reached a consensus on what should happen - PRs welcome |
Wasn't it agreed that image-based subtitles shouldn't stretch? Short excerpt of a lossless 4:3 DVD rip made with makemkv. All the tracks untampered, simply muxed into an mkv container (extract made with mkvtoolnix): |
Exactly. It has not been implemented yet. That's why we are welcoming contributions. |
Fixed in v20 in #20204 |
Bug report
Videos with graphics-based subtitles are stretched, regardless of video aspect ratio/dimensions, to fill the screen.
(Discussed here: https://forum.kodi.tv/showthread.php?tid=337326&pid=2790278#pid2790278)
Expected Behavior
The subtitles shouldn't be stretched or distorted depending on the output resolution, but rather the subtitle/video resolution.
Actual Behavior
For example, any video with an aspect ratio wider than 16:9 playing on a standard 16:9 monitor, Kodi stretches the subtitles vertically, across the black bars in a distorted fashion.
Subtitles also get stretched stretched horizontally if you play a 4:3 video on a 16:9 display.
Possible Fix
Graphics based subtitles contain data pertaining to the output dimensions, currently this is ignored. Even the video dimensions are ignored.
All that needs to be done is to take these values and apply them when rendering the subtitles.
Aditionally, as discussed in the thread above, I thought it would be neat to have a setting in Player Settings --> Language, that allows the user to override all positioning of graphics based subtitles with the relevant subtitle user settings.
Each caption in VobSub/PGS subtitles have a positional value, but they are almost always the same - the bottom-centre of the screen.
You could have a setting 'override graphical subtitle positioning' which ignores positions the subtitles positions them according to the 'Subtitle position on screen' value.
Treating each image in the subtitles as an SRT/SSA caption
To Reproduce
Steps to reproduce the behavior:
Debuglog
N/A
Screenshots
Here are some links or screenshots to help explain the problem:
The video I'm using has dimensions of 1920x818, as do the embedded VobSub subtitles, display output is 1920x1080.
Wrong (Kodi):
Correct (VLC):
Additional context or screenshots (if appropriate)
I have observed this on all versions of Kodi that I use, including the ones mentioned below and an Amlogic build for Android TV boxes.
Your Environment
Used Operating system:
Android
iOS
Linux
OSX
Raspberri-Pi
Windows
Windows UWP
Operating system version/name: Windows 10
Kodi version: 17.6
The text was updated successfully, but these errors were encountered: