🎬 MP4MDL - Video Downloader Library
MP4MDL est une bibliothèque Python optimisée pour télécharger des vidéos MP4 depuis divers sites de streaming. Cette bibliothèque fournit une interface simple et efficace pour le téléchargement de vidéos avec suivi de progression et gestion d'erreurs robuste.
🌐 Sites Supportés
MP4MDL supporte 12 domaines de lecteurs. Le lecteur est choisi d'après le domaine de l'URL.
| # | Domaine | Format d'URL | Type |
|---|---|---|---|
| 1 | video.sibnet.ru | https://video.sibnet.ru/shell.php?videoid=NUM |
MP4 direct |
| 2 | vidmoly.to | https://vidmoly.to/embed-ID.html |
HLS |
| 3 | vidmoly.biz | https://vidmoly.biz/embed-ID.html |
HLS |
| 4 | vidmoly.org | https://vidmoly.org/embed-ID.html |
HLS |
| 5 | vidmoly.me | https://vidmoly.me/embed-ID.html |
HLS |
| 6 | ansembed.net | https://ansembed.net/embed-ID.html |
HLS |
| 7 | oneupload.to | https://oneupload.to/embed-ID.html |
HLS |
| 8 | sendvid.com | https://sendvid.com/embed/ID |
MP4 direct |
| 9 | uqload.vc | https://uqload.vc/embed-ID.html |
HLS (obfusqué) |
| 10 | uqload.is | https://uqload.is/embed-ID.html |
HLS (obfusqué) |
| 11 | callistanise.com | https://callistanise.com/embed/ID |
HLS (obfusqué) |
| 12 | minochinos.com | https://minochinos.com/embed/ID |
HLS (obfusqué) |
uqload.com n'est pas supporté. Pour le vérifier dans le code : supports(url) (voir plus bas).
👉 Tableau complet : 🌐 Sites Supportés
🚀 Installation Rapide
🎬 Prérequis
| Logiciel | Version | Note |
|---|---|---|
| Python | 3.6+ | Version minimale requise |
| FFMPEG | Tout | Obligatoire pour les lecteurs HLS (pas pour Sibnet et Sendvid) |
Installation de MP4MDL:
pip install mp4mdl
Installation de FFMPEG
Windows avec Chocolatey:
choco install ffmpeg -y
Windows sans Chocolatey:
- Télécharger depuis ffmpeg.org
- Extraire et ajouter au PATH système
- Vérifier :
ffmpeg -version
Linux:
sudo apt-get update
sudo apt-get install ffmpeg
macOS:
brew install ffmpeg
📖 Utilisation Rapide
Exemple Simple
from mp4mdl import mp4mdl
# URL de la vidéo à télécharger
url = "https://video.sibnet.ru/shell.php?videoid=12345"
# Créer une instance du downloader
downloader = mp4mdl(
download_path=r"F:\temp", # Dossier temporaire
final_path=r"F:\final\test.mp4", # Fichier final
url=url, # URL de la vidéo
title="test_video" # Nom pour le logger
)
# Lancer le téléchargement
status = downloader.download()
print(f"Statut du téléchargement: {status}")
Sortie Possible
True- Téléchargement réussi ✅False- Échec du téléchargement ❌ (la raison est dansdownloader.reason)
Pourquoi ça a échoué (0.2.0)
Après un False, downloader.reason dit pourquoi, et downloader.error donne le message :
reason |
Sens | Le lien est mort ? |
|---|---|---|
not_found |
La page ou le fichier n'existe plus (404 / 410) | oui |
no_video |
La page répond, mais sans vidéo dedans | oui |
blocked |
Refusé (403 / 429) : IP ou en-têtes | non |
network |
Coupure, délai dépassé, erreur 5xx | non |
unsupported |
Lecteur que mp4mdl ne sait pas lire | non |
file |
Problème disque | non |
unknown |
Erreur inattendue | non |
downloader.link_dead vaut True pour not_found et no_video.
Avancement (0.2.0)
def avancement(event):
# event = {"stage": "resolve" | "download" | "move" | "done", "percent": 42.5 ou None,
# "downloaded": octets, "total": octets ou None, "speed": octets/s ou None,
# "position": secondes faites ou None, "duration": durée totale ou None}
print(event["stage"], event["percent"])
downloader.download(progress=avancement)
Au plus deux appels par seconde, plus un à chaque changement d'étape. Une erreur dans votre fonction n'arrête pas le téléchargement.
Lecteurs supportés (0.2.0)
from mp4mdl import supported_hosts, supports
supported_hosts() # frozenset des domaines
supports("https://vidmoly.to/embed-x.html") # True
Pour ajouter un lecteur : une ligne dans SUPPORTED_SITES (mp4mdl/mp4mdl.py), puis une nouvelle version.
En ligne de commande
mp4mdl "https://vidmoly.to/embed-x.html" episode.mp4
mp4mdl --hosts
mp4mdl --version
👉 Détails : 📊 Avancement et Erreurs
📄 Licence
Cette bibliothèque est sous licence MIT. Vous pouvez l'utiliser librement:
- ✅ Usage personnel
- ✅ Modification du code
- ✅ Usage commercial
- ✅ Distribution
- ✅ Usage privé
La seule condition de la licence MIT : garder la notice de copyright et de licence dans les copies du code.
🤝 Support
Pour de l'aide supplémentaire:
- Documentation complète: wiki
- Signaler un bug: GitHub Issues
Metadata
Release files for mp4mdl 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mp4mdl-0.2.0.tar.gz | 20.1 kB | Without provenance | Details for mp4mdl-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mp4mdl-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for mp4mdl-0.2.0-py3-none-any.whl |
Total release size: 41.3 kB
Release files / mp4mdl-0.2.0.tar.gz
| Download URL | mp4mdl-0.2.0.tar.gz |
|---|---|
| Size | 20.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2dc92c9da4542c5c5e11a0585a20eac0b18801a053916d4f89cd9f8635dd47fb
|
|
BLAKE2b-256 checksum How to use checksums |
526f97ea7d529b80e7f908ee02993e6157ee298b53944b7581c4b869c78b72fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / mp4mdl-0.2.0-py3-none-any.whl
| Download URL | mp4mdl-0.2.0-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35fa064e6f03cfd2ad129cebcdcad409b0a225be96cecacda28211ae2aced135
|
|
BLAKE2b-256 checksum How to use checksums |
433e6548925352c33d346b0792988ee237d3d89a2cd119e61411a23499b923b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for mp4mdl 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.