diff --git a/videoclip.lua b/videoclip.lua index 560dfd4..bbfe6f9 100644 --- a/videoclip.lua +++ b/videoclip.lua @@ -31,6 +31,18 @@ local encoder local OSD local Timings +local presets = { + ultrafast = true, + superfast = true, + veryfast = true, + faster = true, + fast = true, + medium = true, + slow = true, + slower = true, + veryslow = true, +} + ------------------------------------------------------------ -- utility functions @@ -335,6 +347,10 @@ if not config.audio_bitrate:endswith('k') then config.audio_bitrate = config.audio_bitrate .. 'k' end +if not presets[config.preset] then + config.preset = 'faster' +end + ------------------------------------------------------------ -- Finally, set an 'entry point' in mpv