Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions script-opts/blur_edges.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ watch_later_fix=no

# only apply the blur effect when mpv is set to fullscreen
only_fullscreen=yes

# This script will likely not work with hardware decoding, therefore disable it
# when activating the blur
disable_hwdec=yes
8 changes: 8 additions & 0 deletions scripts/blur-edges.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ local opts = {
reapply_delay = 0.5,
watch_later_fix = false,
only_fullscreen = true,
disable_hwdec = true,
}
options.read_options(opts)

Expand Down Expand Up @@ -127,7 +128,14 @@ function toggle()
active = false
unset_blur()
mp.unobserve_property(reset_blur)
if opts.disable_hwdec then
mp.set_property("hwdec", orig_value_hwdec)
end
else
if opts.disable_hwdec then
orig_value_hwdec = mp.get_property("hwdec")
mp.set_property("hwdec", "no")
end
active = true
set_blur()
local properties = { "osd-width", "osd-height", "path", "fullscreen" }
Expand Down