For Bunny Stream libraries

    Move your library from Bunny Stream, then protect it with DRM.

    A short script reads your Bunny library and writes a CSV of download links. You drop that CSV into StreamVault, and we fetch each file, encode it and, in a project with Studio DRM on, package it for Widevine, PlayReady and FairPlay.

    The script only reads from Bunny, runs on your computer, and sends your API key nowhere except to Bunny.

    Two things worth being straight about

    This is a move, not a plug-in. DRM is applied while a video is encoded and packaged, and it plays from StreamVault's delivery. A video that stays on Bunny can't be protected by us.

    The old copies stay where they are. Protecting the new copy doesn't touch the one at Bunny. Once your embeds point at StreamVault, delete the videos at Bunny, or the copies there stay as exposed as they are today.

    How it works

    1. Get three things from Bunny

    In the Bunny dashboard, open Stream, then your library, then API and webhook integration. Copy the library ID, the CDN hostname (it looks like vz-1a2b3c4d-5e6.b-cdn.net) and the library's own API key, not your account-wide key. The Read-only API Key listed under it is enough, because the script only reads.

    2. Run the export script

    Download bunny-export.py and run it with your library ID and hostname. It asks for the API key with the typing hidden, lists every video, checks that each link downloads the way our servers will fetch it, and writes bunny-export.csv.

    # macOS or Linux
    python3 bunny-export.py --library 12345 --cdn vz-1a2b3c4d-5e6.b-cdn.net
    
    # Windows
    py bunny-export.py --library 12345 --cdn vz-1a2b3c4d-5e6.b-cdn.net

    It needs Python 3.8 or newer and nothing else. Add --limit 5 for a trial run on five videos. You'll see something like this:

    Exported 471 of 480 videos to bunny-export.csv
      412 original files, 59 MP4 copies at up to 1080p
    Left out 9, listed with the reason in bunny-export-skipped.csv:
      7  no original file and no MP4 copy at Bunny
      2  refused by Bunny (HTTP 403)

    Keep the CSV private: anyone who has a link in it can download that video from Bunny until you delete it there.

    3. Switch DRM on, then import

    DRM is applied while each video is processed, so first turn on Studio DRM on every new video in the settings of the project you're importing into. Then sign in, open Bring videos over and drop bunny-export.csv on the page. Keep the page open while the videos are sent; when it says they're on the way, you can close it, because we fetch and encode them on our side.

    If your library has collections, the importer offers one project per collection. A project the importer creates starts with DRM off, so map each collection onto a project that already has it on, or untick the box and add everything to one protected project.

    4. Swap the embeds

    Replace each Bunny player embed on your site or LMS with the StreamVault one. Keep the Bunny library until the new embeds are live, then delete the videos there.

    What comes across

    Video filesYes — the original when Bunny hands it out, otherwise Bunny's MP4 copy (1080p at most)
    Titles and descriptionsYes
    CollectionsYes — can become projects, and you see the mapping first
    CaptionsYes — the tracks you already have at Bunny
    ThumbnailsYes — generated again from the video
    Bunny view statistics, chapters and player settingsNo — these stay with Bunny

    Still have your original masters on a drive? Upload those instead: an original master is better than any copy. The export is for the libraries where Bunny holds the only copy.

    If Bunny refuses a download

    Our servers fetch each file with no referrer and no token, like any link you'd paste. Three settings under Stream, your library, Security stop that. The script reports them as HTTP 403 and lists the videos it couldn't reach:

    • Token Authentication — switch it off for the length of the move.
    • Allowed domains — clear the list for the length of the move.
    • Block Direct URL File Access — Bunny has this on in a new library, so it is the one most people have to switch off for the length of the move.

    Switch them back on once everything has come across. Bunny's documentation says its MediaCage DRM blocks direct access to the video files and turns off the MP4 fallback, so for a library that uses it this route can't fetch them; email us.

    Original files are a separate case. Even with those three off, Bunny answers a request for an original with HTTP 403 unless Early-Play is on (Stream, your library, Encoding). Bunny says Early-Play publicly exposes the original files, and in our test an original was still being served more than half an hour after we switched it off again, so we don't ask you to switch it on. The script uses Bunny's MP4 copy instead (1080p at most) and tells you how many videos that applied to. If you need the full-quality originals, email us before you change that switch.

    An HTTP 404 means Bunny has no file at that link, usually because it didn't keep an original of that video. The script then uses the MP4 copy if there is one, and lists the rest in bunny-export-skipped.csv. Two settings under Stream, your library, Encoding decide what Bunny keeps: Keep Original Files and Enable MP4 Fallback. Bunny says both must be on before a video is uploaded, so they can't bring back files for videos already there.

    Stuck, or a big library?

    Email video@streamvault.one with roughly how many videos you have and how many hours or GB in total, and we'll help you through it. Please don't email your API key.

    Questions people ask

    Does StreamVault's DRM work with Bunny CDN?

    Not on top of it. StreamVault applies DRM while it encodes and packages a video, and plays the result from its own delivery, so a video that stays on Bunny can't be protected by us. What works is a move: export your library from Bunny, import it into StreamVault, and swap the embed code on your site or LMS.

    Will my videos stop playing on Bunny when I move?

    No. The export and the import only read from Bunny, so your videos keep playing there until you delete or restrict them. The one thing you may have to change at Bunny is a security setting, for the length of the move (see If Bunny refuses a download). The old copies stay at Bunny, as exposed as they are today, until you delete them, so remove them once your embeds point to StreamVault.

    What if Bunny didn't keep my original files?

    Bunny keeps an original only if Keep Original Files was on when the video was uploaded, and it hands that original out only while Early-Play is switched on for the library; Bunny says that switch publicly exposes the original files, so most people leave it off. Without an original the export uses Bunny's MP4 copy (1080p at most), and that exists only if Enable MP4 Fallback was on before the upload. A video with neither is listed in a separate file; it needs another route, so email us.

    Do my captions and collections come across?

    Captions you already have at Bunny are imported with each video as subtitle tracks, and each collection can become a project; you see the mapping before anything is created. Bunny's view statistics, chapters and player settings stay at Bunny.

    Is it safe to use my Bunny API key?

    The script runs on your computer and sends the key only to Bunny's API. It doesn't write the key to a file or print it, and it never contacts StreamVault. The library's Read-only API Key is enough for it, so you don't have to hand it the full key. It is one Python file you can read before you run it, and running it with --selftest tests it against a built-in fake Bunny, with no account and no internet connection.