{"id":26426423,"url":"https://github.com/pavelsr/camshotbot_old","last_synced_at":"2026-05-14T20:31:52.471Z","repository":{"id":67319315,"uuid":"80346886","full_name":"pavelsr/camshotbot_old","owner":"pavelsr","description":"Telegram bot that send you a snapshot from IP camera using ffmpeg","archived":false,"fork":false,"pushed_at":"2017-06-03T09:03:38.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-03T12:45:46.619Z","etag":null,"topics":["bot","ffmpeg","ip-camera","telegram-bot","vpn"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pavelsr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-29T13:16:52.000Z","updated_at":"2023-03-06T18:20:20.000Z","dependencies_parsed_at":"2023-06-10T20:15:32.939Z","dependency_job_id":null,"html_url":"https://github.com/pavelsr/camshotbot_old","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pavelsr/camshotbot_old","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavelsr%2Fcamshotbot_old","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavelsr%2Fcamshotbot_old/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavelsr%2Fcamshotbot_old/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavelsr%2Fcamshotbot_old/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pavelsr","download_url":"https://codeload.github.com/pavelsr/camshotbot_old/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavelsr%2Fcamshotbot_old/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33042122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","ffmpeg","ip-camera","telegram-bot","vpn"],"created_at":"2025-03-18T03:29:52.245Z","updated_at":"2026-05-14T20:31:52.466Z","avatar_url":"https://github.com/pavelsr.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"Telegram bot that send you a snapshot from IP camera using ffmpeg\n\nIn addition sends random funny phrase as shapshot caption from random key of camshotbot.conf\n\n# Setup\n\n## 1. Install ffmpeg\n\n``sudo apt-get install ffmpeg``\n\n\n## 2. Install dependencies\n\ngo to root bot folder and run  ``sudo cpanm --installdeps .``\n\nIf you don't have cpanm at your system install it with:  ``sudo cpan App::cpanminus``\n\n\n## 3. Check that camera is available\n\nBot requires that you must be able to get a screenshot from camera on server where bot is running by single command\n\nBot was created specially for @FabLab61.\n\nAt @FabLab61 there is an Xiaomi YI Ants IP webcamera. \n\nServer has access to camera via VPN so we can get a screenshot using ffmpeg by following command:\n\n``ffmpeg -hide_banner -loglevel panic -i rtsp://10.132.193.9//ch0.h264 -f image2 -vframes 1 test.jpg``\n\nYou can execute this command locally to check camera\n\nAlso you can open a stream url (like ``rtsp://10.132.193.9//ch0.h2640``) in vlc to check that speed of video straming is enough and delay isn't so big \n\n\n## 4. Edit camshotbot.conf\n\nExample:\n\n```perl\n{\n  hypnotoad =\u003e {\n    listen  =\u003e ['http://*:8099']\n  },\n  random =\u003e [\n    \"How beautiful FabLab looks like, isnt it?\",\n    \"Don't be a dick, clean up that mess!\",\n    \"Common sense is not so common... ;)\",\n   \t\"Just do it\",\n   \t\"We make porn here\",\n   \t\"FabLab is priceless, for other things we have MasterCard\",\n   \t\"Don't judge a book by its cover\",\n   \t\"There will be clean when pigs fly\",\n   \t\"Space where you can wear your heart on your sleeve\",\n   \t\"Silicon Valley for hardware\",\n   \t\"Do-ocracy born here\",\n   \t\"Don't govern. Just do\",\n   \t\"Fuck a day keeps the doctor away\",\n   \t\"Quick and dirty\",\n   \t\"Curiosity killed the cat\",\n   \t\"FabLab - pushing the envelope\",\n   \t\"FabLab - where the bodies are buried\",\n   \t\"Learn by doing\",\n   \t\"Life is short. Do stuff that matters\"\n  ],\n  telegram_api_token =\u003e '267111731:AAHJSqyyjbVBh0pAOr677WoUxi-juMpWKto',\n  polling =\u003e 0,\t\t# set to 0 if you want to work via webhooks\n  polling_timeout =\u003e 3,\n  last_shot_filename =\u003e 'latest.jpg',\n  vpn_ip =\u003e '10.132.193.9', # for /status output\n  stream_url =\u003e 'rtsp://10.132.193.9//ch0.h264',\n  bot_domain =\u003e 'https://camerabot.fablab61.ru', # needed for webhooks. must be https\n  log_file =\u003e 'log/production.log',\n  debug =\u003e 1\n};\n\n```\n\n## 5. Run bot with hypnotoad\n\n``hyphotoad camshotbot.pl``\n\n\n## 6. Setup webhooks\n\n1. Get bot available via http at some domain\n\n2. Run domain over https only with Let's encrypt\n\n``a@FabServer:~# sudo ./certbot-auto --nginx -d camerabot.fablab61.ru``\n\n3. Check that ``bot_domain`` set at camshotbot.conf\n\n4. Run get request ``camshotbot.pl get /setwebhook`` (or do it via web browser)\n\n\n# Development guidelines\n\nIf using polling in order to avoid getting duplicate updates, recalculate offset after each server response\n\n\n\n\n# FAQ\n\n## Why my bot isn't working or working with errors?\n\nCheck ``camshotbot.pl get /setwebhook`` output. It will show potential problems with VPN or Telegram API\n\nNormally result must be like\n\n```javascript\n{\"telegram_api\":{\"ok\":true,\"result\":{\"first_name\":\"FabLab61 get camshot\",\"id\":267111731,\"username\":\"camshot_bot\"}},\"vpn_status\":\"up\"}\n```\n\nAlso you can check\n\n\u003cbot_domain\u003e/webtail page\n\nand files in ``log`` folder using ``tail -f`` option\n\n\n## Can I use non IP camera?\n\nYes. For that you need to edit ``$cmd`` variable\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpavelsr%2Fcamshotbot_old","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpavelsr%2Fcamshotbot_old","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpavelsr%2Fcamshotbot_old/lists"}