Anki audio doesn’t play

Dear Anki team,

When I double-click on the audio icon of cards, a message pops up: Sounds and video on cards will not function until mpv or mplayer is installed. So it does not play audios. What should I do?

I’m using Mac 10.15.7. Only 2.1.44 Anki opens on my Laptop.

Thanks in advance

You could try running mpv in Terminal.app to see what it says

/Applications/Anki.app/Contents/Resources/audio/mpv

mpv 0.33.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
built on Mon Nov 23 23:02:08 CET 2020
FFmpeg library versions:
libavutil 56.51.100
libavcodec 58.91.100
libavformat 58.45.100
libswscale 5.7.100
libavfilter 7.85.100
libswresample 3.7.100
FFmpeg version: 4.3.1

Usage: mpv [options] [url|path/]filename

Basic options:
–start= seek to given (percent, seconds, or hh:mm:ss) position
–no-audio do not play sound
–no-video do not play video
–fs fullscreen playback
–sub-file= specify subtitle file to use
–playlist= specify playlist file

–list-options list all mpv options
–h= print options which contain the given string in their name

if you put an mp3 file in your home folder and add " ~/filename.mp3" at the end of that line, does the audio play? I presume you haven’t installed a separate copy of mpv in the past?

If I put an mp3 file in my home folder add “~/file name,mp3” at the end of that audio plays, but Anki audio does not.

I have already downloaded a separate copy of mpv before.

So why does it say “-no-audio do not play sound” in Terminal when I put /Applications/Anki.app/Contents/Resources/audio/mpv there and press Enter?

If you’ve installed mpv in the past, maybe the system-installed version or one of its config files is interfering with Anki’s bundled version. You could try running Anki from a terminal (/Applications/Anki.app/Contents/MacOS/AnkiMac) and see if that reveals anything further.

Thank you for your help. Audio sounds when I run Anki from terminal. I put
/Applications/Anki.app/Contents/Resources/audio/mpv and
/Applications/Anki.app/Contents/MacOS/AnkiMac, then press enter in Terminal.

I hope the problem will be solved as soon as possible as it takes time to run it from terminal instead of double clicking on Anki.

Are you saying that Anki correctly plays audio when it is run from the terminal? That implies it’s something to do with your environment; perhaps your PATH is configured differently when running GUI apps.

If Anki is not run from the terminal, a message pops up when I double-click on the audio icon of cards: Sounds and video on cards will not function until mpv or mplayer is installed.