Created
September 5, 2017 13:39
-
-
Save maman/f26b5949ee6030a2afaba59281a54006 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- requires subliminal, version 1.0 or newer | |
-- default keybinding: b | |
-- add the following to your input.conf to change the default keybinding: | |
-- keyname script_binding auto_load_subs | |
local utils = require 'mp.utils' | |
function load_sub_fn() | |
subl = "/usr/local/bin/subliminal" -- use 'which subliminal' to find the path | |
mp.msg.info("Searching subtitle") | |
mp.osd_message("Searching subtitle") | |
t = {} | |
t.args = {subl, "download", "-s", "-l", "en", mp.get_property("path")} | |
res = utils.subprocess(t) | |
if res.status == 0 then | |
mp.commandv("rescan_external_files", "reselect") | |
mp.msg.info("Subtitle download succeeded") | |
mp.osd_message("Subtitle download succeeded") | |
else | |
mp.msg.warn("Subtitle download failed") | |
mp.osd_message("Subtitle download failed") | |
end | |
end | |
mp.add_key_binding("b", "auto_load_subs", load_sub_fn) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################ | |
# General | |
# load config file from file directory, useful for overriding ass styles for | |
# entire series | |
use-filedir-conf=yes | |
# default value of 320kB is quite low, especially on slow media | |
cache=4000 | |
# save screenshots on the desktop | |
screenshot-template=~/Desktop/mpv-screenshot%n | |
################################################################################ | |
# Subtitles setup | |
# disable retarded VSFilter compatibility | |
sub-ass-force-style=Kerning=yes | |
sub-font="LucidaGrande-Bold" | |
sub-font-size=44 | |
sub-spacing=3 | |
################################################################################ | |
# On Screen Display | |
#osc=no # I don't like mouse stuff | |
osd-font="HelveticaNeue-Light" | |
# make the OSD progress bar be big and centered like in mplayer and mplayer2 | |
osd-bar-align-y=0 | |
osd-bar-h=7 | |
osd-border-size=1 | |
osd-color='#CCFFFFFF' | |
osd-border-color='#99000000' | |
################################################################################ | |
# Languages | |
slang=eng,en,id | |
alang=jp,jpn,en,eng,id | |
ytdl=yes | |
################################################################################ | |
# Audio | |
# set volume to 100 and use the sound server to actually control the volume | |
volume=100 | |
################################################################################ | |
# Video Output | |
profile=opengl-hq | |
icc-profile-auto |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment