- ๐ Update Domains
- ๐ ๏ธ Installation
- ๐ฆ PyPI Installation
- ๐ Automatic Installation
- ๐ง Binary Location
- ๐ Manual Installation
- โ๏ธ Configuration
- ๐ Command
- ๐ป Examples of terminal
- ๐ง Manual domain configuration
- ๐ณ Docker
- ๐ Telegram Usage
- ๐ Tutorial
- ๐ To do
- ๐ฌ Support
- ๐ค Contribute
โ ๏ธ Disclaimer- โก Contributors
Install directly from PyPI:
pip install StreamingCommunity
Create run_streaming.py
:
from StreamingCommunity.run import main
if __name__ == "__main__":
main()
Run the script:
python run_streaming.py
pip install --upgrade StreamingCommunity
OS | Automatic Installation Support |
---|---|
Windows 10/11 | โ๏ธ |
Windows 7 | โ |
Debian Linux | โ๏ธ |
Arch Linux | โ๏ธ |
CentOS Stream 9 | โ๏ธ |
FreeBSD | โณ |
MacOS | โ๏ธ |
Termux | โ |
.\Installer\win_install.bat
sudo chmod +x Installer/unix_install.sh && ./Installer/unix_install.sh
python .\test_run.py
or
source .venv/bin/activate && python test_run.py && deactivate
./test_run.py
- Windows:
C:\binary
- MacOS:
~/Applications/binary
- Linux:
~/.local/bin/binary
You can customize these locations by following these steps for your operating system:
- Move the binary folder from
C:\binary
to your desired location - Add the new path to Windows environment variables:
- Open Start menu and search for "Environment Variables"
- Click "Edit the system environment variables"
- Click "Environment Variables" button
- Under "System Variables", find and select "Path"
- Click "Edit"
- Add the new binary folder path
- Click "OK" to save changes
For detailed Windows PATH instructions, see the Windows PATH guide.
- Move the binary folder from
~/Applications/binary
to your desired location - Add the new path to your shell's configuration file:
# For bash (edit ~/.bash_profile) export PATH="/your/custom/path:$PATH" # For zsh (edit ~/.zshrc) export PATH="/your/custom/path:$PATH"
- Reload your shell configuration:
# For bash source ~/.bash_profile # For zsh source ~/.zshrc
- Move the binary folder from
~/.local/bin/binary
to your desired location - Add the new path to your shell's configuration file:
# For bash (edit ~/.bashrc) export PATH="/your/custom/path:$PATH" # For zsh (edit ~/.zshrc) export PATH="/your/custom/path:$PATH"
- Apply the changes:
source ~/.bashrc # for bash # or source ~/.zshrc # for zsh
Important
After moving the binary folder, ensure that all executables (ffmpeg, ffprobe, ffplay) are present in the new location and have the correct permissions:
- Windows:
.exe
extensions required - MacOS/Linux: Ensure files have execute permissions (
chmod +x filename
)
Prerequisites:
pip install -r requirements.txt
python test_run.py
python3 test_run.py
Keep your script up to date with the latest features by running:
python update.py
python3 update.py
You can change some behaviors by tweaking the configuration file.
The configuration file is divided into several main sections:
{
"DEFAULT": {
"debug": false,
"show_message": true,
"clean_console": true,
"show_trending": true,
"use_api": true,
"not_close": false,
"telegram_bot": false
}
}
debug
: Enables debug loggingshow_message
: Displays informational messagesclean_console
: Clears the console between operationsshow_trending
: Shows trending contentuse_api
: Uses API for domain updates instead of local configurationnot_close
: If set to true, keeps the program running after download is complete- Can be changed from terminal with
--not_close true/false
- Can be changed from terminal with
telegram_bot
: Enables Telegram bot integration
{
"OUT_FOLDER": {
"root_path": "Video",
"movie_folder_name": "Movie",
"serie_folder_name": "Serie",
"anime_folder_name": "Anime",
"map_episode_name": "E%(episode)_%(episode_name)",
"add_siteName": false
}
}
-
root_path
: Directory where all videos will be saved- Windows:
C:\\MyLibrary\\Folder
or\\\\MyServer\\MyLibrary
(if you want to use a network folder) - Linux/MacOS:
Desktop/MyLibrary/Folder
- Windows:
-
movie_folder_name
: The name of the subdirectory where movies will be stored- Can be changed from terminal with
--movie_folder_name
- Can be changed from terminal with
-
serie_folder_name
: The name of the subdirectory where TV series will be stored- Can be changed from terminal with
--serie_folder_name
- Can be changed from terminal with
-
anime_folder_name
: The name of the subdirectory where anime will be stored- Can be changed from terminal with
--anime_folder_name
- Can be changed from terminal with
-
map_episode_name
: Template for episode filenamesYou can choose different vars:
%(tv_name)
: Is the name of TV Show%(season)
: Is the number of the season%(episode)
: Is the number of the episode%(episode_name)
: Is the name of the episode- Can be changed from terminal with
--map_episode_name
-
add_siteName
: If set to true, appends the site_name to the root path before the movie and serie folders- Can be changed from terminal with
--add_siteName true/false
- Can be changed from terminal with
{
"QBIT_CONFIG": {
"host": "192.168.1.51",
"port": "6666",
"user": "admin",
"pass": "adminadmin"
}
}
To enable qBittorrent integration, follow the setup guide here.
{
"REQUESTS": {
"verify": false,
"timeout": 20,
"max_retry": 8
}
}
verify
: Verifies SSL certificatestimeout
: Maximum timeout (in seconds) for each requestmax_retry
: Number of retry attempts per segment during M3U8 index download
{
"M3U8_DOWNLOAD": {
"tqdm_delay": 0.01,
"default_video_workser": 12,
"default_audio_workser": 12,
"segment_timeout": 8,
"download_audio": true,
"merge_audio": true,
"specific_list_audio": [
"ita"
],
"download_subtitle": true,
"merge_subs": true,
"specific_list_subtitles": [
"ita",
"eng"
],
"cleanup_tmp_folder": true
}
}
-
tqdm_delay
: Delay between progress bar updates -
default_video_workser
: Number of threads for video download- Can be changed from terminal with
--default_video_worker <number>
- Can be changed from terminal with
-
default_audio_workser
: Number of threads for audio download- Can be changed from terminal with
--default_audio_worker <number>
- Can be changed from terminal with
-
segment_timeout
: Timeout for downloading individual segments -
download_audio
: Whether to download audio tracks -
merge_audio
: Whether to merge audio with video -
specific_list_audio
: List of audio languages to download- Can be changed from terminal with
--specific_list_audio ita,eng
- Can be changed from terminal with
-
download_subtitle
: Whether to download subtitles -
merge_subs
: Whether to merge subtitles with video -
specific_list_subtitles
: List of subtitle languages to download- Can be changed from terminal with
--specific_list_subtitles ita,eng
- Can be changed from terminal with
-
cleanup_tmp_folder
: Remove temporary .ts files after download
European | Asian | Middle Eastern | Others |
---|---|---|---|
ita - Italian | chi - Chinese | ara - Arabic | eng - English |
spa - Spanish | jpn - Japanese | heb - Hebrew | por - Portuguese |
fre - French | kor - Korean | tur - Turkish | fil - Filipino |
ger - German | hin - Hindi | ind - Indonesian | |
rus - Russian | mal - Malayalam | may - Malay | |
swe - Swedish | tam - Tamil | vie - Vietnamese | |
pol - Polish | tel - Telugu | ||
ukr - Ukrainian | tha - Thai |
{
"M3U8_CONVERSION": {
"use_codec": false,
"use_vcodec": true,
"use_acodec": true,
"use_bitrate": true,
"use_gpu": false,
"default_preset": "ultrafast"
}
}
use_codec
: Use specific codec settingsuse_vcodec
: Use specific video codecuse_acodec
: Use specific audio codecuse_bitrate
: Apply bitrate settingsuse_gpu
: Enable GPU acceleration (if available)default_preset
: FFmpeg encoding preset (ultrafast, fast, medium, slow, etc.)
The software supports various advanced encoding options via FFmpeg:
The default_preset
configuration can be set to one of the following values:
ultrafast
: Extremely fast conversion but larger file sizesuperfast
: Very fast with good quality/size ratioveryfast
: Fast with good compressionfaster
: Optimal balance for most usersfast
: Good compression, moderate timemedium
: FFmpeg default settingslow
: High quality, slower processslower
: Very high quality, slow processveryslow
: Maximum quality, very slow process
When use_gpu
is enabled, the system will use available hardware acceleration:
- NVIDIA: NVENC
- AMD: AMF
- Intel: QSV
You need to have updated drivers and FFmpeg compiled with hardware acceleration support.
{
"M3U8_PARSER": {
"force_resolution": "Best",
"get_only_link": false
}
}
-
force_resolution
: Choose the video resolution for downloading:"Best"
: Highest available resolution"Worst"
: Lowest available resolution"720p"
: Force 720p resolution- Or specify one of these resolutions:
- 1080p (1920x1080)
- 720p (1280x720)
- 480p (640x480)
- 360p (640x360)
- 320p (480x320)
- 240p (426x240)
- 240p (320x240)
- 144p (256x144)
-
get_only_link
: Return M3U8 playlist/index URL instead of downloading
{
"SITE_EXTRA": {
"ddlstreamitaly": {
"ips4_device_key": "",
"ips4_member_id": "",
"ips4_login_key": ""
}
}
}
- Site-specific configuration for
ddlstreamitaly
:ips4_device_key
: Device key for authenticationips4_member_id
: Member ID for authenticationips4_login_key
: Login key for authentication
There are two ways to update the domains for the supported websites:
-
Create a
domains.json
file in the root directory of the project -
Add your domain configuration in the following format:
{ "altadefinizione": { "domain": "si", "full_url": "https://altadefinizione.si/" }, ... }
-
Set
use_api
tofalse
in theDEFAULT
section of yourconfig.json
:{ "DEFAULT": { "use_api": false } }
The API-based domain updates are currently deprecated. To use it anyway, set use_api
to true
in your config.json
file.
Note: If use_api
is set to false
and no domains.json
file is found, the script will raise an error.
-
Download a specific season by entering its number.
- Example:
1
will download Season 1 only.
- Example:
-
Use the wildcard
*
to download every available season.- Example:
*
will download all seasons in the series.
- Example:
-
Specify a range of seasons using a hyphen
-
.- Example:
1-2
will download Seasons 1 and 2.
- Example:
-
Enter a season number followed by
-*
to download from that season to the end.- Example:
3-*
will download from Season 3 to the final season.
- Example:
# Change video and audio workers
python test_run.py --default_video_worker 8 --default_audio_worker 8
# Set specific languages
python test_run.py --specific_list_audio ita,eng --specific_list_subtitles eng,spa
# Keep console open after download
python test_run.py --not_close true
You can run the script in a docker container, to build the image just run
docker build -t streaming-community-api .
and to run it use
docker run -it -p 8000:8000 streaming-community-api
By default the videos will be saved in /app/Video
inside the container, if you want to to save them in your machine instead of the container just run
docker run -it -p 8000:8000 -v /path/to/download:/app/Video streaming-community-api
Inside the Makefile (install make
) are already configured two commands to build and run the container:
make build-container
# set your download directory as ENV variable
make LOCAL_DIR=/path/to/download run-container
The run-container
command mounts also the config.json
file, so any change to the configuration file is reflected immediately without having to rebuild the image.
The bot was created to replace terminal commands and allow interaction via Telegram. Each download runs within a screen session, enabling multiple downloads to run simultaneously.
To run the bot in the background, simply start it inside a screen session and then press Ctrl + A, followed by D, to detach from the session without stopping the bot.
Command Functions:
๐น /start โ Starts a new search for a download. This command performs the same operations as manually running the script in the terminal with test_run.py.
๐น /list โ Displays the status of active downloads, with options to:
Stop an incorrect download using /stop .
View the real-time output of a download using /screen .
โ Warning: If a download is interrupted, incomplete files may remain in the folder specified in config.json. These files must be deleted manually to avoid storage or management issues.
๐ Configuration: Currently, the bot's settings are stored in the config.json file, which is located in the same directory as the telegram_bot.py script.
You need to create an .env file and enter your Telegram token and user ID to authorize only one user to use it
TOKEN_TELEGRAM=IlTuo2131TOKEN$12D3Telegram
AUTHORIZED_USER_ID=12345678
DEBUG=False
pip install -r requirements.txt
Start the bot from the folder /StreamingCommunity/TelegramHelp
python3 telegram_bot.py
- To Finish website API
- To finish website API 2
Contributions are welcome! Steps:
- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature
) - Commit changes (
git commit -m 'Add some AmazingFeature'
) - Push to branch (
git push origin feature/AmazingFeature
) - Open Pull Request
This 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.