mpv-player / mpv-player/mpv

YTDL Hook not getting auto-sub slang from yt-dlp .config

Open
#17,537 4 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
mpv v0.41.0-260-g9548ec553 Copyright © 2000-2026 mpv/MPlayer/mplayer2 projects
 built on Mar  7 2026 07:14:39
libplacebo version: v7.362.0 (v7.360.0-8-g4c654e5-dirty)
FFmpeg version: N-123241-g20cf8befd
FFmpeg library versions:
   libavcodec      62.24.101
   libavdevice     62.2.100
   libavfilter     11.13.100
   libavformat     62.10.101
   libavutil       60.25.100
   libswresample   6.2.100
   libswscale      9.4.100
Other Information
- Windows version: Microsoft Windows [Version 10.0.19045.4170]
- GPU model, driver and version: NVidia GEFORCE GTX 970/32.0.15.6.94
- Source of mpv: Windows builds by zhongfly (git)
- Latest known working version: unknown
- Issue started after the following happened: upon trying
Reproduction Steps

When running mpv with a YouTube url and the following inside my yt-dlp .config file,
--sub-langs="en.*"
--write-auto-subs
--embed-subs

example mpv command:

mpv --fullscreen https://www.youtube.com/watch?v=YhR1-kkaLEU

Expected Behavior

MPV plays the track with only the slangs matching "en.*"

This expected behavior will happen if you pass ytdl-raw-options=sub-langs="en.*"

Actual Behavior

MPV plays the track with every slang of every auto caption.

This happens only when the sub-langs is only defined in the yt-dlp config file. Do note that it does still read the "write-auto-subs" from the yt-dlp config file. I have tried moving the sub-langs above and below the other options in case read order is important.

Log File

output.txt is with the actual behavior. output2.txt is with the expected behavior when putting the sub-lang in the terminal line itself.

EDITED redacted further

output.txt

output2.txt

Sample Files

No response

I carefully read all instruction and confirm that I did the following:
  • I tested and confirmed that the issue exists with the latest release version or newer.
  • 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 comparing output.txt with output2.txt and reproducing the command using the yt-dlp .config options. Trace how mpv passes yt-dlp configuration values, especially --sub-langs, versus the ytdl-raw-options command-line setting. Done means the config-file language filter produces the same subtitle selection as the explicit mpv option.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.