git.iko.soy/typeable/nixpkgs
on master help sign in
mpvScripts.convert: fix for mpv >0.26.0

See https://gist.github.com/Zehkul/25ea7ae77b30af959be0#gistcomment-2189556

commitb35972b3fa4e844accc01a87b5b8d1e6676d16bd authorProfpatsch <mail@profpatsch.de> dateThu 31 Aug 2017, 01:21 (9 years ago) parent11753b3
1 file changed+15
pkgs/applications/video/mpv/scripts/convert.patch+15
pkgs/applications/video/mpv/scripts/convert.patch+15
@@ -11,6 +11,21 @@
1111 -- default options, convert_script.conf is read
1212 local options = {
1313 bitrate_multiplier = 0.975, -- to make sure the file won’t go over the target file size, set it to 1 if you don’t care
14+@@ -247,12 +247,12 @@
15+ if string.len(vf) > 0 then
16+ vf = vf .. ","
17+ end
18+- local sub_file_table = mp.get_property_native("options/sub-file")
19++ local sub_file_table = mp.get_property_native("options/sub-files")
20+ local sub_file = ""
21+ for index, param in pairs(sub_file_table) do
22+ sub_file = sub_file .. " --sub-file='" .. string.gsub(tostring(param), "'", "'\\''") .. "'"
23+ end
24+- local audio_file_table = mp.get_property_native("options/audio-file")
25++ local audio_file_table = mp.get_property_native("options/audio-files")
26+ local audio_file = ""
27+ for index, param in pairs(audio_file_table) do
28+ audio_file = audio_file .. " --audio-file='" .. string.gsub(tostring(param), "'", "'\\''") .. "'"
1429@@ -354,9 +358,9 @@
1530 if ovc == "gif" then
1631 full_command = full_command .. ' --vf-add=lavfi=graph=\\"framestep=' .. framestep .. '\\" && convert '