mpv-player / mpv-player/mpv

Add `sub-rotate` Option for Subtitles

Open
#15,494 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

meta:feature-request
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

Expected behavior of the wanted feature

Description:
Currently, when rotating the video with "shift+r video-rotate 90 180 270 0" (input.conf), subtitles do not rotate accordingly, causing misalignment. A solution like the following would allow subtitles to rotate with the video:
shift+s sub-rotate 90 180 270 0
This would prevent the issue where subtitles stay static while the video rotates.

Current Workaround:
Using the vf=sub filter rotates subtitles by burning them into the video. However, it only works with certain hardware encoders and has issues like subtitle stretching. Additionally, vf=sub is expected to be deprecated in the future, making this solution unreliable.

Example Issue:

  • Star Wars: The Clone Wars for example has
  • Original Resolution: 1280x720 (16:9)
  • Output Resolution: 1694x720 (2.35:1)
  • Subtitles appear stretched (see screenshots):
    • Normal: Normal
    • Stretched [vf=sub]: Stretched
    • Stretched and Rotated [vf=sub]: Rotated

Environment:

  • mpv version: v0.39.0
  • OS: Windows 10
  • My Config: mpv-config

Related Issues:

Alternative behavior of the wanted feature

No response

Log File

No response

Sample Files

No response

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 reviewing the input.conf bindings shown in the issue and the related discussions in issues #6400 and #14372. Define how a sub-rotate option should interact with video rotation and subtitle rendering, then verify that subtitles rotate without the stretching seen with vf=sub.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.