A Python-based tool for downloading and converting MPD (MPEG-DASH) streams to MP4 format.
- 🎬 Download video from MPD manifest URLs
- 📁 Process local MPD manifest files
- 🔄 Automatic best quality selection (video + audio)
- 📊 Real-time download progress display
- 🛠️ FFmpeg integration with fallback options
- Python 3.8+
- FFmpeg (optional, but recommended)
-
Clone the repository:
git clone https://github.com/20hajiyev/mpd2mp4.git cd mpd2mp4 -
Create a virtual environment (recommended):
python -m venv .venv # Windows .venv\Scripts\activate # macOS/Linux source .venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
Run the script:
python main.py-
Download from URL:
- Enter the
.mpdURL when prompted - Provide a filename for the output (e.g.,
video.mp4)
- Enter the
-
Convert local MPD file:
- Enter the local file path to the
.mpdfile - The tool will process it using FFmpeg
- Enter the local file path to the
=== MPD to MP4 Downloader ===
[Info] Using bundled FFmpeg from: ...
Enter the .mpd URL or Local File Path: https://example.com/video.mpd
Enter the desired output filename (e.g., video.mp4): my_video.mp4
[Info] Starting download for: my_video.mp4...
[Downloading] Progress: 45.2% | Speed: 2.5MiB/s | ETA: 00:30
[Finished] Download complete. Processing/Merging...
[Success] Successfully saved as 'my_video.mp4'
- Uses yt-dlp for downloading and processing MPD streams
- Uses FFmpeg for merging video/audio streams and local file processing
- Supports both remote URLs and local MPD files
- Automatically detects if MPD contains remote or local references
| Package | Description |
|---|---|
yt-dlp |
Video downloading library |
imageio-ffmpeg |
Bundled FFmpeg binaries |
This project is open source and available under the MIT License.
Contributions are welcome! Feel free to submit issues or pull requests.