telegram-video-repurpose-bot 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. telegram_video_repurpose_bot-0.1.0/LICENSE +9 -0
  2. telegram_video_repurpose_bot-0.1.0/PKG-INFO +314 -0
  3. telegram_video_repurpose_bot-0.1.0/README.md +284 -0
  4. telegram_video_repurpose_bot-0.1.0/pyproject.toml +138 -0
  5. telegram_video_repurpose_bot-0.1.0/requirements.txt +5 -0
  6. telegram_video_repurpose_bot-0.1.0/setup.cfg +4 -0
  7. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/__init__.py +5 -0
  8. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/_version.py +1 -0
  9. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/app/__init__.py +0 -0
  10. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/app/app_users.py +70 -0
  11. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/bot/__init__.py +0 -0
  12. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/bot/bot_base.py +173 -0
  13. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/bot/bot_config.py +187 -0
  14. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/bot/bot_config_manager.py +70 -0
  15. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/bot/bot_config_types.py +54 -0
  16. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/bot/bot_handlers_config.py +78 -0
  17. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/bot/bot_handlers_config_typing.py +35 -0
  18. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/callback/__init__.py +0 -0
  19. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/callback/callback_query_dispatcher.py +105 -0
  20. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/command/__init__.py +0 -0
  21. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/command/command_base.py +138 -0
  22. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/command/command_data.py +246 -0
  23. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/command/command_decorator.py +74 -0
  24. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/command/command_dispatcher.py +89 -0
  25. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/command/command_types.py +29 -0
  26. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/command/commands.py +57 -0
  27. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/command/param_setter_cmd_base.py +145 -0
  28. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/config/__init__.py +0 -0
  29. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/config/config_object.py +78 -0
  30. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/config/config_typing.py +41 -0
  31. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/config/loader/__init__.py +0 -0
  32. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/config/loader/config_loader_ex.py +26 -0
  33. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/config/loader/config_section_loader.py +118 -0
  34. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/config/loader/config_sections_file_loader.py +49 -0
  35. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/config/loader/config_sections_loader.py +58 -0
  36. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/config/saver/__init__.py +0 -0
  37. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/config/saver/config_section_saver.py +80 -0
  38. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/config/saver/config_sections_file_saver.py +62 -0
  39. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/config/saver/config_sections_saver.py +57 -0
  40. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/__init__.py +0 -0
  41. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/ffmpeg_config.py +479 -0
  42. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/ffmpeg_config_manager.py +72 -0
  43. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/ffmpeg_config_types.py +98 -0
  44. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/__init__.py +0 -0
  45. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/abitrate_filter.py +83 -0
  46. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/acontrast_filter.py +72 -0
  47. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/aecho_filter.py +89 -0
  48. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/atempo_filter.py +72 -0
  49. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/audio_filter_applier.py +75 -0
  50. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/colorbalance_filter.py +107 -0
  51. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/colorcorrect_filter.py +100 -0
  52. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/crop_filter.py +83 -0
  53. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/eq_filter.py +89 -0
  54. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/filter_base.py +353 -0
  55. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/filter_list.py +112 -0
  56. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/filters_params.py +103 -0
  57. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/filters_params_generator.py +62 -0
  58. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/fps_filter.py +72 -0
  59. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/hflip_filter.py +63 -0
  60. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/noise_filter.py +113 -0
  61. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/output_format_filter.py +84 -0
  62. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/scale_filter.py +96 -0
  63. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/smartblur_filter.py +84 -0
  64. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/tempo_filter.py +74 -0
  65. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/vbitrate_filter.py +83 -0
  66. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/ffmpeg/filter/video_filter_applier.py +75 -0
  67. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/lang/lang_en.xml +149 -0
  68. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/logger/__init__.py +0 -0
  69. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/logger/logger.py +121 -0
  70. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/menu/__init__.py +0 -0
  71. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/menu/menu_base.py +202 -0
  72. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/menu/menu_btn.py +61 -0
  73. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/menu/menu_btn_builder.py +144 -0
  74. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/menu/menu_message_sender.py +279 -0
  75. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/menu/menu_state_base.py +135 -0
  76. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/menu/menu_state_params.py +127 -0
  77. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/menu/menu_state_types.py +30 -0
  78. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/message/__init__.py +0 -0
  79. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/message/message_deleter.py +81 -0
  80. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/message/message_dispatcher.py +172 -0
  81. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/message/message_editer.py +76 -0
  82. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/message/message_sender.py +149 -0
  83. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/misc/__init__.py +0 -0
  84. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/misc/helpers.py +154 -0
  85. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/translator/__init__.py +0 -0
  86. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/translator/translation_loader.py +122 -0
  87. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/__init__.py +0 -0
  88. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/helper/__init__.py +0 -0
  89. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/helper/user_menu_btn_builder.py +144 -0
  90. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/__init__.py +0 -0
  91. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/base/__init__.py +0 -0
  92. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/base/user_menu_params.py +45 -0
  93. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/base/user_menu_state_base.py +317 -0
  94. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/base/user_menu_state_types.py +53 -0
  95. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/config/__init__.py +0 -0
  96. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/config/config_bot_access_add_state.py +115 -0
  97. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/config/config_bot_access_remove_state.py +122 -0
  98. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/config/config_bot_access_state.py +119 -0
  99. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/config/config_filter_action_select_state.py +104 -0
  100. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/config/config_filter_param_set_value_state.py +277 -0
  101. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/config/config_filter_param_toggle_state.py +128 -0
  102. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/config/config_filter_param_type_select_state.py +97 -0
  103. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/config/config_filter_params_manage_state.py +149 -0
  104. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/config/config_filter_type_select_state.py +116 -0
  105. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/config/config_init_state.py +78 -0
  106. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/config/config_main_menu_state.py +116 -0
  107. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/others/__init__.py +0 -0
  108. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/others/info_bot_state.py +86 -0
  109. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/others/result_state.py +120 -0
  110. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/others/start_menu_state.py +112 -0
  111. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/video/__init__.py +0 -0
  112. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/video/repurpose_video_completed.py +103 -0
  113. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/video/repurpose_video_init.py +78 -0
  114. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/video/repurpose_video_process.py +123 -0
  115. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/video/repurpose_video_send.py +130 -0
  116. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/state/video/repurpose_video_start.py +99 -0
  117. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/user_menu/user_menu.py +162 -0
  118. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/utils/__init__.py +0 -0
  119. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/utils/key_value_converter.py +69 -0
  120. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/utils/utils.py +205 -0
  121. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/utils/wrapped_dict.py +235 -0
  122. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/utils/wrapped_list.py +129 -0
  123. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/video/__init__.py +0 -0
  124. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/video/ivideo_processor.py +47 -0
  125. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/video/video_processor.py +202 -0
  126. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/video/video_processor_ex.py +29 -0
  127. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot/video_repurpose_bot.py +50 -0
  128. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot.egg-info/PKG-INFO +314 -0
  129. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot.egg-info/SOURCES.txt +130 -0
  130. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot.egg-info/dependency_links.txt +1 -0
  131. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot.egg-info/requires.txt +5 -0
  132. telegram_video_repurpose_bot-0.1.0/telegram_video_repurpose_bot.egg-info/top_level.txt +2 -0
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Emanuele Bellocchia
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,314 @@
1
+ Metadata-Version: 2.4
2
+ Name: telegram_video_repurpose_bot
3
+ Version: 0.1.0
4
+ Summary: Telegram bot for repurposing & uniquing videos
5
+ Author-email: Emanuele Bellocchia <ebellocchia@gmail.com>
6
+ Maintainer-email: Emanuele Bellocchia <ebellocchia@gmail.com>
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://github.com/ebellocchia/telegram_video_repurpose_bot
9
+ Project-URL: Download, https://github.com/ebellocchia/telegram_video_repurpose_bot/archive/v{version}.tar.gz
10
+ Keywords: telegram,bot,telegram bot,video,repurpose,uniquing,video repurpose,video uniquing,video processing
11
+ Classifier: Programming Language :: Python :: 3.7
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Development Status :: 5 - Production/Stable
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Intended Audience :: Developers
21
+ Requires-Python: >=3.7
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: pyrotgfork
25
+ Requires-Dist: pytgcrypto
26
+ Requires-Dist: defusedxml
27
+ Requires-Dist: ffmpeg-python
28
+ Requires-Dist: typing_extensions
29
+ Dynamic: license-file
30
+
31
+ # Telegram Video Repurpose & Uniquing Bot
32
+
33
+ ## Introduction
34
+
35
+ Telegram bot based on *pyrotgfork* (a maintained fork of the *pyrogram* library).
36
+
37
+ This bot was originally developed as a commissioned project for social media content management.
38
+ While the original project is no longer active, this version has been updated and streamlined for public use.
39
+
40
+ ### Project Purpose
41
+
42
+ The core concept of the bot is video uniquing.
43
+
44
+ The bot processes an input video and applies subtle *FFmpeg* filters to generate technically unique versions of the same file.
45
+ This allows users to post the same content multiple times across different social media accounts (such as TikTok or Instagram) while minimizing the risk of duplicate content flags or automated bans.
46
+
47
+ ### How It Works
48
+
49
+ Instead of applying static filters, the bot uses a system of controlled randomization:
50
+ - The user defines a range (minimum/maximum) for each supported *FFmpeg parameter*.
51
+
52
+ While the bot currently supports a small subset of filters selected for content uniquing, the codebase is structured to be modular, making it easy to add new filters as needed.
53
+ - Every time a video is processed, the bot generates a random value within that specified range for each filter.
54
+ - Consequently, every output video is technically unique, even when starting from the same source file.
55
+
56
+ ### Key Features
57
+
58
+ - User-Friendly Interface: Designed with non-technical users in mind, the bot is fully managed via a button-based GUI.
59
+ - Direct Processing: In this version, videos are sent directly to the bot within the Telegram chat (automatic downloading from TikTok/Instagram URLs has been removed to ensure easier maintenance).
60
+ - Role-Based Access Control:
61
+ - Administrators: Can manage user permissions (i.e. add/remove creators) and modify the audio/video parameters.
62
+ - Creators: Can only process videos using the pre-configured settings.
63
+
64
+ ### Video Example
65
+
66
+ <video src="https://github.com/user-attachments/assets/7be57b6c-aa1c-4fcd-9f05-c52722df7a50" width="50%">
67
+ </video>
68
+
69
+ ## Setup
70
+
71
+ ### Create Telegram app
72
+
73
+ In order to use the bot, you need a Telegram bot token, an API ID, and an API hash.
74
+
75
+ To obtain them, create an app on the following website: [https://my.telegram.org/apps](https://my.telegram.org/apps).
76
+
77
+ ### Installation
78
+
79
+ This package requires **Python >= 3.7**.
80
+
81
+ 1. **Install FFmpeg:**
82
+ The bot requires *FFmpeg* to be installed and available in the system (i.e. added to the system `PATH`).
83
+
84
+ Please refer to the [official download page](https://ffmpeg.org/download.html) for installation instructions.
85
+
86
+ To verify the installation, open a terminal and run: `ffmpeg -version`
87
+
88
+ If the command returns version information, *FFmpeg* is correctly set up. Example output (truncated):
89
+
90
+ ```
91
+ ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
92
+ ```
93
+
94
+ 2. **Set up a virtual environment (optional but recommended)**:
95
+
96
+ ```
97
+ python -m venv venv
98
+ source venv/bin/activate # On Windows use: venv\Scripts\activate
99
+ ```
100
+
101
+ 3. **Install the bot:**
102
+
103
+ ```
104
+ pip install telegram_video_repurpose_bot
105
+ ```
106
+
107
+ **IMPORTANT NOTE:** This bot uses *pyrotgfork*. If you are not using a virtual environment, ensure that the standard *pyrogram* library (or forks) is not installed in your Python environment.
108
+ Since both libraries use the same package name, having both installed will cause conflicts and the bot will not function correctly.
109
+
110
+ 4. **Set up the bot:**
111
+ Copy the **app** folder from the repository to your device. Edit the configuration file by specifying your API ID, API hash, bot token, and other parameters according to your needs (see the "Configuration" chapter).
112
+ 5. **Run the bot:**
113
+ Inside the **app** folder, launch the **bot_start.py** script to start the bot:
114
+
115
+ ```
116
+ python bot_start.py
117
+ ```
118
+
119
+ ---
120
+
121
+ #### Custom Configuration
122
+
123
+ When run without parameters, the bot uses **conf/config.ini** as the default configuration file. To specify a different configuration file, use:
124
+
125
+ ```
126
+ python bot_start.py -c another_conf.ini
127
+ ```
128
+
129
+ or:
130
+
131
+ ```
132
+ python bot_start.py --config another_conf.ini
133
+ ```
134
+
135
+ This allows you to manage different bots easily, each one with its own configuration file.
136
+
137
+ ### Code analysis
138
+
139
+ To run code analysis:
140
+
141
+ ```
142
+ mypy .
143
+ ruff check .
144
+ ```
145
+
146
+ ## Configuration
147
+
148
+ ### Bot Configuration
149
+
150
+ An example of bot configuration file is provided in the *app* folder: **app/conf/config.ini**.
151
+
152
+ The full list of configurable fields is documented below.
153
+
154
+ | Name | Description |
155
+ | --- | --- |
156
+ | **[pyrogram]** | *Configuration for pyrogram* |
157
+ | `session_name` | Path of the file used to store the session. |
158
+ | `api_id` | API ID from [https://my.telegram.org/apps](https://my.telegram.org/apps). |
159
+ | `api_hash` | API hash from [https://my.telegram.org/apps](https://my.telegram.org/apps). |
160
+ | `bot_token` | Bot token from *BotFather*. |
161
+ | **[app]** | *Configuration for app* |
162
+ | `app_support` | Username of the user to contact for support in case of bot errors. |
163
+ | `app_admin_users` | List of usernames of admin users (see "User Roles"). |
164
+ | `app_auth_users` | List of usernames of authorized users (see "User Roles"). |
165
+ | `app_lang_file` | Path of custom language file in XML format (default: English). |
166
+ | **[video]** | *Configuration for videos* |
167
+ | `video_max_processes` | Maximum number of FFmpeg processes that can be active at the same time. |
168
+ | `video_download_folder` | Path of the folder where downloaded videos are stored (default: `video/download/`). Path must be existent, an error will be triggered if not existent. |
169
+ | `video_download_delete_file` | True to delete downloaded video, false otherwise (default: `true`) |
170
+ | `video_process_folder` | Path of the folder where processed videos are stored (default: `video/proc/`). Path must be existent, an error will be triggered if not existent. |
171
+ | `video_process_delete_file` | True to delete processed video, false otherwise (default: `true`) |
172
+ | `video_ffmpeg_params_file` | Path of the *ffmpeg* configuration file (default: `conf/ffmpeg_params.ini`). |
173
+ | `video_ffmpeg_filters_doc_url` | URL with FFmpeg filter documentation (default: `https://ffmpeg.org/ffmpeg-filters.html`) |
174
+ | **[logging]** | *Configuration for logging* |
175
+ | `log_level` | Log level, same as python logging (`DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`). Default: `INFO`. |
176
+ | `log_console_enabled` | True to enable logging to console, false otherwise (default: `true`) |
177
+ | `log_file_enabled` | True to enable logging to file, false otherwise (default: `false`). If false, the following fields will be ignored. |
178
+ | `log_file_name` | Log file name |
179
+ | `log_file_use_rotating` | True to use a rotating log file, false otherwise |
180
+ | `log_file_max_bytes` | Maximum size in bytes for a log file. When reached, a new log file is created up to `log_file_backup_cnt`. Only valid if `log_file_use_rotating` is true. |
181
+ | `log_file_backup_cnt` | Maximum number of log files. Only valid if `log_file_use_rotating` is true. |
182
+ | `log_file_append` | True to append to the log file, false to start fresh each time. Only valid if `log_file_use_rotating` is false. |
183
+
184
+ ### FFmpeg Configuration
185
+
186
+ The file **app/conf/ffmpeg_params.ini** serves as the baseline for *FFmpeg* configuration.
187
+ It contains the default enable flags and ranges (min/max values) for all supported filters.
188
+
189
+ **NOTE:** Since *FFmpeg* parameters can be updated directly via bot GUI, manual editing of this file is generally unnecessary.
190
+
191
+ The full list of configurable fields is documented below.
192
+
193
+ | Parameter | Description |
194
+ | --- | --- |
195
+ | **[ffmpeg_audio]** | *Audio* |
196
+ | `ffmpeg_abitrate_enabled` | Enable/disable audio bitrate control. |
197
+ | `ffmpeg_abitrate_min / max` | Target audio bitrate range (in bits/s). |
198
+ | `ffmpeg_acontrast_enabled` | Enable/disable the audio contrast filter. |
199
+ | `ffmpeg_acontrast_min / max` | Range for audio contrast expansion/compression. |
200
+ | `ffmpeg_aecho_enabled` | Enable/disable the audio echo effect. |
201
+ | `ffmpeg_aecho_in_gain_min / max` | Range for input signal volume (gain). |
202
+ | `ffmpeg_aecho_out_gain_min / max` | Range for output signal volume (gain). |
203
+ | `ffmpeg_aecho_delays_min / max` | Range for echo delay in milliseconds. |
204
+ | `ffmpeg_aecho_decays_min / max` | Range for echo decay factors. |
205
+ | **[ffmpeg_common]** | *Common* |
206
+ | `ffmpeg_verbosity` | Verbosity level for FFmpeg (default: `error`), same of FFmpeg `-loglevel`. |
207
+ | `ffmpeg_tempo_enabled` | Enable/disable playback speed adjustment (without pitch shift). |
208
+ | `ffmpeg_tempo_min / max` | Speed multiplier range (e.g., 0.96x to 1.04x). |
209
+ | **[ffmpeg_video]** | *Video* |
210
+ | `ffmpeg_colorbalance_enabled` | Enable/disable color balance adjustments. |
211
+ | `ffmpeg_colorbalance_rgbs_min / max` | Range for Red, Green, and Blue shadows. |
212
+ | `ffmpeg_colorbalance_rgbm_min / max` | Range for Red, Green, and Blue midtones. |
213
+ | `ffmpeg_colorbalance_rgbh_min / max` | Range for Red, Green, and Blue highlights. |
214
+ | `ffmpeg_colorcorrect_enabled` | Enable/disable the color correction filter. |
215
+ | `ffmpeg_colorcorrect_rbl_min / max` | Range for red/blue components in lowlights. |
216
+ | `ffmpeg_colorcorrect_rbh_min / max` | Range for red/blue components in highlights. |
217
+ | `ffmpeg_crop_enabled` | Enable/disable video cropping. |
218
+ | `ffmpeg_crop_h_min / max` | Range for height pixels to be cropped. |
219
+ | `ffmpeg_crop_w_min / max` | Range for width pixels to be cropped. |
220
+ | `ffmpeg_eq_enabled` | Enable/disable the equalizer (Brightness, Contrast, Saturation, Gamma). |
221
+ | `ffmpeg_eq_contrast_min / max` | Range for video contrast adjustment. |
222
+ | `ffmpeg_eq_brightness_min / max` | Range for video brightness adjustment. |
223
+ | `ffmpeg_eq_saturation_min / max` | Range for color saturation intensity. |
224
+ | `ffmpeg_eq_gamma_min / max` | Range for gamma correction. |
225
+ | `ffmpeg_fps_enabled` | Enable/disable forced output frame rate (FPS). |
226
+ | `ffmpeg_fps_min / max` | Range for target frames per second. |
227
+ | `ffmpeg_hflip_enabled` | Enable/disable horizontal flip (mirror effect). |
228
+ | `ffmpeg_noise_enabled` | Enable/disable artificial video noise. |
229
+ | `ffmpeg_noise_allf` | Noise flags (e.g., `a+p+u` for all planes/uniform noise). |
230
+ | `ffmpeg_noise_alls_min / max` | Range for noise seed/intensity. |
231
+ | `ffmpeg_output_format` | Defines the output video codec (possible values: `h264`, `libx265`, `h264_nvenc`, `hevc_nvenc`). |
232
+ | `ffmpeg_scale_enabled` | Enable/disable video resizing. |
233
+ | `ffmpeg_scale_algo` | Scaling algorithm used (possible values: `fast_bilinear`, `bilinear`, `bicubic`, `neighbor`, `area`, `bicublin`, `gauss`, `spline`). |
234
+ | `ffmpeg_scale_w / h` | Target output resolution (Width x Height). |
235
+ | `ffmpeg_smartblur_enabled` | Enable/disable the smart blur filter. |
236
+ | `ffmpeg_smartblur_lr_min / max` | Range for luma radius. |
237
+ | `ffmpeg_smartblur_ls_min / max` | Range for luma strength. |
238
+ | `ffmpeg_smartblur_lt_min / max` | Range for luma threshold. |
239
+ | `ffmpeg_vbitrate_enabled` | Enable/disable video bitrate control. |
240
+ | `ffmpeg_vbitrate_min / max` | Target video bitrate range (in bits/s). |
241
+
242
+ ## User Roles
243
+
244
+ As previously described, the bot implements a simple RBAC (Role-Based Access Control) system to manage usage:
245
+
246
+ |Feature|Admin Users|Authorized Users|
247
+ |---|---|---|
248
+ |Process Videos|✅|✅|
249
+ |Change *FFmpeg* Parameters|✅|❌|
250
+ |Add/Remove Authorized Users|✅|❌|
251
+
252
+ **Role Details:**
253
+ - *Admin Users*: Have total control over the bot instance. They are responsible for configuring the processing engine and managing the access list.
254
+ - *Authorized Users*: Can utilize the bot's core functionality (video processing) but cannot alter global settings or manage other users.
255
+
256
+ ## Bot GUI
257
+
258
+ The bot GUI is intuitive and straightforward. The main menu consists of three primary options:
259
+
260
+ <img src="asset/main_menu.png" width="400px">
261
+
262
+ - **Process Video**: Start processing a video file.
263
+ - **Configure Bot**: Access bot configuration (restricted to administrators).
264
+ - **Info Bot**: Display general information about the bot (i.e. author, version).
265
+
266
+ The configuration menu allows administrators to manage authorized users and adjust FFmpeg parameters:
267
+
268
+ <img src="asset/configure_menu.png" width="300px">
269
+
270
+ - **Bot Access**: Add, remove, or view authorized users.
271
+
272
+ <img src="asset/bot_access_menu.png" width="300px">
273
+
274
+ - **Audio Parameters** / **Video Parameters**: Enable, disable, or modify specific FFmpeg filters.
275
+
276
+ Both menus share a similar interface, varying only in the available filter list.
277
+
278
+ | | |
279
+ |---|---|
280
+ |<img src="asset/filter_menu.png" width="250px">|<img src="asset/filter_set_menu.png" width="400px">|
281
+
282
+ - **Parameters Management**: Save, load, or view FFmpeg configurations.
283
+
284
+ - **Concept**: Changes made via the GUI are applied in-memory and will be lost if the bot restarts.
285
+ To make changes permanent, they must be saved to file. Similarly, users can load from file to revert unsaved in-memory changes.
286
+
287
+ <img src="asset/parameters_management_menu.png" width="300px">
288
+
289
+ - **Filters Documentation**: Opens the official FFmpeg documentation for detailed filter descriptions.
290
+
291
+ ## Run the Bot
292
+
293
+ The bot is designed for use in private chats. There is no need to add it to a group.
294
+
295
+ To ensure the bot remains online and responsive, it is highly recommended to host it on a VPS for 24/7 operation.
296
+
297
+ **Note:** While *FFmpeg* is known for being resource-intensive, this bot is specifically intended to process short video clips (1 to 2 minutes).
298
+ Therefore, even a low-spec VPS should be sufficient to handle the processing tasks effectively.
299
+
300
+ ### Docker
301
+
302
+ Docker files are provided to run the bot in a container. You can specify the configuration file via the `CONFIG_FILE` variable:
303
+
304
+ ```
305
+ CONFIG_FILE=conf/config.ini docker compose up -d --build
306
+ ```
307
+
308
+ ## Translation
309
+
310
+ Bot messages can be translated using a custom XML file specified in the `app_lang_file` field. An Italian example is provided in **app/lang**.
311
+
312
+ # License
313
+
314
+ This software is available under the MIT license.
@@ -0,0 +1,284 @@
1
+ # Telegram Video Repurpose & Uniquing Bot
2
+
3
+ ## Introduction
4
+
5
+ Telegram bot based on *pyrotgfork* (a maintained fork of the *pyrogram* library).
6
+
7
+ This bot was originally developed as a commissioned project for social media content management.
8
+ While the original project is no longer active, this version has been updated and streamlined for public use.
9
+
10
+ ### Project Purpose
11
+
12
+ The core concept of the bot is video uniquing.
13
+
14
+ The bot processes an input video and applies subtle *FFmpeg* filters to generate technically unique versions of the same file.
15
+ This allows users to post the same content multiple times across different social media accounts (such as TikTok or Instagram) while minimizing the risk of duplicate content flags or automated bans.
16
+
17
+ ### How It Works
18
+
19
+ Instead of applying static filters, the bot uses a system of controlled randomization:
20
+ - The user defines a range (minimum/maximum) for each supported *FFmpeg parameter*.
21
+
22
+ While the bot currently supports a small subset of filters selected for content uniquing, the codebase is structured to be modular, making it easy to add new filters as needed.
23
+ - Every time a video is processed, the bot generates a random value within that specified range for each filter.
24
+ - Consequently, every output video is technically unique, even when starting from the same source file.
25
+
26
+ ### Key Features
27
+
28
+ - User-Friendly Interface: Designed with non-technical users in mind, the bot is fully managed via a button-based GUI.
29
+ - Direct Processing: In this version, videos are sent directly to the bot within the Telegram chat (automatic downloading from TikTok/Instagram URLs has been removed to ensure easier maintenance).
30
+ - Role-Based Access Control:
31
+ - Administrators: Can manage user permissions (i.e. add/remove creators) and modify the audio/video parameters.
32
+ - Creators: Can only process videos using the pre-configured settings.
33
+
34
+ ### Video Example
35
+
36
+ <video src="https://github.com/user-attachments/assets/7be57b6c-aa1c-4fcd-9f05-c52722df7a50" width="50%">
37
+ </video>
38
+
39
+ ## Setup
40
+
41
+ ### Create Telegram app
42
+
43
+ In order to use the bot, you need a Telegram bot token, an API ID, and an API hash.
44
+
45
+ To obtain them, create an app on the following website: [https://my.telegram.org/apps](https://my.telegram.org/apps).
46
+
47
+ ### Installation
48
+
49
+ This package requires **Python >= 3.7**.
50
+
51
+ 1. **Install FFmpeg:**
52
+ The bot requires *FFmpeg* to be installed and available in the system (i.e. added to the system `PATH`).
53
+
54
+ Please refer to the [official download page](https://ffmpeg.org/download.html) for installation instructions.
55
+
56
+ To verify the installation, open a terminal and run: `ffmpeg -version`
57
+
58
+ If the command returns version information, *FFmpeg* is correctly set up. Example output (truncated):
59
+
60
+ ```
61
+ ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
62
+ ```
63
+
64
+ 2. **Set up a virtual environment (optional but recommended)**:
65
+
66
+ ```
67
+ python -m venv venv
68
+ source venv/bin/activate # On Windows use: venv\Scripts\activate
69
+ ```
70
+
71
+ 3. **Install the bot:**
72
+
73
+ ```
74
+ pip install telegram_video_repurpose_bot
75
+ ```
76
+
77
+ **IMPORTANT NOTE:** This bot uses *pyrotgfork*. If you are not using a virtual environment, ensure that the standard *pyrogram* library (or forks) is not installed in your Python environment.
78
+ Since both libraries use the same package name, having both installed will cause conflicts and the bot will not function correctly.
79
+
80
+ 4. **Set up the bot:**
81
+ Copy the **app** folder from the repository to your device. Edit the configuration file by specifying your API ID, API hash, bot token, and other parameters according to your needs (see the "Configuration" chapter).
82
+ 5. **Run the bot:**
83
+ Inside the **app** folder, launch the **bot_start.py** script to start the bot:
84
+
85
+ ```
86
+ python bot_start.py
87
+ ```
88
+
89
+ ---
90
+
91
+ #### Custom Configuration
92
+
93
+ When run without parameters, the bot uses **conf/config.ini** as the default configuration file. To specify a different configuration file, use:
94
+
95
+ ```
96
+ python bot_start.py -c another_conf.ini
97
+ ```
98
+
99
+ or:
100
+
101
+ ```
102
+ python bot_start.py --config another_conf.ini
103
+ ```
104
+
105
+ This allows you to manage different bots easily, each one with its own configuration file.
106
+
107
+ ### Code analysis
108
+
109
+ To run code analysis:
110
+
111
+ ```
112
+ mypy .
113
+ ruff check .
114
+ ```
115
+
116
+ ## Configuration
117
+
118
+ ### Bot Configuration
119
+
120
+ An example of bot configuration file is provided in the *app* folder: **app/conf/config.ini**.
121
+
122
+ The full list of configurable fields is documented below.
123
+
124
+ | Name | Description |
125
+ | --- | --- |
126
+ | **[pyrogram]** | *Configuration for pyrogram* |
127
+ | `session_name` | Path of the file used to store the session. |
128
+ | `api_id` | API ID from [https://my.telegram.org/apps](https://my.telegram.org/apps). |
129
+ | `api_hash` | API hash from [https://my.telegram.org/apps](https://my.telegram.org/apps). |
130
+ | `bot_token` | Bot token from *BotFather*. |
131
+ | **[app]** | *Configuration for app* |
132
+ | `app_support` | Username of the user to contact for support in case of bot errors. |
133
+ | `app_admin_users` | List of usernames of admin users (see "User Roles"). |
134
+ | `app_auth_users` | List of usernames of authorized users (see "User Roles"). |
135
+ | `app_lang_file` | Path of custom language file in XML format (default: English). |
136
+ | **[video]** | *Configuration for videos* |
137
+ | `video_max_processes` | Maximum number of FFmpeg processes that can be active at the same time. |
138
+ | `video_download_folder` | Path of the folder where downloaded videos are stored (default: `video/download/`). Path must be existent, an error will be triggered if not existent. |
139
+ | `video_download_delete_file` | True to delete downloaded video, false otherwise (default: `true`) |
140
+ | `video_process_folder` | Path of the folder where processed videos are stored (default: `video/proc/`). Path must be existent, an error will be triggered if not existent. |
141
+ | `video_process_delete_file` | True to delete processed video, false otherwise (default: `true`) |
142
+ | `video_ffmpeg_params_file` | Path of the *ffmpeg* configuration file (default: `conf/ffmpeg_params.ini`). |
143
+ | `video_ffmpeg_filters_doc_url` | URL with FFmpeg filter documentation (default: `https://ffmpeg.org/ffmpeg-filters.html`) |
144
+ | **[logging]** | *Configuration for logging* |
145
+ | `log_level` | Log level, same as python logging (`DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`). Default: `INFO`. |
146
+ | `log_console_enabled` | True to enable logging to console, false otherwise (default: `true`) |
147
+ | `log_file_enabled` | True to enable logging to file, false otherwise (default: `false`). If false, the following fields will be ignored. |
148
+ | `log_file_name` | Log file name |
149
+ | `log_file_use_rotating` | True to use a rotating log file, false otherwise |
150
+ | `log_file_max_bytes` | Maximum size in bytes for a log file. When reached, a new log file is created up to `log_file_backup_cnt`. Only valid if `log_file_use_rotating` is true. |
151
+ | `log_file_backup_cnt` | Maximum number of log files. Only valid if `log_file_use_rotating` is true. |
152
+ | `log_file_append` | True to append to the log file, false to start fresh each time. Only valid if `log_file_use_rotating` is false. |
153
+
154
+ ### FFmpeg Configuration
155
+
156
+ The file **app/conf/ffmpeg_params.ini** serves as the baseline for *FFmpeg* configuration.
157
+ It contains the default enable flags and ranges (min/max values) for all supported filters.
158
+
159
+ **NOTE:** Since *FFmpeg* parameters can be updated directly via bot GUI, manual editing of this file is generally unnecessary.
160
+
161
+ The full list of configurable fields is documented below.
162
+
163
+ | Parameter | Description |
164
+ | --- | --- |
165
+ | **[ffmpeg_audio]** | *Audio* |
166
+ | `ffmpeg_abitrate_enabled` | Enable/disable audio bitrate control. |
167
+ | `ffmpeg_abitrate_min / max` | Target audio bitrate range (in bits/s). |
168
+ | `ffmpeg_acontrast_enabled` | Enable/disable the audio contrast filter. |
169
+ | `ffmpeg_acontrast_min / max` | Range for audio contrast expansion/compression. |
170
+ | `ffmpeg_aecho_enabled` | Enable/disable the audio echo effect. |
171
+ | `ffmpeg_aecho_in_gain_min / max` | Range for input signal volume (gain). |
172
+ | `ffmpeg_aecho_out_gain_min / max` | Range for output signal volume (gain). |
173
+ | `ffmpeg_aecho_delays_min / max` | Range for echo delay in milliseconds. |
174
+ | `ffmpeg_aecho_decays_min / max` | Range for echo decay factors. |
175
+ | **[ffmpeg_common]** | *Common* |
176
+ | `ffmpeg_verbosity` | Verbosity level for FFmpeg (default: `error`), same of FFmpeg `-loglevel`. |
177
+ | `ffmpeg_tempo_enabled` | Enable/disable playback speed adjustment (without pitch shift). |
178
+ | `ffmpeg_tempo_min / max` | Speed multiplier range (e.g., 0.96x to 1.04x). |
179
+ | **[ffmpeg_video]** | *Video* |
180
+ | `ffmpeg_colorbalance_enabled` | Enable/disable color balance adjustments. |
181
+ | `ffmpeg_colorbalance_rgbs_min / max` | Range for Red, Green, and Blue shadows. |
182
+ | `ffmpeg_colorbalance_rgbm_min / max` | Range for Red, Green, and Blue midtones. |
183
+ | `ffmpeg_colorbalance_rgbh_min / max` | Range for Red, Green, and Blue highlights. |
184
+ | `ffmpeg_colorcorrect_enabled` | Enable/disable the color correction filter. |
185
+ | `ffmpeg_colorcorrect_rbl_min / max` | Range for red/blue components in lowlights. |
186
+ | `ffmpeg_colorcorrect_rbh_min / max` | Range for red/blue components in highlights. |
187
+ | `ffmpeg_crop_enabled` | Enable/disable video cropping. |
188
+ | `ffmpeg_crop_h_min / max` | Range for height pixels to be cropped. |
189
+ | `ffmpeg_crop_w_min / max` | Range for width pixels to be cropped. |
190
+ | `ffmpeg_eq_enabled` | Enable/disable the equalizer (Brightness, Contrast, Saturation, Gamma). |
191
+ | `ffmpeg_eq_contrast_min / max` | Range for video contrast adjustment. |
192
+ | `ffmpeg_eq_brightness_min / max` | Range for video brightness adjustment. |
193
+ | `ffmpeg_eq_saturation_min / max` | Range for color saturation intensity. |
194
+ | `ffmpeg_eq_gamma_min / max` | Range for gamma correction. |
195
+ | `ffmpeg_fps_enabled` | Enable/disable forced output frame rate (FPS). |
196
+ | `ffmpeg_fps_min / max` | Range for target frames per second. |
197
+ | `ffmpeg_hflip_enabled` | Enable/disable horizontal flip (mirror effect). |
198
+ | `ffmpeg_noise_enabled` | Enable/disable artificial video noise. |
199
+ | `ffmpeg_noise_allf` | Noise flags (e.g., `a+p+u` for all planes/uniform noise). |
200
+ | `ffmpeg_noise_alls_min / max` | Range for noise seed/intensity. |
201
+ | `ffmpeg_output_format` | Defines the output video codec (possible values: `h264`, `libx265`, `h264_nvenc`, `hevc_nvenc`). |
202
+ | `ffmpeg_scale_enabled` | Enable/disable video resizing. |
203
+ | `ffmpeg_scale_algo` | Scaling algorithm used (possible values: `fast_bilinear`, `bilinear`, `bicubic`, `neighbor`, `area`, `bicublin`, `gauss`, `spline`). |
204
+ | `ffmpeg_scale_w / h` | Target output resolution (Width x Height). |
205
+ | `ffmpeg_smartblur_enabled` | Enable/disable the smart blur filter. |
206
+ | `ffmpeg_smartblur_lr_min / max` | Range for luma radius. |
207
+ | `ffmpeg_smartblur_ls_min / max` | Range for luma strength. |
208
+ | `ffmpeg_smartblur_lt_min / max` | Range for luma threshold. |
209
+ | `ffmpeg_vbitrate_enabled` | Enable/disable video bitrate control. |
210
+ | `ffmpeg_vbitrate_min / max` | Target video bitrate range (in bits/s). |
211
+
212
+ ## User Roles
213
+
214
+ As previously described, the bot implements a simple RBAC (Role-Based Access Control) system to manage usage:
215
+
216
+ |Feature|Admin Users|Authorized Users|
217
+ |---|---|---|
218
+ |Process Videos|✅|✅|
219
+ |Change *FFmpeg* Parameters|✅|❌|
220
+ |Add/Remove Authorized Users|✅|❌|
221
+
222
+ **Role Details:**
223
+ - *Admin Users*: Have total control over the bot instance. They are responsible for configuring the processing engine and managing the access list.
224
+ - *Authorized Users*: Can utilize the bot's core functionality (video processing) but cannot alter global settings or manage other users.
225
+
226
+ ## Bot GUI
227
+
228
+ The bot GUI is intuitive and straightforward. The main menu consists of three primary options:
229
+
230
+ <img src="asset/main_menu.png" width="400px">
231
+
232
+ - **Process Video**: Start processing a video file.
233
+ - **Configure Bot**: Access bot configuration (restricted to administrators).
234
+ - **Info Bot**: Display general information about the bot (i.e. author, version).
235
+
236
+ The configuration menu allows administrators to manage authorized users and adjust FFmpeg parameters:
237
+
238
+ <img src="asset/configure_menu.png" width="300px">
239
+
240
+ - **Bot Access**: Add, remove, or view authorized users.
241
+
242
+ <img src="asset/bot_access_menu.png" width="300px">
243
+
244
+ - **Audio Parameters** / **Video Parameters**: Enable, disable, or modify specific FFmpeg filters.
245
+
246
+ Both menus share a similar interface, varying only in the available filter list.
247
+
248
+ | | |
249
+ |---|---|
250
+ |<img src="asset/filter_menu.png" width="250px">|<img src="asset/filter_set_menu.png" width="400px">|
251
+
252
+ - **Parameters Management**: Save, load, or view FFmpeg configurations.
253
+
254
+ - **Concept**: Changes made via the GUI are applied in-memory and will be lost if the bot restarts.
255
+ To make changes permanent, they must be saved to file. Similarly, users can load from file to revert unsaved in-memory changes.
256
+
257
+ <img src="asset/parameters_management_menu.png" width="300px">
258
+
259
+ - **Filters Documentation**: Opens the official FFmpeg documentation for detailed filter descriptions.
260
+
261
+ ## Run the Bot
262
+
263
+ The bot is designed for use in private chats. There is no need to add it to a group.
264
+
265
+ To ensure the bot remains online and responsive, it is highly recommended to host it on a VPS for 24/7 operation.
266
+
267
+ **Note:** While *FFmpeg* is known for being resource-intensive, this bot is specifically intended to process short video clips (1 to 2 minutes).
268
+ Therefore, even a low-spec VPS should be sufficient to handle the processing tasks effectively.
269
+
270
+ ### Docker
271
+
272
+ Docker files are provided to run the bot in a container. You can specify the configuration file via the `CONFIG_FILE` variable:
273
+
274
+ ```
275
+ CONFIG_FILE=conf/config.ini docker compose up -d --build
276
+ ```
277
+
278
+ ## Translation
279
+
280
+ Bot messages can be translated using a custom XML file specified in the `app_lang_file` field. An Italian example is provided in **app/lang**.
281
+
282
+ # License
283
+
284
+ This software is available under the MIT license.