Video Clip Library

AnkiWeb addon 2110967026

Exports HTML-tag embedded video clips from Anki notes into searchable, browsable libraries with metadata, supports playback via mpv, and imports clips back into existing notes without overwriting data.
AI-generated summary; may contain mistakes.

importexportnote-management

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
0 (πŸ‘ 0 Β· πŸ‘Ž 0)
Updated
2026-10-05
Anki versions
23.10~
License
Not found (this does not mean that the addon has no license)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
en

Maintenance

active

  • Last update or commit: 2026-10-10 (22 days before the snapshot).
  • Test files: 1.
  • Commits in the last year: 6.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
23.10+2026-10-05
History across monthly snapshots

Loading…

Similar addons

Anki HTML Exporter

Exports Anki cards to interactive, searchable, printable HTML pages rendered by Anki's engine, with live browsing, narrated slideshows, rapid presentations, filtering, media support and study tools.

aiexportreview-flow

4 votes 51% approval πŸ‘ 4 Β· πŸ‘Ž 0 Anki 26.08.1~ Updated 2026-09-16
Export to Html 2025

Exports Anki decks to standalone HTML files with customizable templates and CSS, embedded images, Anki search filtering, and live preview before saving.

exportformattingshortcutsfork-or-reupload

3 votes 21% approval πŸ‘ 2 Β· πŸ‘Ž 1 ⭐ 1 Anki 23.09~ Updated 2025-12-15
Print Selected Cards

Exports selected cards, decks, or tags to a printable HTML file showing both card sides, with media and LaTeX support, for printing or saving as PDF.

exportshortcutsfork-or-reupload

2 votes 9% approval πŸ‘ 1 Β· πŸ‘Ž 1 Anki 26.05~ Updated 2026-07-07
Card to Image Exporter

Exports selected Anki cards' answer sides as high-quality PNG images in bulk, organized by deck, rendering HTML, CSS, embedded images and MathJax formulas with customizable output settings.

export

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 Anki 25.02.5~ Updated 2025-05-27

Description

Video Clip Library

Video Clip Library saves HTML-tag (<video></video>) embedded video clips on your Anki cards (embedded on a field, not card template basis) into a folder you can keep, browse, and use again later.

I use a custom fork of mpvacious to create video clips for anki notes

Example of embedded video in a note's field.

Library Viewer

Requirements

  • Anki 23.10 or newer
  • mpv installed and available on your system

If mpv is installed but not found automatically, set its location in the add-on settings.

On Windows, make sure the .exe extension (i.e. mpv.exe) is specified to avoid buggy playback.

Menus

The add-on adds actions to two Anki menus:

Main menu (Tools)

  • Tools > Clip Library > Configure β€” Edit the note type, clip field sets, extra rows, exclusion rules, and import field sets. Import field sets can add the same kind of extra rows as export.
  • Tools > Clip Library > Library Viewer β€” Open the viewer to browse exported clip libraries, search clips, and play them.

Browser menu (Edit)

Open the Card Browser first, then use:

  • Edit > Clip Library: Export selected notes… β€” Export video clips from the currently selected notes.
  • Edit > Clip Library: Export deck… β€” Export video clips from the entire checked deck (or sub-deck).

Exporting

From the card browser, export the notes you have selected or a whole deck. The add-on copies the video files. It does not move or delete them from Anki.

Each library is a folder of video files plus a JSON file that stores the metadata for each clip: which note it came from, the sentence, and the other fields you choose to keep.

Library Viewer

Open the library viewer to search your saved clips and play them.

Library Viewer

You can also bring clips back into Anki. The add-on suggests the card each clip belongs to, and you can check or change that match before anything is written. It fills the first import field set whose mapped fields are all empty, and writes import copies only when those targets are empty too. Fields that already have data are left alone.

Import dialog

NOTE: It is strongly recommended to backup your entire Anki collection (via File β†’ Export from the main Anki window) or create a new Anki profile expressly for testing purposes before trying any of the import functionality. Changes to notes cannot be undone β€” they would have to be reverted manually.

Use Cases

This is useful if you want:

  • A backup of your clips
  • A way to watch them outside a review session
  • A way to move clips into another Anki collection

Current assumptions and limitations

