From f75aa07b158106edb7c7378d055768c9385ca475 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Sat, 4 Mar 2023 04:23:18 +0300 Subject: [PATCH] Fix container: universal matroska container for all types media --- src/mpv_scripts/mpv_cache.lua | 4 ++-- src/mpv_scripts/streamsave.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mpv_scripts/mpv_cache.lua b/src/mpv_scripts/mpv_cache.lua index 083339d..fa412c2 100644 --- a/src/mpv_scripts/mpv_cache.lua +++ b/src/mpv_scripts/mpv_cache.lua @@ -28,13 +28,13 @@ function make_cache_track(url) find_uuid = "%x+-%x+-%x+-%x+-%x+" uuid = string.sub(url, string.find(url, find_uuid)) host = get_url_host(url) - cache_path_file = 'cache/' .. host .. '/' .. uuid .. '.webm' + cache_path_file = 'cache/' .. host .. '/' .. uuid .. '.mkv' if false == file_exists(cache_path_file) then createDir('cache/' .. host .. '/') msg.verbose('Caching ' .. cache_path_file .. '') mp.command('script-message streamsave-title ' .. uuid .. '') mp.set_property('script-opts/media-uuid', uuid) - mp.command('script-message streamsave-extension .webm') + mp.command('script-message streamsave-extension .mkv') mp.command('script-message streamsave-path cache/' .. host .. '') mp.command('script-message streamsave-rec') else diff --git a/src/mpv_scripts/streamsave.lua b/src/mpv_scripts/streamsave.lua index 9a77357..fe69b11 100644 --- a/src/mpv_scripts/streamsave.lua +++ b/src/mpv_scripts/streamsave.lua @@ -124,7 +124,7 @@ local opts = { save_directory = [[.]], -- output file directory dump_mode = "continuous", -- output_label = "overwrite", -- - force_extension = ".webm", -- extension will be .ext if set + force_extension = ".mkv", -- extension will be .ext if set force_title = "no", -- custom title used for the filename range_marks = false, -- set chapters at A-B loop points? autostart = true, -- automatically dump cache at start?