The check media function on PC can cause missing data

I have tried many times to use anki’s check media function on PC, and every time I use it, I find that the video data is lost and cannot be recovered. the data backed up on PC does not back up the video files referenced in the card. I hope anki will check this feature. I found this problem a month ago, and I can’t say for sure that it’s a check media problem on the PC side, but today I accidentally used this feature again, I’m using the latest version of anki on the PC side, and I still have this problem of losing video files after check media. After the video file is lost, my cell phone is OK for now and can be played, but soon after this video is lost on the PC side, it must also cause that video file to be lost on my cell phone side. Because I am using mpv2anki to make video cards that contain a lot of mp4 clips and webm clips. This should have little to do with the version issue, I tried 2.1.55 version before this problem exists, and now the latest 2.1.58 still has this problem.

this is PC Client:

this is iPhone client:


I am not sure how the check media function works, but when I checked the local video files, I found that the video is still on my computer, according to my past experience, after this happens, these video files will exist on my computer hard drive for a short time, but as long as the PC side and cell phone side go through a few rounds of data synchronization, these video files on the PC side will disappear automatically, and the video files on the mobile side will disappear as well. The problem occurs when check media triggers this mechanism, which in combination with data synchronization results in the loss of the video files on the final PC hard drive. I don’t know if these files were optimized during the sync or what the reason is. Anyway, every time this problem occurs, I lose data, causing a large number of my video cards with referenced videos to fail to render.

https://docs.ankiweb.net/templates/fields.html#field-references

Thanks, I will check that later.

ok, I solved the problem perfectly.


According to the official documentation, my template syntax, anki is unable to detect that my video files are referenced by my template, it only supports [sound:something.mp4] such format references, which explains why when I exported, the apkg package did not contain the video files, I added 2 fields to reference these video files, then I added 2 fields to reference these video files, then when I packaged and exported, I was able to include these references in the apkg file together, using the “Advanced Copy Fields” addon plugin, which solved this problem perfectly. I hope this problem I encountered can also help others in the forum.

1 Like

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