# Bunny Stream

[Bunny Stream](https://bunny.net/?ref=y6dodu4tnk) is a premium service, it provides a better way to deliver online video with low cost and large bandwidth, to Configure the Bunny Stream, you will need to have a bunny account.

{% hint style="info" %}
Support us by registering for a Bunny Account through this affiliate link [https://bunny.net?ref=y6dodu4tnk](https://bunny.net/?ref=y6dodu4tnk)
{% endhint %}

1. [Add Library](#add-library)
2. [Set Up API Access Key](#api)
3. [Set Up Webhook](#set-up-webhook)
4. [Secure Video With Token Authentication](#token-authentication)
5. [Auto Import New Videos](#auto-import)
6. [Bulk Import Videos](#bulk-import)
7. [Enable Download](#enable-download)
8. [Enable AI Captions Generator](#ai-captions)
9. [Video Help Guides](#video-help-guides)

#### Add Library <a href="#add-library" id="add-library"></a>

***

Navigate to **Stream > Add Video Library**, fill the name, choose **Storages** and click the **Add Video Library** button

<figure><img src="https://2226487161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqVWDZMetj6mBqmoSajgK%2Fuploads%2FQ5qUDLKtPTYfUw0QnwGf%2F1486033888.png?alt=media&#x26;token=9f30f220-72d7-4237-bdbe-e5bee611a8ea" alt=""><figcaption></figcaption></figure>

***

#### Set Up API Access Key <a href="#api" id="api"></a>

After adding Library successfully, click on the **Library > API** tab, copy the **Video Library ID**, **CDN Hostname** and **API Key**

<figure><img src="https://2226487161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqVWDZMetj6mBqmoSajgK%2Fuploads%2Fj3IfI14PTbaclsRoXfFs%2F3478991851.png?alt=media&#x26;token=e666736a-e176-46a7-ab05-62ac655f58da" alt=""><figcaption></figcaption></figure>

From WordPress backend, navigate to **Settings > Bunny Stream**, enter your the keys and click the **Save Changes** button, remember to check the **Enable** checkbox.

<figure><img src="https://2226487161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqVWDZMetj6mBqmoSajgK%2Fuploads%2F1Bwsw7FoYYxGFeGYyfTL%2Fsh-3300.png?alt=media&#x26;token=eab7946c-64ed-45eb-b594-0c1a2b936572" alt=""><figcaption><p>Bunny Stream Settings</p></figcaption></figure>

{% hint style="success" %}
It’s strongly recommended to enable the "Direct and Resumable" handler along with the "Auto" upload type.
{% endhint %}

***

#### Set Up WebHook

Navigate to **Settings > Bunny Stream** and copy your Webhook URL.

<figure><img src="https://2226487161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqVWDZMetj6mBqmoSajgK%2Fuploads%2FusINVTqsoNTFJRnKhVq8%2Fsh-3296.png?alt=media&#x26;token=c48b0ae7-3f89-497c-9b6e-361911129d71" alt=""><figcaption><p>Copy Webhook URL</p></figcaption></figure>

Go to the Bunny Stream's API tab, enter your Webhook URL, save changes.

<figure><img src="https://2226487161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqVWDZMetj6mBqmoSajgK%2Fuploads%2Fsr7lpH0lmpLNRyW9uVFf%2Fsh-3297.png?alt=media&#x26;token=1faf5a8e-96ca-4053-9a83-334d2fe1cb10" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
The Webhook feature only works if your website is publicly accessible by Bunny Stream, which means it won't function on local or intranet environments.
{% endhint %}

{% hint style="warning" %}
IIf you change your host, domain, or move your website, be sure to verify the webhook URL, as it may have changed. Make sure the URL copied from your WordPress dashboard matches the one added in the Bunny API tab.
{% endhint %}

***

#### Secure Video With Token Authentication <a href="#token-authentication" id="token-authentication"></a>

Navigate to the Security tab, and enter your **Token Authentication Key** along with a custom expiration time

<figure><img src="https://2226487161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqVWDZMetj6mBqmoSajgK%2Fuploads%2FkczMpSgWkJzJ7u7l9Ybm%2F2112689783.png?alt=media&#x26;token=1ce42a2a-43b0-48d6-ab1b-92d1dac71af9" alt=""><figcaption></figcaption></figure>

The **Token Authentication Key** can be found in your Library under the **Security** tab, Remember to enable the **Embed View Token Authentication** and **CDN Token Authentication** options, as shown in the screenshot below.

![](https://2226487161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqVWDZMetj6mBqmoSajgK%2Fuploads%2F7SyaSHjqE1yk8sAs9ALY%2F6392453643.png?alt=media\&token=69fab830-3bcf-468b-b60c-444440095dca)

{% embed url="<https://www.youtube.com/watch?v=O7pgJwhAPWQ>" %}

#### Auto Import New Videos <a href="#auto-import" id="auto-import"></a>

Enabling Auto-Import will automatically import new videos from Bunny Stream using Webhook without manual action. Navigate to the Import tab to configure the desired options.

<figure><img src="https://2226487161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqVWDZMetj6mBqmoSajgK%2Fuploads%2FWAPdCYfWG4R5TRsONSx0%2F9267574485.png?alt=media&#x26;token=87543b2f-164a-45f0-aaa6-deec33396983" alt=""><figcaption></figcaption></figure>

{% embed url="<https://www.youtube.com/watch?v=UBIgmv6ucJ0>" %}

#### Bulk Import Videos <a href="#bulk-import" id="bulk-import"></a>

With this feature, you can bulk import all videos or specific ones from Bunny into your WordPress website.

<figure><img src="https://2226487161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqVWDZMetj6mBqmoSajgK%2Fuploads%2FlO800wBYnsEAQTozGFzr%2F7374730678.png?alt=media&#x26;token=ea730f42-2704-47a9-b0ab-2cd4b900e25d" alt=""><figcaption></figcaption></figure>

{% embed url="<https://www.youtube.com/watch?v=ESbGEgZRt3o>" %}

#### Enable Download <a href="#enable-download" id="enable-download"></a>

***

**Step 1**: To enable the Download feature, go to **Appearance > Customize > Theme Options > Misc**, In this section, turn on the Download button and choose whether to allow non-logged in users or only logged-in users to have the download permission.\\

Downloading Bunny video is only available if you utilize the Bunny AP

<figure><img src="https://2226487161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqVWDZMetj6mBqmoSajgK%2Fuploads%2FL6n3D1KgdX6KLXERof5f%2F9412310193.png?alt=media&#x26;token=21bcd096-b6c1-40d4-ad64-41f1919292eb" alt=""><figcaption></figcaption></figure>

**Step 2**: Go to your Bunny **Dashboard > Stream** page, choose the **Library**, click the **Encoding** menu and enable the **Keep Original Files** option.

<figure><img src="https://2226487161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqVWDZMetj6mBqmoSajgK%2Fuploads%2F7iRySfm54Mhtkwr1t8Ho%2F4648554193.png?alt=media&#x26;token=7aecdb35-aff4-4261-9052-f5ec28c98e7e" alt=""><figcaption></figcaption></figure>

**Step 3**: Click the **API** menu and click the **MANAGE** button.

<figure><img src="https://2226487161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqVWDZMetj6mBqmoSajgK%2Fuploads%2FfTcBFZ2bxBZ19uGqQZke%2F1990994955.png?alt=media&#x26;token=5554a533-1b4d-4aef-bd69-c5456154634b" alt=""><figcaption></figcaption></figure>

**Step 4**: click the **Edge Rules** and click the **ADD ADGE RULE** button.

<figure><img src="https://2226487161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqVWDZMetj6mBqmoSajgK%2Fuploads%2Fdi9BpynY3K1mv1wpoACb%2F1269373396.png?alt=media&#x26;token=daa2fb27-2929-408e-8517-e54017851596" alt=""><figcaption></figcaption></figure>

**Step 5**: Fill in all fields as shown in the following screenshot.

1. **(1)** Select **Set Response header**
2. **(2)** Enter **Content-Disposition** in the **Header Name** field
3. **(3)** Enter **attachment; filename="%{Query.name}"** in the **Header value** field
4. **(4)** Enter a description, for instance: download file
5. **(5)** Click the **MATCH ANY** button and add two condition fields as shown in the screenshot.
6. **(6)** Finally, click the **SAVE EDGE RULE** button

<figure><img src="https://2226487161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqVWDZMetj6mBqmoSajgK%2Fuploads%2FBekxnDfLPOXPW3EuzSJd%2F9019730602.png?alt=media&#x26;token=1cb5b225-bc7f-494f-9953-025126900309" alt=""><figcaption></figcaption></figure>

***

#### Enable AI Captions Generator <a href="#ai-captions" id="ai-captions"></a>

* Navigate to your Bunny Dashboard
* Select a Stream
* Go to the "**Transcribing**" section.
* Enable "**Enable Transcribing**" option
* Select the languages you want to generate captions for.

<figure><img src="https://2226487161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqVWDZMetj6mBqmoSajgK%2Fuploads%2FJU3BBENnLnoiqV2DKMWO%2F2414914390.png?alt=media&#x26;token=961a4061-ddf2-4df9-91c8-f75bf9cdc4d5" alt=""><figcaption></figcaption></figure>

Consider the associated costs before enabling this option.

Enabling Transcribing only applies to newly uploaded videos.

***

#### Video Help Guides <a href="#video-help-guides" id="video-help-guides"></a>

{% embed url="<https://www.youtube.com/watch?v=s7fJptfyxv8>" %}

{% embed url="<https://www.youtube.com/watch?v=uErhG4PToZA>" %}

{% embed url="<https://www.youtube.com/watch?v=Q8BQ3JH1Yko>" %}
