Skip to content

Instantly share code, notes, and snippets.

@bugdone
bugdone / dualsubs.lua
Last active February 20, 2023 06:07
Display ko and en subtitles simultaneously in mpv
function dualsubs()
local i = 0
local tracks_count = mp.get_property_number("track-list/count")
while i < tracks_count do
local track_type = mp.get_property(string.format("track-list/%d/type", i))
local track_lang = mp.get_property(string.format("track-list/%d/lang", i))
local track_id = mp.get_property(string.format("track-list/%d/id", i))
if track_type == "sub" then
if string.match(track_lang, "en") then