Anki does not ask mpv for yt-dl support making mpv fail on some setups

Hello,

I made a fork with a very small patch because anki failed to use mpv on my pc. I compiled mpv without lua support which means it hasn’t got yt-dl support. So the --no-ytdl flag makes mpv fail to run.

I would like to open a pr request for this, but apparently you need an issue for this first, so thats why I am creating this topic.

This is part of my pull request.

Summary / motivation (required)

This checks the local mpv build for yt-dl support before disabling it.

Steps to reproduce (required, use N/A if not applicable)

  1. on linux, use anki with mpv with no lua support
  2. have no audio support and get the message “mpv failed to run, falling back to mplayer” or something of that ilk

How to test (required)

After the change I tried running anki with mpv installed with lua support and without lua support, in both cases things worked as planned.
I also tried pulling anki from the main branch with mpv installed without lua support, issue was still there (I was running v25.09.2)

Checklist (minimum)

  • [*] I ran ./ninja check or an equivalent relevant check locally.
  • [*] I added or updated tests when the change is non-trivial or behavior changed. (not needed)

Details

I feel like this is a better solution than the previous checking of the platform. whether mpv is compiled with lua support (yt-dl) is independent of you platform. This solution should work in every case.

Before / after behavior (optional)

Now mpv should work on every platform independent of yt-dl support is present or not.

Scope

  • [*] This PR is focused on one change (no unrelated edits).

Thank you, and have a great rest of the day!

1 Like