# QuickMediaDL
**QuickMediaDL** is a Python library designed to simplify the process of downloading videos and audio files from various online sources, such as YouTube. It leverages `yt-dlp` to offer a customizable experience with options for setting video quality, downloading subtitles, renaming files, and more.
## Features
- **Download Video or Audio**: Download high-quality video or audio files with a choice of resolution or bitrate.
- **Custom Filename**: Specify a custom name for downloaded files.
- **Subtitle Support**: Download subtitles in multiple languages.
- **Quality Selection**: Choose from popular resolutions (360p, 480p, 720p, etc.).
- **Download Progress**: Real-time progress bar using `tqdm`.
- **Logger for Feedback**: Custom logging for debug, warning, and error messages.
- **Easy-to-Use Output Path**: Save files in a specified directory.
## Installation
To install the package and its dependencies, simply use pip:
```bash
pip install QuickMediaDL
```
## requirements:
- yt-dlp: Core library for downloading videos and audio.
- tqdm: For displaying progress during downloads.
```bash
pip install yt-dlp tqdm
```
## Usage
### Basic Setup
```python
from QuickMediaDL import VideoDownloader
# Specify the URL of the video
url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
# Initialize the downloader
downloader = VideoDownloader(url)
```
## Downloading Video or Audio
- Download a Video
```python
Download the video in 720p quality
downloader.download_video(quality="720p")
```
- Download Audio Only
```python
# Download the audio only
downloader.download_video(audio_only=True)
```
- Custom Filename and Subtitle Language
```python
# Download video with custom filename and subtitles in both English and Persian
downloader.download_video(quality="1080p", filename="MyCustomFile", subtitle_langs=["en", "fa"])
```
- Setting Output Directory
```python
# Change the default download directory
downloader.set_output_directory("my_downloads")
```
# Class and Method Descriptions
`VideoDownloader` :
The main class for managing downloads.
`__init__(url, download_path="downloads")` :
- **url**: URL of the video or audio to download.
- **download_path**: Directory to save downloaded files. Defaults to "downloads".
`download_video(quality="480p", audio_only=False, filename=None, subtitle_langs=None)` :
- **quality**: Video quality to download ("360p", "480p", "720p", etc.). Default is "480p".
- **audio_only**: Set `True` to download audio only.
- **filename**: Custom filename for the downloaded file.
- **subtitle_langs**: List of languages for subtitles (e.g., ["en", "fa"]).
`get_available_formats()` :
Returns a list of available formats and resolutions for the video, allowing you to choose based on your preference.
`set_output_directory(path)` : Sets the download path and adjusts settings accordingly.
- **path**: New directory path for saving downloaded files.
# Progress and Logging
The library uses `tqdm` to display a progress bar during downloads, giving you real-time feedback on the download process. Additionally, a custom logger (`Logger` class) is used for handling debug, warning, and error messages.
# Example
Here’s an example of downloading a video in `720p`, saving it to a custom directory with subtitles in English and Persian, and using a custom filename:
```python
from QuickMediaDL import VideoDownloader
# Initialize downloader with URL
url = "https://www.youtube.com/watch?v=example"
downloader = VideoDownloader(url, download_path="my_downloads")
# Download video in 720p quality with specified subtitle languages
downloader.download_video(quality="720p", filename="MyCustomVideo", subtitle_langs=["en", "fa"])
```
# License
This project is licensed under the MIT License.
## Thank you
This project relies on the excellent [yt-dlp](https://github.com/yt-dlp/yt-dlp) library for handling video and audio downloads. Thanks to the `yt-dlp` community for their hard work!
---
**Happy downloading!** 🎉 If you like this project, consider giving it a star on GitHub and sharing it with others who may find it useful.
[![GitHub Stars](https://img.shields.io/github/stars/Amirprx3/QuickMediaDL?style=social)](https://github.com/Amirprx3/QuickMediaDL)
Raw data
{
"_id": null,
"home_page": "https://github.com/Amirprx3/QuickMediaDL",
"name": "QuickMediaDL",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "python, Downloader, ViedoDownloader, YoutubeDownloader",
"author": "Amirhossein bahrami",
"author_email": "amirbaahrami@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/c5/c1/2727468b3588c237307518d34b0ffa33cb4c77f00fc33a7165ae1253b68b/QuickMediaDL-0.1.1.tar.gz",
"platform": null,
"description": "# QuickMediaDL\r\n\r\n**QuickMediaDL** is a Python library designed to simplify the process of downloading videos and audio files from various online sources, such as YouTube. It leverages `yt-dlp` to offer a customizable experience with options for setting video quality, downloading subtitles, renaming files, and more.\r\n\r\n## Features\r\n\r\n- **Download Video or Audio**: Download high-quality video or audio files with a choice of resolution or bitrate.\r\n- **Custom Filename**: Specify a custom name for downloaded files.\r\n- **Subtitle Support**: Download subtitles in multiple languages.\r\n- **Quality Selection**: Choose from popular resolutions (360p, 480p, 720p, etc.).\r\n- **Download Progress**: Real-time progress bar using `tqdm`.\r\n- **Logger for Feedback**: Custom logging for debug, warning, and error messages.\r\n- **Easy-to-Use Output Path**: Save files in a specified directory.\r\n\r\n## Installation\r\n\r\nTo install the package and its dependencies, simply use pip:\r\n\r\n```bash\r\npip install QuickMediaDL\r\n```\r\n## requirements:\r\n- yt-dlp: Core library for downloading videos and audio.\r\n- tqdm: For displaying progress during downloads.\r\n\r\n```bash\r\npip install yt-dlp tqdm\r\n```\r\n\r\n## Usage\r\n### Basic Setup\r\n\r\n```python\r\nfrom QuickMediaDL import VideoDownloader\r\n\r\n# Specify the URL of the video\r\nurl = \"https://www.youtube.com/watch?v=dQw4w9WgXcQ\"\r\n\r\n# Initialize the downloader\r\ndownloader = VideoDownloader(url)\r\n```\r\n\r\n## Downloading Video or Audio\r\n- Download a Video\r\n```python\r\nDownload the video in 720p quality\r\ndownloader.download_video(quality=\"720p\")\r\n```\r\n- Download Audio Only\r\n```python\r\n# Download the audio only\r\ndownloader.download_video(audio_only=True)\r\n```\r\n- Custom Filename and Subtitle Language\r\n```python\r\n# Download video with custom filename and subtitles in both English and Persian\r\ndownloader.download_video(quality=\"1080p\", filename=\"MyCustomFile\", subtitle_langs=[\"en\", \"fa\"])\r\n```\r\n- Setting Output Directory\r\n```python\r\n# Change the default download directory\r\ndownloader.set_output_directory(\"my_downloads\")\r\n```\r\n# Class and Method Descriptions\r\n\r\n`VideoDownloader` :\r\nThe main class for managing downloads.\r\n\r\n`__init__(url, download_path=\"downloads\")` :\r\n- **url**: URL of the video or audio to download.\r\n- **download_path**: Directory to save downloaded files. Defaults to \"downloads\".\r\n\r\n`download_video(quality=\"480p\", audio_only=False, filename=None, subtitle_langs=None)` :\r\n- **quality**: Video quality to download (\"360p\", \"480p\", \"720p\", etc.). Default is \"480p\".\r\n- **audio_only**: Set `True` to download audio only.\r\n- **filename**: Custom filename for the downloaded file.\r\n- **subtitle_langs**: List of languages for subtitles (e.g., [\"en\", \"fa\"]).\r\n\r\n`get_available_formats()` :\r\nReturns a list of available formats and resolutions for the video, allowing you to choose based on your preference.\r\n\r\n`set_output_directory(path)` : Sets the download path and adjusts settings accordingly.\r\n\r\n- **path**: New directory path for saving downloaded files.\r\n\r\n# Progress and Logging\r\nThe library uses `tqdm` to display a progress bar during downloads, giving you real-time feedback on the download process. Additionally, a custom logger (`Logger` class) is used for handling debug, warning, and error messages.\r\n\r\n# Example\r\nHere\u00e2\u20ac\u2122s an example of downloading a video in `720p`, saving it to a custom directory with subtitles in English and Persian, and using a custom filename:\r\n\r\n```python\r\nfrom QuickMediaDL import VideoDownloader\r\n\r\n# Initialize downloader with URL\r\nurl = \"https://www.youtube.com/watch?v=example\"\r\ndownloader = VideoDownloader(url, download_path=\"my_downloads\")\r\n\r\n# Download video in 720p quality with specified subtitle languages\r\ndownloader.download_video(quality=\"720p\", filename=\"MyCustomVideo\", subtitle_langs=[\"en\", \"fa\"])\r\n```\r\n\r\n# License\r\nThis project is licensed under the MIT License.\r\n\r\n## Thank you\r\nThis project relies on the excellent [yt-dlp](https://github.com/yt-dlp/yt-dlp) library for handling video and audio downloads. Thanks to the `yt-dlp` community for their hard work!\r\n\r\n\r\n---\r\n\r\n**Happy downloading!** \u00f0\u0178\u017d\u2030 If you like this project, consider giving it a star on GitHub and sharing it with others who may find it useful.\r\n\r\n[![GitHub Stars](https://img.shields.io/github/stars/Amirprx3/QuickMediaDL?style=social)](https://github.com/Amirprx3/QuickMediaDL)\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A library for downloading videos or audio from online sources",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/Amirprx3/QuickMediaDL"
},
"split_keywords": [
"python",
" downloader",
" viedodownloader",
" youtubedownloader"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d1eb8a896626dca8dd2154fe1afbca754a942e29e26cb3601d973acf80509c28",
"md5": "70a3384b20471b2319fa5c3083a0cb0c",
"sha256": "55674600d7bb5b74d2ac3c072815effc17f549154f3cdf4623d6765598a649c1"
},
"downloads": -1,
"filename": "QuickMediaDL-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "70a3384b20471b2319fa5c3083a0cb0c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 4978,
"upload_time": "2024-11-15T17:45:33",
"upload_time_iso_8601": "2024-11-15T17:45:33.810675Z",
"url": "https://files.pythonhosted.org/packages/d1/eb/8a896626dca8dd2154fe1afbca754a942e29e26cb3601d973acf80509c28/QuickMediaDL-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c5c12727468b3588c237307518d34b0ffa33cb4c77f00fc33a7165ae1253b68b",
"md5": "30b635605a75d88bbd951942d7342bdd",
"sha256": "d92129833012d911855497e8f43485f2ad4ae3ea7f86d7730b1364b8fa14d194"
},
"downloads": -1,
"filename": "QuickMediaDL-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "30b635605a75d88bbd951942d7342bdd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4625,
"upload_time": "2024-11-15T17:45:36",
"upload_time_iso_8601": "2024-11-15T17:45:36.266096Z",
"url": "https://files.pythonhosted.org/packages/c5/c1/2727468b3588c237307518d34b0ffa33cb4c77f00fc33a7165ae1253b68b/QuickMediaDL-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-15 17:45:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Amirprx3",
"github_project": "QuickMediaDL",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "quickmediadl"
}