Home

Awesome

mvp2anki

Preview

Overview

Inspired by subs2srs this script lets mpv users quickly creates notes for Anki from sound or video fragments with minimal dependencies.

Requirements

Installation

  1. Save mpv2anki.lua in the mpv script folder (~/.config/mpv/scripts/).
  2. Set the path to where Anki saves its media files in the config file (See Options below).

Usage

Options

Save as mpv2anki.conf in your script-opts folder (usually ~/.config/mpv/script-opts/)

# This is the only required value. replace "user" and "profile" with your own.
# This must be an absolute path. '~' for home dir will NOT work
media_path=/home/user/.local/share/Anki2/profile/collection.media/

# These are the other options containing their default values.
deckname=mpv2anki
# The note type
modelName=mpv2anki

# You can use these options to remap the fields
field_audio=audio
field_snapshot=snapshot
field_subtitle1=subtitle1
field_subtitle2=subtitle2
field_start_time=start_time
field_end_time=end_time
field_snapshot_time=snapshot_time
field_title=title

# The url and port AnkiConnect uses. This should be the default 
anki_url=localhost:8765

# The font size used in the menu.
font_size=20
shortcut=shift+f

# audio & snapshot options
audio_bitrate=128k
snapshot_height=480