Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function write_file(video, timestamp, subs)
- file = io.open("C:\\users\\desu\\desktop\\subs.txt", "a")
- file:write("##########################################\n")
- file:write(video .. "|" .. timestamp .."\n".. subs .. "\n")
- file:close()
- end
- function subs2file()
- local subtext = mp.get_property("sub-text","")
- local timestamp = mp.get_property("time-pos")
- local video = mp.get_property('filename')
- write_file(video, timestamp, subtext)
- mp.osd_message("Copied subs to file ", 2)
- end
- mp.add_key_binding("a", "subs2file", subs2file)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement