|
| 1 | +# TikTok Video Downloader |
| 2 | + |
| 3 | +## Description |
| 4 | + |
| 5 | +This is a GUI-based TikTok Video Downloader built using Python. The software allows users to paste a TikTok video URL, select a save location, and download the video in high quality (MP4 format). The interface is designed with a modern look using `ttkthemes` and `ttkbootstrap`. |
| 6 | + |
| 7 | +### Features |
| 8 | + |
| 9 | +- Download TikTok videos in high quality (MP4 format). |
| 10 | +- User-friendly graphical interface. |
| 11 | +- Allows users to choose a save location before downloading. |
| 12 | +- Uses `yt-dlp` for extracting and downloading videos. |
| 13 | +- Modern UI with `ttkbootstrap` and `ttkthemes`. |
| 14 | +- Custom icon support. |
| 15 | + |
| 16 | +### Libraries Used |
| 17 | + |
| 18 | +The following Python libraries are used in this project: |
| 19 | + |
| 20 | +| Library | Purpose | |
| 21 | +|---------------|-------------------------------------------------------------------------| |
| 22 | +| `tkinter` | Provides the graphical user interface (GUI) framework. | |
| 23 | +| `yt-dlp` | Downloads videos from TikTok and other platforms. | |
| 24 | +| `ttkthemes` | Enhances the look and feel of the tkinter GUI. | |
| 25 | +| `ttkbootstrap`| Provides modern Bootstrap-themed widgets for tkinter. | |
| 26 | +| `os` | Used for handling file paths and checking the existence of the icon file.| |
| 27 | + |
| 28 | +## Installation |
| 29 | + |
| 30 | +1. **Install Python** (if not already installed): [Download Python](https://www.python.org/downloads/). |
| 31 | + |
| 32 | +2. **Install required dependencies** by running the following command: |
| 33 | + |
| 34 | + ```bash |
| 35 | + pip install yt-dlp ttkthemes ttkbootstrap tkinter |
| 36 | + ``` |
| 37 | + |
| 38 | +3. **Clone the repository or download the script**: |
| 39 | + |
| 40 | + ```bash |
| 41 | + git clone https://github.com/Tarekuzjaman0/TikTok-Downloader.git |
| 42 | + cd TikTok-Downloader |
| 43 | + ``` |
| 44 | + |
| 45 | +4. **Run the script**: |
| 46 | + |
| 47 | + ```bash |
| 48 | + python tiktok_downloader.py |
| 49 | + ``` |
| 50 | + |
| 51 | +## How the Code Works |
| 52 | + |
| 53 | +### GUI Setup: |
| 54 | +- The application is built using `tkinter`. |
| 55 | +- `ThemedTk` (from `ttkthemes`) is used to apply a modern UI theme. |
| 56 | +- `ttkbootstrap` provides enhanced Bootstrap-style widgets. |
| 57 | +- The application window is set to 450x250 pixels and is non-resizable. |
| 58 | +- A custom icon (`clock.ico`) is applied if it exists. |
| 59 | + |
| 60 | +### Downloading Process: |
| 61 | +- The user enters a TikTok video URL. |
| 62 | +- The `download_video` function validates the URL and prompts the user to select a save location. |
| 63 | +- The `yt-dlp` library is used to fetch and download the best available video and audio streams. |
| 64 | +- The downloaded file is merged and saved in MP4 format. |
| 65 | +- Success or error messages are displayed accordingly. |
| 66 | + |
| 67 | +## Usage |
| 68 | + |
| 69 | +1. Open the application. |
| 70 | +2. Enter a valid TikTok video URL in the input field. |
| 71 | +3. Click the **"Download Video"** button. |
| 72 | +4. Choose a folder where the video will be saved. |
| 73 | +5. Wait for the download to complete and check the selected folder for the video. |
| 74 | + |
| 75 | +## Notes |
| 76 | + |
| 77 | +- Ensure that `yt-dlp` is updated to the latest version for compatibility with TikTok: |
| 78 | + |
| 79 | + ```bash |
| 80 | + pip install --upgrade yt-dlp |
| 81 | + ``` |
| 82 | + |
| 83 | +- If downloading fails, check your internet connection and ensure the TikTok URL is accessible. |
| 84 | + |
| 85 | +## License |
| 86 | + |
| 87 | +This project is licensed under the MIT License - see the LICENSE file for details. |
0 commit comments