Restoring old deck - audio/images aren't importing

Hi All,

I created a Japanese deck back in 2014/15 and spent a lot of time importing audio/images. I have the old backup and when I import it into Anki, the text shows up but the audio and images do not. I can see the folder right next to the backups folder and sounds and images files are working.

I tried the Check Media button and it says there are a lot of missing and unused files. When I go in to edit a card that the sound isn’t working for, I can search for that sound file and I see it in the file.

Is there a way to point Anki to that folder so it knows where to get the audio & images?

I have moved everything to the /Roaming/Anki2/User 1/ folder and images are working again, but no audio yet. I tried syncing to Ankiweb but no change.

If you add audio to a new card, does it play? Are you able to play the audio files outside of Anki?

I’ve made progress. The PC I uploaded the deck from still cannot play audio (but yes the audio files play outside of Anki) but I’ve been able to download the deck to another PC and Android and it works on both of those devices.

As far as I’m concerned, that’s a success, but still not sure why it’s not working on the original PC.

Maybe temporarily enable mpv logging (until Anki or mpv hasn’t been closed) and look what it says.

Anki uses a program called mpv (and mplayer as a fallback) in order to support sounds and videos.

To do it,

  1. Open the debug console in Anki, run this code and close the debug console.

    from aqt.sound import mpvManager
    path = os.path.expanduser("~/Desktop/mpv.log.txt")
    mpvManager.set_property("log-file", path)
  2. Add audio to a new card (it’ll be played back immediately) or review a card with sound (or click on the replay button)

  3. Open mpv.log.txt in the Desktop folder and search for the filename or look at the last Run command: loadfile and lines after that.

    [3269.419][d][cplayer] Run command: loadfile, flags=64, args=[url="C:\\Users\\...\\AppData\\Roaming\\Anki2\\User 1\\\\audio.mp3", flags="replace", options="pause=no"]
    [3269.463][v][cplayer] starting audio playback
    [3279.762][v][cplayer] finished playback, success (reason 0)
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.