Skip to content

Instantly share code, notes, and snippets.

@matiasw
matiasw / autosub.lua
Last active November 23, 2016 16:07 — forked from selsta/autosub.lua
Automatically download subtitles in mpv using subliminal.
-- 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()
lang_ids = {"en", "es"}
subl = "/usr/bin/subliminal"
--local path = mp.get_property("working-directory").."/"..mp.get_property("path")
local pathfile = mp.get_property("path")