PHPackages                             tristantbg/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. tristantbg/kirby-mux

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

tristantbg/kirby-mux
====================

Upload videos directly to mux

v1.3.2(2mo ago)15↓100%MITPHP

Since Mar 12Pushed 2mo agoCompare

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

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

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

[](#-kirby-mux)

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

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

[](#installation)

### Download

[](#download)

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

### Git submodule

[](#git-submodule)

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

```

### Composer

[](#composer)

```
composer require tristantbg/kirby-mux

```

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

[](#configuration)

Add your Mux API credentials to your Kirby config file:

```
// site/config/config.php
return [
  'tristantbg.kirby-mux' => [
    'tokenId' => 'XXX', // Your Mux API Access Token ID
    'tokenSecret' => 'XXX', // Your Mux API Secret Key
  ],
];
```

### Options

[](#options)

OptionTypeDefaultDescription`tokenId``String``''`Your Mux API Access Token ID`tokenSecret``String``''`Your Mux API Secret Key`dev``Boolean``false`Use a test video instead of the actual upload`optimizeDiskSpace``Boolean``false`Download the low-res MP4 locally and replace the original### Dev Mode

[](#dev-mode)

Set `dev` 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 accessible for Mux to import them.

```
// site/config/config.php
return [
  'tristantbg.kirby-mux' => [
    'tokenId' => 'XXX',
    'tokenSecret' => 'XXX',
    'dev' => true,
  ],
];
```

Static Renditions
-----------------

[](#static-renditions)

The plugin automatically requests static MP4 renditions at **270p**, **720p**, and **1080p** for every uploaded video.

File Methods
------------

[](#file-methods)

All methods are available on Kirby `File` objects with a `mux` field.

### `$file->muxPlaybackId()`

[](#file-muxplaybackid)

Returns the Mux playback ID.

### `$file->muxUrlLow()`

[](#file-muxurllow)

Returns the URL to the **270p** static MP4 rendition. Waits for renditions to be ready if necessary.

### `$file->muxUrlHigh()`

[](#file-muxurlhigh)

Returns the URL to the **1080p** static MP4 rendition (falls back to **720p** if only one rendition file is available). Waits for renditions to be ready if necessary.

### `$file->muxUrlStream()`

[](#file-muxurlstream)

Returns the HLS streaming URL (`.m3u8`).

### `$file->muxThumbnail($width, $height, $time, $extension)`

[](#file-muxthumbnailwidth-height-time-extension)

Returns a Mux thumbnail URL.

ParameterTypeDefaultDescription`$width``int``null`Thumbnail width`$height``int``null`Thumbnail height (enables smartcrop)`$time``float``null`Time in seconds for the frame`$extension``string``jpg`Image format (`jpg`, `png`, `webp`)### `$file->muxThumbnailAnimated($width, $height, $start, $end, $fps, $extension)`

[](#file-muxthumbnailanimatedwidth-height-start-end-fps-extension)

Returns a Mux animated thumbnail URL.

ParameterTypeDefaultDescription`$width``int``null`Thumbnail width`$height``int``null`Thumbnail height`$start``float``null`Start time in seconds`$end``float``null`End time in seconds`$fps``int``null`Frames per second`$extension``string``gif`Format (`gif` or `webp`)### `$file->muxKirbyThumbnail()`

[](#file-muxkirbythumbnail)

Returns a Kirby `File` object for the Mux thumbnail. Downloads and saves the thumbnail locally on first call.

Hooks
-----

[](#hooks)

The plugin handles the full lifecycle of video files automatically:

- **`file.create:after`** — Uploads the video to Mux, waits for processing, saves a thumbnail, and stores asset data.
- **`file.delete:before`** — Deletes the Mux asset and removes the local thumbnail.
- **`file.replace:before`** — Deletes the old Mux asset.
- **`file.replace:after`** — Uploads the replacement video to Mux and processes it.

Blueprints
----------

[](#blueprints)

The plugin provides two blueprints:

- `files/mux-video` — File blueprint for Mux video files
- `blocks/mux-video` — Block blueprint for embedding Mux videos

Caveats
-------

[](#caveats)

The plugin does not include any frontend-facing code or snippets. To stream videos from Mux, implement your own video player. [HLS.js](https://github.com/video-dev/hls.js/) is a good option.

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance88

Actively maintained with recent releases

Popularity7

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 ~0 days

Total

4

Last Release

61d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/146a88578aae9cc4b1e62cd6599fe2dc94885400f40d23d88dede22debb1d056?d=identicon)[tristantbg](/maintainers/tristantbg)

---

Top Contributors

[![tristantbg](https://avatars.githubusercontent.com/u/4832038?v=4)](https://github.com/tristantbg "tristantbg (8 commits)")

---

Tags

streamvideokirbymux

### Embed Badge

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

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

###  Alternatives

[php-ffmpeg/php-ffmpeg

FFMpeg PHP, an Object Oriented library to communicate with AVconv / ffmpeg

5.0k21.7M165](/packages/php-ffmpeg-php-ffmpeg)[danog/madelineproto

Async PHP client API for the telegram MTProto protocol.

3.4k855.0k18](/packages/danog-madelineproto)[vimeo/vimeo-api

Official PHP library for the Vimeo API.

4637.1M32](/packages/vimeo-vimeo-api)[vimeo/laravel

A Vimeo bridge for Laravel

4161.5M4](/packages/vimeo-laravel)[opentok/opentok

OpenTok is a platform for creating real time streaming video applications, created by TokBox.

1413.0M10](/packages/opentok-opentok)[dereuromark/media-embed

A PHP library to deal with all those media services around, parsing their URLs and embedding their audio/video content in websites.

182530.3k11](/packages/dereuromark-media-embed)

PHPackages © 2026

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