mpv-player / mpv-player/mpv

ASS alignment broken

Open
#16,079 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

os:win
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

mpv Information
[ 809.921][v][cplayer] mpv v0.39.0-1025-g6c4218252 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
[ 809.922][v][cplayer]  built on Mar 17 2025 17:11:55
[ 809.922][v][cplayer] libplacebo version: v7.350.0 (v7.349.0-61-g16ef0a2-dirty)
[ 809.922][v][cplayer] FFmpeg version: N-118854-g2471b2202
[ 809.922][v][cplayer] FFmpeg library versions:
[ 809.922][v][cplayer]    libavcodec      61.33.102
[ 809.922][v][cplayer]    libavdevice     61.4.100
[ 809.922][v][cplayer]    libavfilter     10.9.100
[ 809.922][v][cplayer]    libavformat     61.9.107
[ 809.922][v][cplayer]    libavutil       59.60.100
[ 809.922][v][cplayer]    libswresample   5.4.100
[ 809.922][v][cplayer]    libswscale      8.13.102
[ 809.922][v][cplayer] Configuration: -Ddebug=true -Db_ndebug=true -Doptimization=3 -Db_lto=true -Dlibmpv=true -Dpdf-build=enabled -Dlua=enabled -Djavascript=enabled -Dsdl2=enabled -Dlibarchive=enabled -Dlibbluray=enabled -Ddvdnav=enabled -Duchardet=enabled -Drubberband=enabled -Dlcms2=enabled -Dopenal=enabled -Dspirv-cross=enabled -Dvulkan=enabled -Dvapoursynth=enabled -Dgl=enabled -Degl-angle=enabled -Dc_args=-Wno-error=int-conversion -Dprefix=/__w/mpv-winbuild/mpv-winbuild/mpv-winbuild-cmake/build32/install/i686-w64-mingw32 -Dlibdir=/__w/mpv-winbuild/mpv-winbuild/mpv-winbuild-cmake/build32/install/i686-w64-mingw32/lib -Ddefault_library=shared -Dprefer_static=True --cross-file=/__w/mpv-winbuild/mpv-winbuild/mpv-winbuild-cmake/build32/meson_cross.txt
[ 809.922][v][cplayer] List of enabled features: build-date cplugins cuda-hwaccel cuda-interop d3d-hwaccel d3d11 d3d9-hwaccel debug direct3d dos-paths dvdnav dxgi-debug-d3d11 egl-angle egl-angle-win32 ffmpeg ffnvcodec gl gl-dxinterop gl-dxinterop-d3d9 gl-win32 glob glob-win32 gpl iconv javascript jpeg lcms2 libarchive libass libavdevice libbluray libplacebo luajit openal rubberband rubberband-3 sdl2 sdl2-audio sdl2-gamepad sdl2-video shaderc spirv-cross uchardet vaapi vaapi-win32 vapoursynth vector vk-khr-display vulkan wasapi win32 win32-desktop win32-executable win32-smtc win32-threads zimg zimg-st428 zlib
[ 809.922][v][cplayer] Built with NDEBUG.
Other Information
- Windows version: Windows 10 Pro 64-bit (10.0, Build 19045) (19041.vb_release.191206-1406)
- GPU model, driver and version:AMD Radeon(TM) Graphics
- Source of mpv: https://github.com/wbtcpip2/mpv-winbuild/releases/tag/2025-03-17-6c42182
- Latest known working version:
- Issue started after the following happened:
Reproduction Steps

i use show-text to display a short text top-center aligned
"${osd-ass-cc/0}{\an8}${osd-ass-cc/1}panoramica dalla turchia"
and it shows correctly top-center aligned

Image

but if i add the "pos" code the alignment is wrong
"${osd-ass-cc/0}{\an8}{\pos(0,40)}${osd-ass-cc/1}panoramica dalla turchia"

Image

Expected Behavior

i expect that using the pos coordinate the center alignment should not be broke

Actual Behavior

when using the pos code the alignment is broke

Log File

correct alignment:

18032025_191247_E100VIDEOVID00003MP4.txt

wrong alignment:

18032025_191151_E100VIDEOVID00003MP4.txt

Sample Files

No response

I carefully read all instruction and confirm that I did the following:
  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two ${osd-ass-cc} and show-text cases from the issue on the reported Windows setup, then compare the attached logs for the alignment difference. Trace the OSD/ASS rendering path responsible for {\\an8} and {\\pos(0,40)}. Done means the position override preserves the expected top-center alignment.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.