AnkiWeb's media files are having issues because they didn't sync correctly with Anki Desktop

My Anki Desktop is working fine, but when I check ‘Tools > Verify Media,’ it shows several media files that ‘weren’t found’ or ‘are in the folder but aren’t being used.’ I tried to play these files, and they work fine in Anki Desktop. However, they don’t work in AnkiWeb or AnkiDroid.

This problem started recently. Before, everything worked fine, including the media files that are now causing issues. I don’t know what changed. I mostly use Anki Desktop and AnkiDroid, and whenever there’s a merge conflict, I prioritize Anki Desktop. What can I do?

Addtional Info:
My Anki Desktop version is: 24.06.3

Is there a way to delete all my decks in AnkiWeb and sync them again from Anki Desktop?

Media sync takes some time, you might have a lot of it so it didn’t get all synced.

I think the only way to do this is by syncing an empty collection to AnkiWeb.

Edit: I forgot there was a delete option in AnkiWeb, but it still doesn’t apply to media.

  • The fact that some media files are (a) missing or (b) unused isn’t necessarily a problem by itself. Can you give a bit more details about how many files are missing or unused on Anki Desktop? Which ones are you concerned about?
  • Have you compared the results of Check Media on Anki Desktop to what you get on AnkiDroid? Are there any differences?
  • How long ago did you sync those media files to AnkiDroid for the first time (a day, a week, a month, etc.)?

Possibly, but let’s hold off on that until we figure out if there is a problem with your collection on AnkiWeb.

I followed your advice and deleted all my decks in AnkiDroid, synced with AnkiWeb, and then synced my files from Anki Desktop. Unfortunately, the problem persists. Maybe there’s an issue with Anki Desktop, even though it seems to be working fine.

There are a lot, my Anki Desktop lists 171 missing files and 219 unused files, most of which are audio files. Since I use Anki to study other languages, many of my cards have text and audio. Even though I can still do my daily reviews without the audio, it’s not as effective.

Yes, AnkiDroid shows the same number of missing and unused files as Anki Desktop. The main difference is that all the media files work fine in Anki Desktop, even though they’re listed as missing or unused. In AnkiDroid, though, these media files don’t work, appears the error “Failed to load”.

All of the missing or unused media files were first synced in January of this year or even earlier. The issue, however, started just 1 or 2 weeks ago.

I wasnt really advising you to do this. I just gave you the method. As for why it didn’t work, you didn’t delete your media.

What I meant in my earlier response is that this is only a problem if it’s causing a problem.

Unused files are a normal occurrence whenever you stop using a piece of media - for instance if you replace a photo or audio clip with a better one. I’ve got 153 unused files in my collection right now, but that’s because I’m in the process of replacing TTS audio files with native-speaker audio files, and I often download a few clips to see which ones sound the best once I process them.

Having unused files would only be a problem if they are files you believe are actually being used somewhere in your collection, and Anki isn’t noticing.

Missing files can be a bit more concerning, but you should still look at whether those are on notes that you’re actually using. [Search the filename in the Browse window to see where it is mentioned.]

This is where you need to focus – but let’s stop blurring these 2 types of files together.

If you have the same number of unused files on both systems, and you don’t see any reason to think that’s a mistake [search for those files in the Browse window] – you should delete those files (on Desktop: Check Media > Delete Unused, then Check Media > Empty Trash, then Sync).

Now, identify one of the files that is listed as missing, but that you can find and play just fine in Anki Desktop, and let’s talk about that one.

1 Like

So I took a closer look and found something interesting. It seems that Anki Desktop somehow created new files with shortened names, and these files only exist on the Desktop version.

For example, there’s a card where the original sound file is named “58 Began to look.” This file is listed as “unused,” and it seems like most of the “unused” files are actually the originals. When I check the card, the sound file shown is named “[sound:58BEGA~1.MP3],” which means the original file “58 Began to look” was replaced by “58BEGA~1.” This shortened file is now listed as “missing.”

