diff --git a/plugins/sh.lua b/plugins/sh.lua index 46520a1..e950633 100644 --- a/plugins/sh.lua +++ b/plugins/sh.lua @@ -20,10 +20,10 @@ function run(msg, matches) return 'Screenshot wird gesendet!' end - -- Requires ffmpeg (sudo apt-get install ffmpeg) + -- Requires fswebcam (sudo apt-get install fswebcam) if string.match(msg.text, '^/[Ww][Ee][Bb][Cc][Aa][Mm]$') then - text = run_bash("ffmpeg -f video4linux2 -s 640x480 -r 1 -i /dev/video0 -vframes 1 -f image2 ~/Mikubot/tmp/webcam.jpg -y") - send_photo(get_receiver(msg), "tmp/webcam.jpg", ok_cb, false) + text = run_bash("fswebcam -r 640x480 --png 9 -D 1 ~/Mikubot/tmp/webcam.png") + send_photo(get_receiver(msg), "tmp/webcam.png", ok_cb, false) end -- You need to disable sudo password