8 0
Contact Author Sign in to rate

Advanced MPV Player

<10kB. Updated 2022-08-03.
The author has shared 20 other item(s).


20220803 1: fix some bugs for above version 2.1.49. 20211230 1: Fix Bugs for no sound play with "Advanced Answer Sounds" add-on: mpv play need "pause=no" option. 20211225 1: Support "Advanced Answer Sounds" this addon's new config params 2: Add more config params for better use mpv player: "force_window": 0, "custom_geometry": 1, "keep_aspect":0, "restore_last": 1, "win_width": 0, "win_height": 0, "win_left": 0, "win_top": 0 --force_window: Use this param can cooperate the "Advanced Answer Sounds", when answer the easy type, force_window with true can make mpv window open always and do not close and open again and just black window and play next vidio clip --custom_geometry: with latter params --keep_aspect --win_width height left top you can assign the mpv window's position and size --restore_last: use this param can restore the mpv windows's last pos and size when open the anki, notice when use restore last window pos and size, mpv use the no-border mode to show the window, because the addon only got the geometry of the mpv client window's information and not the frame window's information. 20210613 1: Support Subtitle show or hide by menu tools-Advanced MPV Player Show Sub -- On/Off or Config button, this useful for <Video Import As A Deck> https://ankiweb.net/shared/info/1779953895 this addon to enable or disable sub-add options through menu not by change the card's field. Defalut option is subtitle on. 20210524 1: Fix some bugs for support sub-add options.(befor sub-add must need sleep somtime and cause click not very smooth.) 20210523 1: Support Opitons like: --start=01:10:00,100 --end=01:11:00,000 --sub-add=xxxx.srt make the mpv play video for segment and subtitle this update is needed by the add-on: <Video Import As A Deck> https://ankiweb.net/shared/info/1779953895 to play with subtitle. This add-on optimizes the mpv player's featuresthes when use sounds field: 1: When play video clip, this add-on will paused at the end,keep the last frame on the screen and not close the window, if the anki play next card's video clip, the mpv window will continue play the clip, this make people feel comfortable. 2: When play vidoe or audio media, you can use sounds like this: [sound:xxxx.flv --start=60 --length=10], this make the mpv play the media from start time and keep playing length time, The following is references, with these options, we can skip media's titile or useless part, or cut a long clip to small parts and watchint its in several days. Thanks for the add-on:Video Fix 1 and Video Fix 2, I referenced them, and this add-on conflicts them, maybe others. https://mpv.io/manual/master/#options --start=<relative time> Examples --start=+56, --start=00:56 Seeks to the start time + 56 seconds. --start=-56, --start=-00:56 Seeks to the end time - 56 seconds. --start=01:10:00 Seeks to 1 hour 10 min. --start=50% Seeks to the middle of the file. --start=30 --end=40 Seeks to 30 seconds, plays 10 seconds, and exits. --start=-3:20 --length=10 Seeks to 3 minutes and 20 seconds before the end of the file, plays 10 seconds, and exits. --start='#2' --end='#4' Plays chapters 2 and 3, and exits. --end=<relative time> Stop at given time. Use --length if the time should be relative to --start. See --start for valid option values and examples. --length=<relative time>


As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

Supported Anki versions:

To download this add-on, please copy and paste the following code into Anki 2.1:


If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

All Anki 2.1.x Add-Ons Contact Author


on 1659415034
I believe this will be a great Add-On to resolve this annoying issue. However, I am having a problem with the add-on not working. This is the error that shows up.

When loading 'Advanced MPV Player'
Traceback (most recent call last):
File "aqt.addons", line 244, in loadAddons
File "C:
\Users\thien\AddData\Roaming\Anki2\addons21\924111087\_init|.py", line
220, in <module>
AttributeError:'None'Type' object has no attribute 'shutdown'
Comment from author
it caused by anki's new version modify, i tried to fix these bugs, you can try the new update, if still have bugs i will fix them again.
on 1659373856
on 1655035063
Fixed audio being clipped at the end, much appreciated
on 1649965354
Fixed audio clipping issues, thanks!
on 1647225805
Fixed audio issues on desktop, thanks!
on 1646342547
Thank you for this, I was going crazy over finding a solution for cut audio and this fixed it.
on 1646059935
on 1642039638
This is a lifesaver! My audio was cutting in the end and the script solved it beautifully. Thank you very much!!