{"id":17366882,"url":"https://github.com/gabrielrf/video2telegram","last_synced_at":"2025-07-23T06:05:46.292Z","repository":{"id":81480326,"uuid":"149160942","full_name":"GabrielRF/Video2Telegram","owner":"GabrielRF","description":"Watches a folder. If new file, sends gif using Telegram Messenger.","archived":false,"fork":false,"pushed_at":"2021-10-26T15:33:16.000Z","size":365,"stargazers_count":32,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T12:51:10.264Z","etag":null,"topics":["docker","docker-compose","synology","synology-surveillance-station","telegram","telegram-bot-api"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/gabrielrf/video2telegram/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GabrielRF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2018-09-17T17:15:19.000Z","updated_at":"2025-03-25T19:28:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7b29d9c-3f6f-415f-bd2e-988ec566992a","html_url":"https://github.com/GabrielRF/Video2Telegram","commit_stats":{"total_commits":48,"total_committers":2,"mean_commits":24.0,"dds":0.25,"last_synced_commit":"b9c98291bcdeb33b1bd9340e4d5eb45381aa0cec"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/GabrielRF/Video2Telegram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielRF%2FVideo2Telegram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielRF%2FVideo2Telegram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielRF%2FVideo2Telegram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielRF%2FVideo2Telegram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GabrielRF","download_url":"https://codeload.github.com/GabrielRF/Video2Telegram/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielRF%2FVideo2Telegram/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266626115,"owners_count":23958344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["docker","docker-compose","synology","synology-surveillance-station","telegram","telegram-bot-api"],"created_at":"2024-10-15T22:08:20.799Z","updated_at":"2025-07-23T06:05:46.254Z","avatar_url":"https://github.com/GabrielRF.png","language":"Python","readme":"[![](https://dockerbuildbadges.quelltext.eu/status.svg?organization=gabrielrf\u0026repository=video2telegram)](https://hub.docker.com/r/gabrielrf/video2telegram/builds/)\n\n# Video to Telegram\n\n![Dog trying to enter a door with a stick on its mouth](https://media.giphy.com/media/xIsRzrb2F4xgI/giphy.gif)\n\n* [About](#about)\n* [Setup](#setup)\n  * [Docker Compose](#docker-compose)\n  * [Python](#python)\n  * [Synology Docker](#synology-docker)\n* [Example](#example)\n* [Contribute](#contribute)\n* [Contact](#contact-me)\n\n## About\n\nThis docker container checks if a new file is created on a folder and sends it to a person/group/channel using [Telegram Messenger](https://telegram.org).\n\nThe idea behind this project is to send me a gif everytime my camera detects movement. The camera is pointed to my door, this way I can see on real time who is entering or leaving my place. Also, another unexpected benefit of using this project is to have a cloud backup of my camera for free. \n\n## Setup\n\n### Docker Compose\n\n```\nfile2gif:\n    image: gabrielrf/video2telegram\n    environment:\n        - BOT_TOKEN=\n        - FOLDER=/\n        - EXTENSION=mp4\n        - DESTINATION=\n    restart: always\n    volumes:\n        - host_folder:container_folder\n```\n\n`BOT_TOKEN`: Token given by [@BotFather](https://t.me/BotFather) on Telegram.\n\n`FOLDER`: Folder that will be monitored by the script. In case of a folder tree, set the top-level folder.\n\n`EXTENSION`: The extension of the file that should be sent. Usually `mp4` is the case.\n\n`DESTINATION`: To whom the message will be sent.\n\n`volumes`: The same folder used on `FOLDER`:Some folder that exists on the container. Suggested: `/mnt`\n\n### Python\n\nFirst, run \n\n```\npip install inotify\npip install pytelegrambotapi\npip install ffmpy\n```\n\nto install the libraries needed. Then, open `file2gif.py` and make the necessary adjustments on `BOT_TOKEN`, `FOLDER`, `EXTENSION` and `DESTINATION` as listed above. \n\nRun the Python Script.\n\n```\npython file2gif.py\n```\n\n### Synology Docker\n\nOpen the Docker App on your Synology Device. On `Registry`, look for `video2telegram` and double click the result to download the image. \n\n![Synology Registry](img/synology_registry.png)\n\nOn the `Image` tab, check if the download is completed. Once completed, double click the image and set it as follows.\n\n![Synology Container Launch image 1](img/synology_container_1.png)\n\n`Container Name` is optional. `Enable auto-restart` is recommended.\nClick on `Advanced Settings` and go to tab `Volume`. Click on `Add Folder` and find your camera folder. \n\n![Synology Container Launch image 2](img/synology_container_2.png)\n\nClick on `Select`. Go to tab `Environment` and add the variables. Check [Docker Compose](#docker-compose) topic for details. Don't create or change other variables.\n\nYour settings should look similar to this image:\n\n![Synology Container Launch image 3](img/synology_container_3.png)\n\nClick on `Apply` and it should be ready and running.\n\n## Example\n\nThis is a YouTube video with the expected result\n\n[![YouTube video of Video2Telegram](https://img.youtube.com/vi/f4AZRUY2RME/0.jpg)](https://www.youtube.com/watch?v=f4AZRUY2RME)\n\n## Contribute\n\nPull requests and issues are welcome! \n\n## Contact me\n\n[GabRF.com](https://gabrf.com)\n\n[@GabrielRF](https://t.me/gabrielrf) on Telegram.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielrf%2Fvideo2telegram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrielrf%2Fvideo2telegram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielrf%2Fvideo2telegram/lists"}