PHPackages                             eriksiemund/kirby-mux - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. eriksiemund/kirby-mux

ActiveKirby-plugin[Image &amp; Media](/categories/media)

eriksiemund/kirby-mux
=====================

Upload videos to MUX from the Kirby CMS panel. @forked from robinscholz/kirby-mux and dev-ofty/kirby-mux

v0.2.2(2mo ago)07MITPHPPHP &gt;=8.1.0

Since Apr 9Pushed 2mo agoCompare

[ Source](https://github.com/eriksiemund/kirby-mux)[ Packagist](https://packagist.org/packages/eriksiemund/kirby-mux)[ Docs](https://github.com/eriksiemund/kirby-mux#readme)[ RSS](/packages/eriksiemund-kirby-mux/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (5)Versions (6)Used By (0)

📼 Kirby Mux
===========

[](#-kirby-mux)

A [Kirby](https://getkirby.com) plugin to upload video and audio files to [Mux](https://mux.com).

> **Fork Notice**: This is a fork of [dev-ofty/kirby-mux](https://github.com/dev-ofty/kirby-mux) which is a fork of [robinscholz/kirby-mux](https://github.com/robinscholz/kirby-mux) with additional features.

Installation
------------

[](#installation)

### Download

[](#download)

Download and copy this repository to `/site/plugins/kirby-mux`.

### Git submodule

[](#git-submodule)

```
git submodule add https://github.com/eriksiemund/kirby-mux.git site/plugins/kirby-mux

```

### Composer

[](#composer)

Since this package is not on Packagist, you need to add the repository to your `composer.json`:

```
{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/eriksiemund/kirby-mux"
    }
  ],
  "require": {
    "eriksiemund/kirby-mux": "dev-main"
  }
}
```

Then run:

```
composer update
```

### Post-Installation

[](#post-installation)

After installing via any method, you **must** run:

```
cd site/plugins/kirby-mux
composer install
```

This installs the required PHP dependencies (Mux PHP SDK, dotenv, getID3).

#### Installation with Public Folder Structure

[](#installation-with-public-folder-structure)

If you're using a public folder structure (where your web root is `/public` for security), the plugin will automatically detect and work with this setup. The autoloader will be found in the correct location.

Example structure:

```
/your-project/
├── public/              ← Web root
│   └── index.php
├── site/
│   ├── config/
│   └── plugins/
│       └── kirby-mux/
├── vendor/              ← Composer dependencies
└── .env                 ← Environment file

```

Configuration
-------------

[](#configuration)

### Environment Variables

[](#environment-variables)

Add a `.env` file to your Kirby installation with the following properties:

KeyTypeDescriptionMUX\_TOKEN\_ID`String`Your Mux API Access Token IDMUX\_TOKEN\_SECRET`String`Your Mux API Access Token SecretMUX\_DEV`Boolean`Enable development mode#### MUX\_TOKEN\_ID

[](#mux_token_id)

In order for the plugin to work, you need to create an `API Access Token` on the MUX dashboard. Save the `Token ID` here.

#### MUX\_TOKEN\_SECRET

[](#mux_token_secret)

Save the associated `Token Secret` here.

#### MUX\_DEV

[](#mux_dev)

Set this to `true` for local development. Instead of the actual video, the plugin will upload a test video to Mux. This is necessary, since videos need to be publicly hosted for Mux to be able to import them.

> **NOTE:** This plugin includes a .env.example file as well.

#### `.env` File Location

[](#env-file-location)

The plugin automatically searches for your `.env` file in the following locations:

1. **Plugin directory** - `site/plugins/kirby-mux/.env`
2. **Kirby root** - `/path/to/your-project/.env` (standard installation)
3. **Parent directories** - Automatically searches up the directory tree
4. **Public folder setups** - Works with installations using a separate `public/` directory

If you have a non-standard installation or need to specify a custom path, see the **envPath** option below.

### Plugin Options

[](#plugin-options)

Add the following options to your `site/config/config.php` file:

```
return [
    'robinscholz.kirby-mux.optimizeDiskSpace' => false,
    'robinscholz.kirby-mux.envPath' => null, // optional
];
```

#### optimizeDiskSpace

[](#optimizediskspace)

**Type:** `Boolean`**Default:** `false`

When set to `true`, the plugin will download and store MP4 video files locally after uploading to Mux. This creates a local backup of your videos and reduces dependency on Mux's streaming service.

When set to `false` (default), videos are only stored on Mux and streamed from there, saving local disk space.

#### envPath

[](#envpath)

**Type:** `String|null`**Default:** `null`

Specify a custom path to your `.env` file or the directory containing it. This is useful for non-standard Kirby installations or when using a `public/` folder structure.

**Examples:**

```
// Standard installation with public folder
return [
    'robinscholz.kirby-mux.envPath' => dirname(__DIR__, 2), // Points to project root
];
```

```
// Custom .env location
return [
    'robinscholz.kirby-mux.envPath' => '/var/www/myproject/.env',
];
```

```
// Directory containing .env
return [
    'robinscholz.kirby-mux.envPath' => '/var/www/myproject',
];
```

> **Note:** If not specified, the plugin automatically searches common Kirby installation locations.

What's New in This Fork
-----------------------

[](#whats-new-in-this-fork)

The fork of dev-ofty includes several enhancements over the original of robinscholz:

1. **Audio Support**: Upload and stream audio files (MP3, etc.) in addition to videos
2. **Video Dimension Analysis**: Automatically extracts and stores video dimensions and aspect ratios using getID3
3. **MP4 Support**: Enables standard MP4 downloads alongside HLS streaming
4. **Vue 3 Components**: All components updated to use Vue 3 Composition API with modern best practices
5. **Improved Error Handling**: Better error handling and user feedback
6. **Flexible Installation**: Automatic detection of different Kirby installation structures (standard, public folder, composer-managed)
7. **Configurable `.env` Path**: Set a custom path for your environment file via plugin options

This fork includes several enhancements over the fork of dev-ofty:

1. **Webhooks**: Replace pulling with Webhooks for video status changes.
2. **Panel Block**: Add visual Kirby CMS block preview.
3. **Teaser Video**: Add option for local teaser video.

...

Caveats
-------

[](#caveats)

The plugin does not include any frontend facing code or snippets. In order to stream the videos from Mux you need to implement your own custom video player. [HLS.js](https://github.com/video-dev/hls.js/) is a good option for example.

Plugin Development
------------------

[](#plugin-development)

[Kirbyup](https://github.com/johannschopplich/kirbyup) is used for the development and build setup.

Kirbyup will be fetched remotely with your first `npm run` command, which may take a short amount of time.

### Development

[](#development)

Start the dev process with:

```
npm run dev

```

This will automatically update the `index.js` and `index.css` of the plugin as soon as changes are made. Reload the Panel to see the code changes reflected.

### Production

[](#production)

Build final files with:

```
npm run build

```

This will automatically create a minified and optimized version of the `index.js` and `index.css`.

License
-------

[](#license)

MIT

Credits
-------

[](#credits)

- Original plugin by [Robin Scholz](https://github.com/robinscholz)
- Fork with additional features by [Dev Ofty](https://github.com/dev-ofty)
- Fork with additional features by [Erik Siemund](https://github.com/eriksiemund)

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance83

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

5

Last Release

88d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/35425245?v=4)[eriksiemund](/maintainers/eriksiemund)[@eriksiemund](https://github.com/eriksiemund)

---

Top Contributors

[![dev-ofty](https://avatars.githubusercontent.com/u/63539961?v=4)](https://github.com/dev-ofty "dev-ofty (16 commits)")

---

Tags

streamvideokirbymux

### Embed Badge

![Health badge](/badges/eriksiemund-kirby-mux/health.svg)

```
[![Health](https://phpackages.com/badges/eriksiemund-kirby-mux/health.svg)](https://phpackages.com/packages/eriksiemund-kirby-mux)
```

###  Alternatives

[getkirby/cms

The Kirby core

1.5k584.8k490](/packages/getkirby-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)[daun/statamic-mux

Seamless video encoding and streaming using Mux on Statamic sites

133.0k](/packages/daun-statamic-mux)[medienbaecker/kirby-modules

Easily add modules to your pages

895.5k1](/packages/medienbaecker-kirby-modules)[mostafaznv/nova-video

Video Field for Laravel Nova

22464.5k2](/packages/mostafaznv-nova-video)[timnarr/kirby-imagex

Modern images for Kirby CMS – This plugin helps you orchestrate modern, responsive and performant images in Kirby

828.7k1](/packages/timnarr-kirby-imagex)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
