Skip to content

Commit 7ad57ca

Browse files
committed
Came new
1 parent dc35eab commit 7ad57ca

34 files changed

+2239
-1
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 KAIF_CODEC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 121 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,121 @@
1-
# ytconverter
1+
## YTConverter™
2+
<img width="1020" height="732" alt="1000136389" src="https://github.com/user-attachments/assets/ef9eef49-e366-46cd-937f-834b6d85167b" />
3+
4+
---
5+
6+
<p align="center">
7+
<img src="https://img.shields.io/badge/Version-4.0.2-blueviolet?style=for-the-badge&logo=github" />
8+
<!-- <img src="https://img.shields.io/github/forks/kaifcodec/ytconverter?style=for-the-badge&logo=git" />
9+
<img src="https://img.shields.io/github/stars/kaifcodec/ytconverter?style=for-the-badge&logo=github" /> -->
10+
<img src="https://img.shields.io/github/issues/kaifcodec/ytconverter?style=for-the-badge&logo=github" />
11+
<img src="https://img.shields.io/badge/Status-Stable-brightgreen?style=for-the-badge" />
12+
<img src="https://img.shields.io/badge/Tested%20on-Termux-black?style=for-the-badge&logo=termux" />
13+
<img src="https://img.shields.io/badge/Tested%20on-Windows-cyan?style=for-the-badge&logo=Windows" />
14+
<img src="https://img.shields.io/badge/Tested%20on-Linux-balck?style=for-the-badge&logo=Linux" />
15+
<!--- <img src="https://img.shields.io/pypi/dm/ytconverter?label=PyPI%20Downloads&color=blue&logo=pypi" /> --->
16+
<img src="https://static.pepy.tech/badge/ytconverter?left_color=black&right_color=brightgreen" />
17+
</p>
18+
19+
---
20+
> **Preface (optional):** A subtle reflection before diving into the technical details, feel free to skip to main content.
21+
22+
| |
23+
|-----------------------------------------------------------------|
24+
| **❓ Born from silent hands, shaping what they cannot fully feel.** |
25+
| **❓ Weighted and left alone, with no hand to guide through the quiet.** |
26+
| **❓ Moving the world’s sound, while never feeling its pulse.** |
27+
| <sub>— Author: 401</sub> |
28+
---
29+
`YTConverter™` is a Python-based project developed by [kaifcodec](https://github.com/kaifcodec) designed to provide a robust tool for converting YouTube videos into various formats. This tool simplifies the process of downloading and converting videos from YouTube.
30+
31+
---
32+
## ✅ Features
33+
- *Video Downloading* : Fetch videos directly from YouTube.
34+
- *Audio Downloading*.: Downloads audio of any video with wide range of bitrate selection.
35+
- *Multiple video download*.: Now you can download multiple videos using the tool, just paste the urls one by one.
36+
- *Detailed Quality* : It fetches all the available resolutions for the video and let you select as per your need.
37+
- *Path selections* : It has inbuilt features to detect `Downloads` folder according to what platform user in.
38+
- *Custom Path* : Also you can enter your suitable path for every video.
39+
- *Title sanitization* : It has inbuilt `re` module implementation that converts special characters to text, avoiding errors
40+
- *Format Conversion*.: Convert downloaded videos into different formats such as MP3, MP4, etc.
41+
- *Metadata Handling* : Extract and manage metadata associated with YouTube videos.
42+
- *Colored output* : Colorful terminal output that make it easier to select options.
43+
- *Interactive CLI* : It provides interactive CLI menu that is way easier than using commands everytime.
44+
- *Auto Update* : You can simply run `ytconverter -U` and it will update yt-dlp and ytconverter to latest version, even it can auto detect whenever there's a new release of `ytconverter`.
45+
46+
- Many more features inside try them all...
47+
---
48+
## Screenshots
49+
<p align= "left">
50+
<img width="1080" height="495" alt="1000132505" src="https://github.com/user-attachments/assets/4087d8e8-5266-4fb0-8135-a51eda1fdcc1" />
51+
</p>
52+
<p align="left">
53+
<img src= "https://github.com/user-attachments/assets/8e9d00ce-b698-4b1f-8870-badd5d274442" width="600" height="600"/>
54+
</p>
55+
56+
---
57+
58+
## Requirements
59+
- Python 3.x
60+
- Required Python libraries (listed in `requirements.txt`)
61+
- ffmpeg & yt-dlp binary
62+
63+
## 🧩 Installation
64+
65+
### 🐧 Linux / Termux / macOS
66+
```bash
67+
git clone https://github.com/kaifcodec/ytconverter.git
68+
cd ytconverter/standalone/
69+
./install.sh # Auto-setup ffmpeg + dependencies
70+
```
71+
### If install.sh fails, install ffmpeg manually
72+
```bash
73+
sudo apt install ffmpeg # Debian/Ubuntu
74+
pkg install ffmpeg # Termux
75+
sudo dnf install ffmpeg # Fedora
76+
sudo pacman -S ffmpeg # Arch
77+
```
78+
### Install ytconverter from PyPI
79+
```bash
80+
pip install ytconverter
81+
ytconverter -S
82+
```
83+
84+
## ⚙️ Update
85+
### Update ytconverter
86+
```bash
87+
./update.sh # update to new repo, new yt-dlp version
88+
89+
ytconverter -U # pypi package
90+
91+
```
92+
## 🪟 Windows
93+
### Clone the repository
94+
```bash
95+
git clone https://github.com/kaifcodec/ytconverter.git
96+
cd ytconverter/standalone/
97+
install.bat # Or manually install ffmpeg and add it to PATH
98+
```
99+
### Then run:
100+
```bash
101+
python3 ytconverter.py
102+
```
103+
104+
---
105+
106+
## Contact
107+
For any questions or feedback, open an issue or write an email on kaifcodec@gmail.com
108+
109+
---
110+
111+
### If you found this tool helpful leave a star that will motivate me to maintain this project and add new features
112+
113+
<a href="https://www.star-history.com/#kaifcodec/ytconverter&type=date&legend=top-left">
114+
<picture>
115+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=kaifcodec/ytconverter&type=date&theme=dark&legend=top-left" />
116+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=kaifcodec/ytconverter&type=date&legend=top-left" />
117+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=kaifcodec/ytconverter&type=date&legend=top-left" />
118+
</picture>
119+
</a>
120+
121+
---

pyproject.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[build-system]
2+
requires = ["flit_core >=3.2,<4"]
3+
build-backend = "flit_core.buildapi"
4+
5+
[project]
6+
name = "ytconverter"
7+
version = "4.0.2.1"
8+
description = "Terminal-based YouTube video/audio downloader using yt-dlp and ffmpeg"
9+
readme = "README.md"
10+
license = {file = "LICENSE"}
11+
authors = [
12+
{name = "Kaif", email = "kafcodec@gmail.com"}
13+
]
14+
dependencies = [
15+
"yt-dlp",
16+
"ffmpeg-python",
17+
"colored",
18+
"fontstyle",
19+
"httpx"
20+
]
21+
22+
requires-python = ">=3.7"
23+
keywords = ["youtube", "downloader", "yt-dlp", "ffmpeg", "terminal", "audio", "video", "python", "youtube-downloader"]
24+
25+
[project.urls]
26+
Homepage = "https://github.com/kaifcodec/ytconverter"
27+
28+
[project.scripts]
29+
ytconverter = "ytconverter.__main__:main"

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
yt-dlp
2+
fontstyle
3+
colored
4+
httpx

standalone/install.bat

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
@echo off
2+
cd /d "%~dp0"
3+
setlocal enabledelayedexpansion
4+
5+
echo -------------------------------
6+
echo YTConverter Windows Installer
7+
echo -------------------------------
8+
9+
:: ---------------- Paths ----------------
10+
set "TEMP_DIR=%cd%\installer_temp"
11+
set "TOOLS_DIR=%LocalAppData%\Programs\YTConverter"
12+
set "FFMPEG_URL=https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip"
13+
set "FFMPEG_ZIP=%TEMP_DIR%\ffmpeg.zip"
14+
set "FFMPEG_BIN_DIR="
15+
16+
echo Creating temporary folder...
17+
mkdir "%TEMP_DIR%" >nul 2>&1
18+
mkdir "%TOOLS_DIR%" >nul 2>&1
19+
20+
:: ---------------- Check Python ----------------
21+
echo Checking Python...
22+
where python >nul 2>&1
23+
if errorlevel 1 (
24+
echo ERROR: Python not found. Install it from https://www.python.org/downloads/
25+
exit /b 1
26+
)
27+
echo Python found.
28+
29+
:: ---------------- Install yt-dlp ----------------
30+
echo Installing yt-dlp...
31+
python -m pip install -U yt-dlp
32+
if errorlevel 1 (
33+
echo ERROR: Failed to install yt-dlp.
34+
exit /b 1
35+
)
36+
echo yt-dlp installed successfully.
37+
38+
:: ---------------- Install FFmpeg ----------------
39+
echo Checking ffmpeg...
40+
where ffmpeg >nul 2>&1
41+
if %errorlevel%==0 (
42+
echo ffmpeg already installed in system PATH.
43+
) else (
44+
echo ffmpeg not found. Downloading...
45+
powershell -Command "Invoke-WebRequest -Uri '%FFMPEG_URL%' -OutFile '%FFMPEG_ZIP%'"
46+
if errorlevel 1 (
47+
echo ERROR: Failed to download FFmpeg.
48+
exit /b 1
49+
)
50+
51+
echo Extracting FFmpeg...
52+
powershell -Command "Expand-Archive -Path '%FFMPEG_ZIP%' -DestinationPath '%TEMP_DIR%' -Force"
53+
if errorlevel 1 (
54+
echo ERROR: Failed to extract FFmpeg.
55+
exit /b 1
56+
)
57+
58+
echo Searching for ffmpeg.exe...
59+
set "FFMPEG_BIN_DIR="
60+
for /r "%TEMP_DIR%" %%I in (ffmpeg.exe) do (
61+
set "FFMPEG_BIN_DIR=%%~dpI"
62+
goto :found_ffmpeg
63+
)
64+
:found_ffmpeg
65+
if not defined FFMPEG_BIN_DIR (
66+
echo ERROR: ffmpeg.exe not found after extraction
67+
exit /b 1
68+
)
69+
echo ffmpeg.exe found at: %FFMPEG_BIN_DIR%
70+
71+
echo Copying FFmpeg to tools folder...
72+
xcopy /E /I /Y "%FFMPEG_BIN_DIR%" "%TOOLS_DIR%\ffmpeg"
73+
if errorlevel 1 (
74+
echo ERROR: Failed to copy FFmpeg to %TOOLS_DIR%\ffmpeg
75+
exit /b 1
76+
)
77+
echo FFmpeg installed successfully.
78+
)
79+
80+
:: ---------------- Update PATH ----------------
81+
echo Updating user PATH...
82+
for /f "tokens=2*" %%a in ('reg query "HKCU\Environment" /v PATH 2^>nul') do set "OLD_PATH=%%b"
83+
if not defined OLD_PATH set "OLD_PATH=%PATH%"
84+
setx PATH "%TOOLS_DIR%\ffmpeg;%OLD_PATH%"
85+
echo PATH updated. Please open a new Command Prompt to use ffmpeg and yt-dlp.
86+
87+
:: ---------------- Cleanup ----------------
88+
echo Cleaning up temporary files...
89+
rmdir /S /Q "%TEMP_DIR%" >nul 2>&1
90+
91+
echo -------------------------------
92+
echo Installation complete.
93+
echo You can now run:
94+
echo yt-dlp --version
95+
echo ffmpeg -version
96+
pause
97+
exit /b 0

0 commit comments

Comments
 (0)