Hi everyone,
I have been reading through this forum trying to find a way to download a video from iframe.mediadelivery.net.
So far, I have tried yt-dlb and a tool called N_m3u8DL, but with yt-dlb i fail to actually these the video (403: forbidden) and with N_m3u8DL I manage to download "a" video, but it is all scrambled.
In a thread from 2023, this github repo is mentioned - https://github.com/MaZED-UP/bunny-cdn-drm-video-dl - but on that page it saysNow I am trying to understand how to use yt-dlb directly, but to no avail"ARCHIVED / DISCONTINUED. This repository is preserved for historical reasons only. The codebase has been modernized and refactored as a tribute to the original work, but it is no longer functional.
Recommendation: Please use yt-dlp directly. It now natively supports downloading both "DRM" and non-"DRM" BunnyCDN videos without requiring external scripts."
Do you have any ideas?
+ Reply to Thread
Results 1 to 5 of 5
-
-
Hi,
most sites use Dash (MPD) encrypted videos; you'll need to retrieve the video's decryption key.
You will need to use WidevineProxy2 and a URL to retrieve device.wvd : https://forum.videohelp.com/threads/417425-Real-Device-L3-Cdms
With this program you will obtain the video encryption key and download with N_3u8dl-re. Choose the format as mp4 or mkv. -
I made a simplified version but in French, it's up to you to translate it into your language.
bunny_auto_best.py
in requirements.txt:Code:import sys from pathlib import Path from bs4 import BeautifulSoup import requests from src.config import DownloadConfig from src.downloader import BunnyVideoDRM from src.exceptions import BunnyVideoError from yt_dlp.utils import get_browser_cookies # Dossier par défaut pour les téléchargements DOWNLOAD_FOLDER = Path("./BunnyDownloads") DOWNLOAD_FOLDER.mkdir(exist_ok=True) # Liste pour garder la trace des vidéos téléchargées downloaded_videos = [] # Priorité des formats : MP4 1080p > MP4 720p > WebM 1080p > WebM 720p FORMAT_PRIORITY = ["mp4-1080p", "mp4-720p", "webm-1080p", "webm-720p"] def extract_iframe_urls(page_url: str) -> list[str]: """Récupère tous les iframes BunnyCDN sur une page web.""" headers = {"User-Agent": "Mozilla/5.0"} resp = requests.get(page_url, headers=headers) resp.raise_for_status() soup = BeautifulSoup(resp.text, "html.parser") return [iframe["src"] for iframe in soup.find_all("iframe") if iframe.get("src") and "iframe.mediadelivery.net/embed" in iframe.get("src")] def select_best_format(available_formats: list[str]) -> str: """Choisit automatiquement le meilleur format disponible selon la priorité.""" for fmt in FORMAT_PRIORITY: if fmt in available_formats: return fmt return available_formats[0] if available_formats else None def download_video(embed_url: str, page_url: str): """Télécharge une vidéo BunnyCDN avec le meilleur format automatique.""" try: # Récupération automatique des cookies depuis le navigateur cookies = get_browser_cookies(page_url, browser="chrome") # ou "firefox" # Initialisation de la configuration config = DownloadConfig( embed_url=embed_url, referer=page_url, path=str(DOWNLOAD_FOLDER), cookies=cookies ) video = BunnyVideoDRM(config) # Sélection automatique du meilleur format disponible if hasattr(video, "list_formats"): available_formats = video.list_formats() best_format = select_best_format(available_formats) if best_format: video.set_format(best_format) # Télécharger la vidéo video.download() downloaded_videos.append(video.file_name) except BunnyVideoError: pass # Ignorer les erreurs vidéo spécifiques except Exception: pass # Ignorer les erreurs inattendues def main(): if len(sys.argv) < 2: print("Usage: python bunny_auto_best.py <URL_DE_LA_PAGE>") sys.exit(1) page_url = sys.argv[1] try: urls = extract_iframe_urls(page_url) if not urls: print("Aucune vidéo BunnyCDN trouvée sur cette page.") return for i, url in enumerate(urls, 1): print(f"[{i}/{len(urls)}] Téléchargement automatique : {url}") download_video(url, page_url) # Résumé final if downloaded_videos: print(f"\nTéléchargement terminé ! {len(downloaded_videos)} vidéo(s) téléchargée(s) :") for vid in downloaded_videos: print(f"- {DOWNLOAD_FOLDER.resolve() / vid}") else: print("\nAucune vidéo n'a pu être téléchargée.") except Exception as e: print(f"Erreur critique : {e}") sys.exit(1) if __name__ == "__main__": main()
To install from Python: pip install -r requirements.txtbeautifulsoup4>=4.12.2
requests>=2.31.0
yt-dlp>=2026.01.28
How the script works:
Enter this command in the command prompt:<= Enter the URL of the video website.Code:bunny_auto_best.py "https://exemple.com/page-avec-videos"
Example output:
[1/3] Téléchargement automatique : https://iframe.mediadelivery.net/embed/abc123
[2/3] Téléchargement automatique : https://iframe.mediadelivery.net/embed/def456
[3/3] Téléchargement automatique : https://iframe.mediadelivery.net/embed/ghi789
Téléchargement terminé ! 3 vidéo(s) téléchargée(s) :
- /chemin/vers/BunnyDownloads/video1.mp4
- /chemin/vers/BunnyDownloads/video2.mp4
- /chemin/vers/BunnyDownloads/video3.mp4 -
I figured it out, it works now, thank you for your help
Last edited by laoia; 29th Jan 2026 at 04:02.
-
https://github.com/nonab/bunny-cdn-downloader/tree/main here's working downloader for both unprotected and aes-128 protected videos hosted on bunny
Similar Threads
-
How to download video from iframe.mediadelivery.net ?
By silverrulezz in forum Video Streaming DownloadingReplies: 43Last Post: 2nd Aug 2025, 01:13 -
Download from iframe.mediadelivery.net
By andreww in forum Video Streaming DownloadingReplies: 13Last Post: 19th Dec 2023, 15:55 -
download video from iframe.mediadelivery.net
By AceOne in forum Video Streaming DownloadingReplies: 1Last Post: 30th Sep 2023, 18:08 -
Help to download from iframe.mediadelivery.net
By safinok in forum Video Streaming DownloadingReplies: 1Last Post: 5th Apr 2023, 00:03 -
Downloading from iframe.mediadelivery.net stopped working
By monk87 in forum Video Streaming DownloadingReplies: 6Last Post: 3rd Jan 2023, 09:37



Quote