The add-on is not a fully generic video extractor. The following assumptions define its scope and explain why it may not work with every setup:

  • Video tags β€” Only video files embedded inside a <video> HTML tag are scanned. The addon looks for the pattern <video … src="…"> and extracts the first src it finds. Videos embedded using other methods (e.g. <audio> tags, plain file paths, custom HTML) are not recognized.

  • Supported media extensions β€” The addon recognizes only the following video file extensions: .mkv, .mp4, .webm, .avi, .mov, .m4v, .ts, .ogv, .wmv. Other extensions (such as .flv, .3gp, or .mxf) are ignored even if they appear inside a valid <video> tag.

  • Note type filter β€” During export, only notes of the note type you configure in Clip Library > Configure are scanned. Notes of any other note type are skipped entirely.

  • One video per tag β€” The addon extracts at most one video file per <video> tag. If a tag contains multiple <source> children, only the src on the <video> tag itself is considered.

  • Import writes to existing notes only β€” Importing clips back into Anki can only fill fields on existing notes. The addon does not create new notes. A note must have one configured import field set whose mapped fields are all empty, and every import-copy target must be empty too. The addon does not overwrite a destination that already has data, and it does not write part of one.

  • Import uses a scoring system β€” The addon matches each clip to the most likely note using configurable import rules (sentence text, filename, timestamps, etc.) with weighted scoring. Clips are only imported when the best match exceeds the configured minimum threshold and has no tie with another note.

  • Import field sets require a video field β€” Importing requires at least one enabled import field set with a video field specified. Without this the addon cannot write any clips. Extra rows on an import set are optional and are written only when that row names a field.

  • mpv is only needed for playback β€” Exporting and importing work without mpv. Playback of clips in the library viewer requires mpv to be installed and found (either automatically or via the mpv executable path set in the add-on settings).

README

Clip Library

Anki addon that exports video clips and their note/job metadata to a portable JSON + folder library, browses those libraries in a dedicated viewer, and imports clips back into Anki.

What it does

  • Configure one note type, as many clip field sets as needed, optional extra rows on those sets, plus generic and audio fields.
  • Export selected browser notes or a whole deck. Files are copied, never moved.
  • Optionally exclude clips by any key path on the clip object that export writes, such as clip -> anki -> fields -> miscinfo -> value. A preview lists the clips those rules leave out. Hover a discovered key to see a value from this export. Job keys show how many clips in this export contain them. Use key puts the selected path into a rule. Updating a library does not delete clips already stored in it.
  • The same rules can be edited on the Exclusions tab in settings. That tab has no deck, so it cannot show key paths or example values. Save named presets there, then apply one from the export window.
  • Optionally merge clip-encode / mpvacious job records into clip_library.json.
  • Choose which clip-library keys to store, and which job-record keys to store from a tree built out of a deck's real job records.
  • Browse one or more exported libraries, search them, and play clips or linked note-audio files with embedded mpv.
  • Import into existing notes only. You build match rules with dropdowns, review the suggested note, and can change that note before writing. Each clip uses the first import field set whose mapped fields are all empty. Import copies are included in that check. If any field that would be written already has data, that destination is skipped and nothing in it is written. Sentence, secondary, miscinfo, and any extra rows can be set to Don't import.
  • Target decks are shown as a tree (Parent above Parent::Child). Checking a parent does not include its subdecks.
  • Import dropdowns list the best matches, not every note in the deck. Use the … button to search the rest. That stays responsive on collections with tens of thousands of notes.
  • The Anki console prints [clip_library] timings for building the mapping preview, exporting a collection, importing a collection, and building a job-record export key tree.
  • Identity editors show a live example built from the collection being worked with. Hovering a key shows one real value from that collection. If no deck has been checked, note identity uses placeholder text instead of reading other decks.
  • The import window is split: mapping, rules, score, note type, and identities on the left; target decks and import field sets on the right.
  • A field already chosen in an export or import note type is hidden from the other field dropdowns.

Menus

  • Tools > Clip Library > Configure edits a draft. Save writes it. Close discards it, and asks first when something actually changed. The Exclusions tab edits export filter rules and named presets. Paths have to be typed there.
  • The Import note type tab remembers field sets, extra rows on those sets, and note identity per note type. The import window uses the same setup.
  • Tools > Clip Library > Library Viewer. Add a library by choosing its clip_library.json file. The folder that contains that file is the library.
  • Browser Edit > Clip Library: Export selected notes...
  • Browser Edit > Clip Library: Export deck...

Export layout

<library>/
  clip_library.json
  media/

Job-record details are stored inside each clip entry in clip_library.json. Settings are written only when you press Save. Job-record linking treats a later note/field-set move as a partial match as long as the output filename still agrees.

Schema 4 stores note-constant Anki fields once under top-level notes, keyed by note id. The note object does not repeat that id. Each clip keeps anki.note_id as the link, plus clip-specific fields such as sentence, miscinfo, and the clip video under media. A clip stores anki.field_set_index only. The field set name and its Anki field mapping live in top-level field_sets, matched by that same index (not by array position). Media paths are media/<filename>. Audio filenames are the media records on notes.<id>.audio_fields.<field>, not a second files list. Older libraries are normalized on load. Re-exporting one clip refreshes the shared note record for every clip that points at it, and refreshes field_sets from the current collection without renumbering indexes still used by clips that were not re-exported.

Development

The add-on runtime is under src/video_clip_library. The project targets Anki 2.3.10 or newer, as declared by src/video_clip_library/manifest.json.

Run the unit tests from the project root:

python -m pytest

The tests cover pure export, import, configuration, identity, and path-handling logic. UI and Anki collection workflows still require a manual smoke test inside Anki.