### ### Main mpvacious configuration file. ### Save this file to ~/.config/mpv/script-opts/subs2srs.conf ### ## ## General settings ## # Anki deck for new cards. Subdecks are supported. deck_name=Bank::subs2srs # Model names are listed in `Tools -> Manage note types` menu in Anki. # If you don't have a model for Japanese, get it from # https://tatsumoto.neocities.org/blog/setting-up-anki.html#import-an-example-mining-deck model_name=Japanese sentences # Field names as they appear in the selected note type. # If you set `audio_field` or `image_field` empty, # the corresponding media file will not be created. sentence_field=SentKanji secondary_field=SentEng audio_field=SentAudio image_field=Image # The tag(s) added to new notes. Spaces separate multiple tags. # Leave nothing after `=` to disable tagging completely. # The following substitutions are supported: # %n - the name of the video # %t - timestamp # %d - episode number (if none, returns nothing) # %e - SUBS2SRS_TAGS environment variable (if you have it set) note_tag=subs2srs #note_tag=%n %t %e #note_tag= # Size and name of the font used in the menu menu_font_size=24 menu_font_name=Noto Serif CJK JP # AnkiConnect server address # The default address for a server on the same device is http://127.0.0.1:8765. # If Anki is running and AnkiConnect is installed, opening this URL should # open a page showing the current version of AnkiConnect. # Change this if you have changed webBindAddress in AnkiConnect's settings. ankiconnect_url=127.0.0.1:8765 ## ## Toggleables. ## Possible values: `yes` or `no`. ## # Use FFmpeg encoder instead of mpv encoder # If mpvacious encounters problems creating audio and images for Anki cards, # setting this to `yes` should fix them. # # You need to install ffmpeg and add it to the PATH first. # https://wiki.archlinux.org/title/FFmpeg # https://www.ffmpeg.org/download.html # # FFmpeg encoder is unable to create audio and images from remote content (like YouTube videos). use_ffmpeg=no # Automatically create the deck for new cards (see deck_name option) create_deck=yes # Allow making notes with the same sentence field. allow_duplicates=no # When mpv starts, automatically copy subs to the clipboard as they appear on screen. # This option can be also toggled in the addon's OSD menu. autoclip=no # Possible options: # "disabled" - autocopy is disabled # "clipboard" - copy to the system clipboard (e.g. uses xclip) # "goldendict" - send the subtitle string to goldendict (goldendict-ng). # "custom_command" - run any custom command specified in `autoclip_custom_args`. autoclip_method=clipboard # Command to run when autoclip is enabled and set to "custom_command". # If empty, nothing will be done. # If set, calls the external program. # The following substitutions are supported: # %MPV_PRIMARY% - primary subtitle line # %MPV_SECONDARY% - secondary subtitle line autoclip_custom_args=/usr/local/bin/goldendict %MPV_PRIMARY% # Remove all spaces from the primary subtitle text. # Set this to "yes" for languages without spaces like Japanese. # However, if mpvacious detects any latin characters in the string, spaces will not be removed. nuke_spaces=yes # if set to `yes`, the volume of the outputted audio file # depends on the volume of the player at the time of export tie_volumes=no # Remove text in parentheses and leading/trailing spaces or # newlines that may interfere with Yomichan before copying # subtitles to the clipboard clipboard_trim_enabled=yes # Add media to fields before or after existing data append_media=yes # Remove text in brackets before substituting %n into tag tag_nuke_brackets=yes # Remove text in brackets before substituting %n into tag tag_nuke_parentheses=no # Remove the episode number before substituting %n into tag tag_del_episode_num=yes # Remove everything after the episode number before substituting %n into tag # Does nothing if the previous option tag_del_episode_num is disabled. tag_del_after_episode_num=yes # Convert filename to lowercase for tagging. tag_filename_lowercase=no # Lets you disable anki browser manipulation by mpvacious. disable_gui_browse=no # Play audio clip automatically in background # after note creation (or note update) to ensure that the audio is correctly cut. preview_audio=no # When selecting subtitle lines, print them on the screen. show_selected_text=yes # For convenience, read config file from disk before a card is made. # Useful if you change your config often since you won't have to restart mpv every time, # but reading from disk takes some time. reload_config_before_card_creation=yes ## ## Image settings ## # Snapshot format. # Do not switch to `jpg` unless your computer doesn't support `webp`. snapshot_format=webp #snapshot_format=jpg # Quality of produced image files. 0 = lowest, 100=highest. snapshot_quality=15 # Image dimensions # If either (but not both) of the width or height parameters is -2, # the value will be calculated preserving the aspect-ratio. snapshot_width=-2 snapshot_height=200 # Screenshot (yes, no) # Usually not required. # When making Anki cards, create a screenshot (by calling 'screenshot-to-file') instead of a snapshot. # If set to yes, image dimensions and quality cannot be controlled due to mpv limitations. # 'snapshot_format' is still respected. # When using this, a custom sync server is recommended, e.g. https://github.com/ankicommunity/anki-sync-server screenshot=no # The exact image template used when exporting to Anki's image field. # Adding data-editor-shrink="true" makes the image smaller by default within the Anki viewer # on versions 2.1.53+ (equivalent of double-clicking on the image). # You likely would not want to change this unless you know what you are doing. image_template=snapshot #image_template=snapshot # Similar to image_template but with audio. # Normally, the user doesn't need to change this setting, # but it may be needed for audio files to be playable on AnkiWeb. audio_template=[sound:%s] #audio_template= ## ## Animated snapshots ## Animated snapshots will capture the video from the start to the end times selected when using mpvacious. ## # If enabled, generates animated snapshots (something like GIFs) instead of static snapshots. animated_snapshot_enabled=no # Number of frame per seconds, a value between 0 and 30 (30 included) # Higher values will increase both quality and file size, lower values will do the opposite animated_snapshot_fps=10 # Animated snapshot dimensions # If either (but not both) of the width or height parameters is -2, # the value will be calculated preserving the aspect-ratio. animated_snapshot_width=-2 animated_snapshot_height=200 # Quality of the produced animation, 0 = lowest, 100 = highest animated_snapshot_quality=5 ## ## Audio settings ## # Audio format. # Opus is the recommended format. # It may be required to use a different format when Opus is not supported. # This is the case on certain computers or devices which are running proprietary operating systems. audio_format=opus #audio_format=mp3 #audio_format=caf # Sane values are 16k-32k for opus, 64k-128k for mp3. audio_bitrate=24k # Set a pad to the dialog timings. 0.5 = half a second. # Pads are never applied to manually set timings. audio_padding=0.0 #audio_padding=0.5 ## ## Forvo support (Yomichan users only) ## # yes - fetch audio from Forvo if Yomichan couldn't find the audio (default) # always - always fetch audio from Forvo and replace the audio added by Yomichan # no - never use Forvo use_forvo=yes # Vocab field should be equal to {expression} field in Yomichan vocab_field=VocabKanji # Vocab Audio field should be equal to {audio} field in Yomichan vocab_audio_field=VocabAudio ## ## Misc info ## Various context information that can be written on your cards in a specified field. ## # yes to enable or no to disable. miscinfo_enable=yes # Field name miscinfo_field=Notes # Format string used to fill the misc info field. # It supports the same substitutions as `note_tag`. HTML is supported. miscinfo_format=%n EP%d (%t) #miscinfo_format=From mpvacious %n at %t. ## ## Secondary subtitles ## Mpvacious can try automatically loading secondary subtitles that will appear at the top. ## For example, you may want to load English subs alongside Japanese subs. ## ## Secondary subtitles should be present in the container. ## But if you manually set secondary sid from the command line, mpvacious won't change it. ## # Load secondary subtitle track automatically when a file is opened. secondary_sub_auto_load=yes # Language of secondary subs. This is your native language or a language you know well. # If you leave this parameter empty, secondary subs will NOT be automatically loaded. secondary_sub_lang=eng,en,rus,ru #secondary_sub_lang= # Hover area. # Proportion of the top part of the mpv window where the secondary subtitles are visible when hovered over. # Possible values: from 0.0 to 1.0 secondary_sub_area=0.15 # Visibility state # Can be set to: 'auto', 'never', 'always'. # If set to 'never' or 'always', secondary_sub_area has no effect. # If set to 'auto', visibility behaves according to the value of secondary_sub_area. # Default binding to cycle this value: Ctrl+v. secondary_sub_visibility=auto ## ## Custom audio encoding arguments ## These arguments are added to the command line. ## `mpv` and `ffmpeg` accept slightly different parameters. ## Feel free to experiment for yourself, but be careful or media creation might stop working. ## # Ffmpeg ffmpeg_audio_args=-af loudnorm=I=-16:TP=-1.5:LRA=11 #ffmpeg_audio_args=-af silenceremove=1:0:-50dB # mpv # mpv accepts each filter as a separate argument, e.g. --af-append=1 --af-append=2 mpv_audio_args=--af-append=loudnorm=I=-16:TP=-1.5:LRA=11 #mpv_audio_args=--af-append=silenceremove=1:0:-50dB