kelciour / movies2anki

Convert movies with subtitles to watch them with Anki. Inspired by subs2srs
GNU Affero General Public License v3.0
306 stars 29 forks source link

Optimization of the video window size when viewing a video card. #39

Open pyropractic opened 6 days ago

pyropractic commented 6 days ago

Hello, thank you very much for your anki add-on, it helps me a lot when learning languages. I use your add-on on windows. I encountered a small problem when using a screenshot (subs2srs - video) of a smaller height than 320 (I tried to make the height 240). The problem is that the size of the mpv video window opens by default with a height of 320. Thus, part of the map is covered by this window and this is a little inconvenient. If I generate cards without generating mobile cards - then the mvp player window opens by default huge and accordingly covers the entire anki window. After generating mobile cards - the window becomes a stable size with a height of 320 and this is convenient for screenshots of the standard size 320, because I can also see the text of the card face. How can I change the size of the video window that opens (after generating mobile video cards)? I would like the size of the video window to be based on the entered screenshot dimensions in the settings when generating cards and I could change this parameter individually depending on the deck. For example, now this is relevant to me because I want to view first the cards with short sentences (with a video height of 320) and then I want to repeat everything at once using longer cards with a smaller video window size (height of 240). Perhaps you can add this in the next update or can help fix this in my case. This is how it appears at a height of 320. image This is what happens if I reduce the height of the screenshot to 240. The screenshot becomes small, but the video window is still the same size. image image Thank you.

kelciour commented 4 days ago

Thank you for the upvote and kind words!

Updating the add-on is of low priority for the time being and I'll return to the issue some time later.

Meanwhile, the default video player size can be set by creating %APPDATA%/mpv/mpv.conf

https://mpv.io/manual/master/#configuration-files

image

Here's how to do it on Windows.

autofit=100%x240
geometry=50%:30%
border=no

https://mpv.io/manual/master/#options-autofit https://mpv.io/manual/master/#options-geometry https://mpv.io/manual/master/#options-border


The height of the video clips can be changed to 240 in the add-on's config file (Tools > Add-ons > Watch ... > Config) before using Tools > Generate Mobile Cards.

image

pyropractic commented 4 days ago

Thank you. I fixed it only through configuration and that's what I needed. Thanks for the help.