@@ -42,13 +42,13 @@ function expand_output_path(cropbox)
42
42
local playback_time = mp .get_property_native (" playback-time" )
43
43
local duration = mp .get_property_native (" duration" )
44
44
45
- local filename_without_ext , extension = split_extension ( filename )
45
+ local filename_without_ext , extension = filename : match ( " ^(.+)%.(.-)$ " )
46
46
47
47
local properties = {
48
48
path = mp .get_property_native (" path" ), -- Original path
49
49
50
- filename = filename_without_ext , -- Filename without extension
51
- file_ext = extension , -- Original extension without leading dot (or empty string)
50
+ filename = filename_without_ext or filename , -- Filename without extension (or filename if no dots
51
+ file_ext = extension or " " , -- Original extension without leading dot (or empty string)
52
52
53
53
pos = mp .get_property_native (" playback-time" ),
54
54
@@ -111,8 +111,8 @@ function screenshot(crop)
111
111
-- Optionally create directories
112
112
if option_values .create_directories then
113
113
local paths = {}
114
- paths [1 ] = split_path (output_path )
115
- paths [2 ] = split_path (temporary_screenshot_path )
114
+ paths [1 ] = path_utils . dirname (output_path )
115
+ paths [2 ] = path_utils . dirname (temporary_screenshot_path )
116
116
117
117
-- Check if we can read the paths
118
118
for i , path in ipairs (paths ) do
@@ -162,6 +162,7 @@ function screenshot(crop)
162
162
local cmd = {
163
163
args = {
164
164
" mpv" , input_path ,
165
+ " --no-config" ,
165
166
" --vf=crop=" .. crop_string ,
166
167
" --frames=1" ,
167
168
" --ovc=" .. option_values .output_format ,
0 commit comments