mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.85k stars 2.93k forks source link

PGS subtitles not scaled for non-sqaure pixels #15415

Open ToadKing opened 3 days ago

ToadKing commented 3 days ago

mpv Information

mpv v0.39.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Nov 27 2024 18:31:26
libplacebo version: v7.349.0
FFmpeg version: n7.1
FFmpeg library versions:
   libavcodec      61.19.100
   libavdevice     61.3.100
   libavfilter     10.4.100
   libavformat     61.7.100
   libavutil       59.39.100
   libswresample   5.3.100
   libswscale      8.3.100

Other Information

- Linux version: Arch Linux
- Kernel Version: 6.12.1-arch1-1
- GPU Model: GeForce RTX 2070
- Mesa/GPU Driver Version: 565.57.01
- Window Manager and Version: KDE Plasma 6.2.4
- Source of mpv: Arch Linux Repos
- Latest known working version:
- Issue started after the following happened:

Reproduction Steps

Play example video (an exaggerated example of the bottom screenshots, subtitles appear 5 seconds into the video)

The video in question has a different display aspect ratio than 1:1 pixels. For Blu-ray subtitles, they should be scaled along with the video to fix the new aspect ratio. This is specifically noticeable for SD content with 720x480 pixels but a 4:3 display aspect ratio.

Example: on mpv: mpv-shot0001

On VLC: vlcsnap-2024-12-01-00h20m39s683

On my Blu-ray player (Panasonic DP-UB820), matches behavior of VLC: 820

Expected Behavior

Subtitles scale to fit video aspect ratio

Actual Behavior

Subtitles do not scale

Log File

output.txt

Sample Files

example.zip

I carefully read all instruction and confirm that I did the following:

ToadKing commented 3 days ago

Just to verify, DVD subtitles (VobSub) do scale their aspect ratios correctly so this looks to just be an issue with Blu-ray/PGS subs.

ToadKing commented 3 days ago

It looks like this behavior is caused by this commit: https://github.com/mpv-player/mpv/commit/bcc3d72995e926f899c0baa215599c50e23b9523

While this behavior helps when cropping the video we want the opposite behavior when playing back video with non-square pixels. (The comment mentioned possibly requiring future fixes in this case.)