Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koushikphy/telespy
Take Photo/Audio/Video from webcam by remotely controlling it using a Telegram bot.
https://github.com/koushikphy/telespy
audio opencv opencv-python pyaudio pytelegrambotapi python python-telegram-bot screenshot telegram telegram-bot video webcam
Last synced: 10 days ago
JSON representation
Take Photo/Audio/Video from webcam by remotely controlling it using a Telegram bot.
- Host: GitHub
- URL: https://github.com/koushikphy/telespy
- Owner: Koushikphy
- Created: 2022-02-27T20:14:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-28T14:44:41.000Z (6 months ago)
- Last Synced: 2024-10-12T18:07:52.761Z (25 days ago)
- Topics: audio, opencv, opencv-python, pyaudio, pytelegrambotapi, python, python-telegram-bot, screenshot, telegram, telegram-bot, video, webcam
- Language: Python
- Homepage:
- Size: 68.4 KB
- Stars: 13
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
## Telegram Spy Bot
Take Photo/Audio/Video from webcam by remotely controlling it using a Telegram bot.
### Installation & Usage:
1. Clone this repo.
1. Create `.env` file in the same directory and put `TOKEN=` and `ALLOWED_USERS=` in the file
1. Activate the virtual environment with `pipenv shell` and install dependencies with `pipenv install`. Make sure `pipenv` is installed.
1. Download and install the `ffmpeg` library for video processing. The `ffmpeg` executable should be available in the path.
2. Start the bot with `pipenv run bot`
1. Available commands
1. `/photo` - Take photo
2. `/audio` - Take audio
3. `/video` - Take video
1. A mega account is also needed to upload larger files and accordingly the mega account credentials need to be put in the .env file. (Otherwise just comment out the relavant lines in the `telegramBot.py` file).**NOTE:**
1. Telegram free account does not allow to share files larger than 50 MB. Thus, for larger recording, file will only be uploaded to Mega server and the link will be shared.
2. Proper audio and video sources need to be supplied to the recorder to record video and audio without any issue. To find available audio/video sources in your system, you can checkout this https://koushikphy.github.io/linux/ffmpeg_setup_ubuntu/
3. If different devices are used for video and audio recording, then there may be some sync issue.
4. Current codebase uses a polling method for the bot to communicate with the telegram server, for a production level solution a webhook should be used.
5. A smaple `.env` file is also provided in [env_sample](./.env_sample) (All inputs are imaginary here).