🕹️ control a PTZ webcam via youtube chat
here is a video of an early prototype in action
it listens to a youtube livestream chat and moves an AXIS PTZ webcam based on chat
you can specify a multiplier to commands
do this by adding a number after the chat command
eg:
“r 2” moves twice the distance that “r” does
“+5” moves 5 times the distance that “+” does
note: if the multiplier is too large the camera will return an error (specific limits here on p20)
node bot.js <youtube video id> <api key> <url> <debug>
eg: node bot.js Zs_P316OXxm XXXXXXXXXXXXXXXXXXXXXXXXXXXXX 123.456.789
this listens on https://www.youtube.com/watch?v=Zs_P316OXxm, uses api key XXX…, and sends PTZ commands to 123.456.789
this will make around 1 request per second. this can be changed by changing the var chatRefreshTimeout
located at the top of the file
submit an issue on my github