When I looked in the “collection.media” folder for these files, I couldn’t find the anki-created file. Even though it works when I play the card in Anki Desktop, I can only find a few of these new renamed files in the folder, and I checked for hidden files too.

In summary, it seems that all the relevant files listed as “unused” are the original ones I used when I first created the card. The “missing” files are the ones that Anki created but don’t appear in the “collection.media” folder, although the card still works fine in Anki Desktop.

Additional info:

  • I’m using Windows.
  • I tried replacing one of these Anki-created files with the original, and it made the card work again in AnkiDroid. The file created by Anki was then listed as “unused” in both Anki Desktop and AnkiDroid. I’m considering going through the same process for every file with this issue, but I’ll hold off for now to see if there’s a more efficient solution.
  • I’m not a native speaker and am still learning English, so if any of my word choices sound odd, that’s why.

As far as I know, those shortened filenames are created by Windows for backward compatibility with old file systems [it’s an “8.3” filename].

If I understand you correctly:

  1. Your collection.media folder has 58 Began to look.mp3 – which is unused.
  2. Your collection.media folder does not have 58BEGA~1.mp3 – which is missing.
  3. In the field of the note you have [sound:58BEGA~1.mp3]. [Do you know if that was originally [sound:58 Began to look.mp3], but changed at some point?]
  4. The audio on cards from that note plays fine in Windows, but not in AnkiDroid or on AnkiWeb.

In a strange way, #4 makes sense. Windows understands that 58 Began to look.mp3 and 58BEGA~1.mp3 are the same file, and it can refer to it by either name. So when Anki asks Windows to play 58BEGA~1.mp3, it plays 58 Began to look.mp3 with no problem. But Check Media, AnkiDroid, and AnkiWeb just see the file as missing. However, the mystery is how the 8.3 filename found its way into your sound tag.

  • Are you using an old version of Windows or an old version of Anki?
  • Did you attach these audio files to your notes in some “unusual” way?
1 Like

Yes, originally it was [sound:58 Began to look.mp3]. Some cards I created still use that format and haven’t been changed.

My Windows is Windows 10 and is up to date, although it’s not Windows 11.
My Anki version is 24.06.3, but when the issue occurred some weeks ago, I was probably using 21.

I don’t think I did anything unusual. I simply dragged and dropped the files from the folder into the “Audio” field in Anki Card.

That’s plenty recent! When I talk about “old” versions of Windows, I mean things like 95, 98, and NT. :sweat_smile:

“21” what? Is that a typo, or do you mean 2.1.<something>? Was it an old version – like something before the 2.1.50’s (a somewhat arbitrary line, but that was ~2 years ago)?


Figuring out when and why it happened doesn’t help much to get your audio playing though. Neither of the 2 paths I can think of to fix it sound very pleasant –

(1) Update the text of the sound tags in Anki to match the real filenames. How many files are we talking about here? Search for "~1." in the Browse window, and switch to Notes mode to get some idea.
image

(2) Update the filenames in Windows to match the text of the sound tags. This is probably simpler to do, but makes for very messy filenames.

1 Like

lol, that would be something to see hahaha

I think it was something like “21.05.27” or “2.1.5,” but I can’t remember the exact version. I just know it had a “2,” a “1,” and a dot somewhere in it. Sorry for the lack of precision! :sweat_smile:

I did the first one cause it seemed easier to do, and the filter you mentioned was really helpful. Here’s what I did:

  1. Used “Verify Media” to see the missing files.
  2. Copied the names of the missing files into Notepad.
  3. Filtered and searched for the altered files in Anki as you suggested.
  4. Renamed the sound files using the names from the “Verify Media” list in the notepad, so ctrl c + ctrl v thing.

To be honest, I haven’t finished yet—there are a lot to go through! :joy: But it’s definitely easier and more efficient than drag and drop everything again. I tested on AnkiDroid, and the audio files that I renamed are working correctly again. I hope this doesn’t happen again, but if it does, I’ll try to automate the process with code somewhere. Thanks a lot for your help.

1 Like

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