This is quite a surprise. I guess, running Tools - Check Media doesn’t report any missing or unused files.
The following steps to create mpv log file might not help but I’m not sure what else to do to find where is the problem or how to reproduce it.
-
Install “Debug No Sound” - https://ankiweb.net/shared/info/881480056
The add-on will prevent Anki from restarting mpv if mpv is no longer responding and mpv log file won’t be overwritten.
-
Don’t restart Anki
-
Open the Debug Console, copy-paste the following lines and press Ctrl+Return to tell mpv to create
mpv.debug.log.txt
in the Anki2 folder.https://docs.ankiweb.net/#/misc?id=debug-console
import os from aqt import mw from aqt.sound import mpvManager logfile = os.path.join(mw.pm.base, 'mpv.debug.log.txt') path = os.path.expanduser(logfile) with open(os.path.join(mw.pm.base, 'mpv.conf'), 'a') as f: f.write('log-file={}\n'.format(path)) print('log-file:', mpvManager.get_property('log-file')) # restart mpv to apply new settings mpvManager.shutdown() print('log-file:', mpvManager.get_property('log-file'))
As an alternative, manually create
mpv.conf
in the Anki2 folder withlog-file=...
. -
Then restart Anki and review cards until there’s no sound.
Once there’s no sound, click the audio replay button a few times, then look at the ‘mpv.debug.log.txt’ in Anki2 folder. Maybe it’ll show why there’s no sound or maybe not.
https://docs.ankiweb.net/#/files?id=file-locations
And maybe open the Debug Console in Anki and run this code.
from aqt.sound import av_player, mpvManager
print(av_player.current_player)
mpvManager.shutdown()
print(mpvManager.get_property("mpv-version"))
print(av_player.current_player)