A lightweight Python-based command-line tool that helps you fetch and process online media content with ease.
Built using the powerful yt-dlp library, this project demonstrates file handling, external library usage, and media conversion techniques in Python.
- π§ Fetch and save media files in high quality
- π§© Choose between full media or audio-only format
- π§ Automatically checks if FFmpeg is installed before audio conversion
- π Automatically organizes files in a
downloadsfolder - β‘ Clean and simple command-line interface
Make sure you have the following installed before running the project:
Download & install from: https://www.python.org/downloads/
Install the required Python packages using:
pip install yt-dlp ffmpeg-pythonFFmpeg is required only if you want to fetch audio formats.
If FFmpeg is not installed, the program will automatically show an error message and stop before continuing.
-
Windows:
Download from https://ffmpeg.org/download.html
After installation, make sure to add FFmpeg to PATH (so it works in Command Prompt).
You can verify by running:ffmpeg -version
-
Linux/macOS:
sudo apt install ffmpeg
or
brew install ffmpeg
-
Clone this repository:
git clone https://github.com/yourusername/mediafetch.git cd mediafetch -
Run the script:
python downloader.py
-
Enter the media link when prompted.
-
Choose:
- (v) β fetch video format
- (a) β fetch audio format (requires FFmpeg β automatically checked)
-
Wait for the process to complete β your file will appear in the
downloads/folder.
π Thatβs it! Youβve successfully fetched your media.
MediaFetch/
β
βββ downloader.py # Main Python script
βββ downloads/ # Output directory for saved media
βββ README.md # This file
This project was built to understand:
- Using external libraries (
yt-dlp) - Handling file operations in Python
- Detecting system utilities like FFmpeg
- Command-line interface interaction
This tool is developed strictly for educational purposes and personal use only.
It does not promote or encourage unauthorized media downloading or redistribution.
β If you found this project useful, donβt forget to star the repo and share your feedback!