0

Mpv is not loading and playing lyrics files, even though they're in the same directory with the same name but different .lrc file extension. and I even have the following in my mpv.conf file

autoload-files=yes
sub-auto=fuzzy
1

it seems that even with these options, mpv doesn't load LyRiCs (.lrc) files. what I had to do is make a little mpv plugin script, and put it in the scripts directory which's in the config directory of mpv.

--  load lrc files

function file_exists(name)
   local f=io.open(name,"r")
   if f~=nil then io.close(f) return true else return false end
end

function GetLrcPath(name)
  return name:gsub("(%..+)$", ".lrc")
end

function open_handler()
        lrcPath = GetLrcPath(mp.get_property("path"))
        if file_exists(lrcPath) then
            mp.set_property("options/sub-files", lrcPath)
        end
end
mp.register_event("start-file", open_handler)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.