"/webcam" nutzt nun fswebcam (Bessere Bildqualität)

This commit is contained in:
Akamaru 2016-06-02 16:10:03 +02:00
parent a3a185abdb
commit 14f9064c6f
1 changed files with 3 additions and 3 deletions

View File

@ -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