cjbassi / swaylock-blur

A small Rust program that runs swaylock and sets the image to a blurred screenshot of the desktop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

using ffmpeg instead of imagemagick

imr0 opened this issue · comments

commented

Hi,

I am experimenting with a similar script as well, and found that for me doing a Gaussian blur on the screenshot with ffmpeg instead of imagemagick is significantly faster.

My not-so-sophisticated script that highlights my point:
grim -t jpeg /tmp/screenshot.jpg && ffmpeg -loglevel panic -y -i /tmp/screenshot.jpg -vf "gblur=sigma=50" /tmp/blur.jpg && swaylock -i /tmp/blur.jpg

Maybe it's worth considering using this.

Thanks! I noticed it was a lot faster for me too so I just switched over. I also added a --blur-sigma flag to control the blur since that was easy to add with ffmpeg now.