kelciour / movies2anki

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

Video-specific or card-specific cropping #4

Open aleksejrs opened 5 years ago

aleksejrs commented 5 years ago

Some videos have "hardsubs" in them, which could be removed by cropping, but there is no such feature in this add-on. MPV-like players have such features, but what is the best way to do it?

subs2srs has a similar feature: "Crop Bottom: A crop may be applied to the bottom of the snapshot. This might to useful for removing hard subbed subtitles."

kelciour commented 5 years ago

For desktop only usage I've just updated the add-on and added support for crop.lua script (https://streamable.com/ybf50).

  1. Download crop.lua and put it into scripts folder. This folder can be created in the same folder with mpv.exe or at %APPDATA%\mpv, i.e. C:\Programs\mpv\scripts or %APPDATA%\mpv\scripts (C:\Users\...\AppData\Roaming\mpv\scripts).
  2. Create input.conf at the same folder as mpv.exe (or at %APPDATA%\mpv) and add key bindings to activate crop.lua, for exampe, C script-message-to crop toggle-crop (input.conf)
  3. In some cases it's not possible to use mouse to select exact crop, but in this case crop.lua provides hotkeys that will be useful (Enter + mouse keys with or without Alt).
  4. And this way it'll be possible to use movies2anki on desktop with crop settings applied to specific video.