PHPackages                             innoboxrr/video-processor - 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. innoboxrr/video-processor

ActiveLibrary[Image &amp; Media](/categories/media)

innoboxrr/video-processor
=========================

2.0.21(8mo ago)0116MITPHPCI passing

Since Mar 18Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/innoboxrr/video-processor)[ Packagist](https://packagist.org/packages/innoboxrr/video-processor)[ RSS](/packages/innoboxrr-video-processor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (44)Used By (0)

INSTALACION
===========

[](#instalacion)

CloudFrontService
-----------------

[](#cloudfrontservice)

Perfecto Raúl. A continuación te detallo exactamente **qué opciones debes seleccionar al crear una nueva distribución de CloudFront** para entregar **contenido HLS (.m3u8/.ts) con URLs firmadas usando el sistema moderno** (Public Keys y Key Groups).

---

🧭 PASO A PASO PARA CREAR TU DISTRIBUCIÓN CLOUDFRONT SEGURA
----------------------------------------------------------

[](#-paso-a-paso-para-crear-tu-distribución-cloudfront-segura)

---

### 🔹 1. **Distribution options**

[](#-1-distribution-options)

- ✅ **Selecciona:** `Single website or app`

---

### 🔹 2. **Origin**

[](#-2-origin)

- **Origin domain**: Si tu video está en un bucket S3 privado:

    ```
    nombre-del-bucket.s3.amazonaws.com

    ```

    > ⚠️ Asegúrate de que el bucket esté **privado** y tengas habilitado CloudFront como método de acceso.
- **Origin path (opcional)**: Deja vacío, a menos que todos tus videos estén en un subdirectorio como `/videos`.
- **Name**: Ponle un nombre descriptivo, como `s3-origin-videos`.
- **Add custom header**: No es necesario.
- **Enable Origin Shield**: ❌ No

---

### 🔹 3. **Default cache behavior**

[](#-3-default-cache-behavior)

- **Path pattern**: Default `(*)`
- **Compress objects automatically**: ✅ `Yes`

#### **Viewer**

[](#viewer)

- **Viewer protocol policy**: ✅ `Redirect HTTP to HTTPS`
- **Allowed HTTP methods**: ✅ `GET, HEAD` (solo necesitas servir archivos)
- **Restrict viewer access**: ✅ `Yes` → Esto es **esencial** para usar URLs firmadas.

#### **Cache key and origin requests**

[](#cache-key-and-origin-requests)

- ✅ `Cache policy and origin request policy (recommended)`

    - **Cache policy**: Selecciona: `CachingOptimized`
    - **Origin request policy**: Selecciona: `AllViewerExceptHostHeader` o crea uno nuevo si necesitas headers especiales.
    - **Response headers policy**: Opcional. Puedes dejarlo vacío.

---

### 🔹 4. **Function associations**

[](#-4-function-associations)

- ❌ No necesitas configurar funciones en este momento.

---

### 🔹 5. **Web Application Firewall (WAF)**

[](#-5-web-application-firewall-waf)

- ✅ Puedes seleccionar `Do not enable` (puedes agregarlo luego si necesitas protección).

---

### 🔹 6. **Price class**

[](#-6-price-class)

- ✅ Puedes seleccionar según tu público:

    - `Use only North America and Europe` si solo tienes usuarios en esas regiones
    - `Use all edge locations` para mejor rendimiento global

---

### 🔹 7. **Alternate domain name (CNAME)** (opcional)

[](#-7-alternate-domain-name-cname-opcional)

- Si vas a usar un dominio propio, agrégalo aquí (ej. `videos.tudominio.com`)
- Si no, deja vacío

---

### 🔹 8. **Custom SSL certificate**

[](#-8-custom-ssl-certificate)

- Si usaste un CNAME, aquí debes **seleccionar el certificado SSL** desde AWS Certificate Manager.
- Si no tienes uno aún, haz clic en **"Request certificate"**

> El certificado debe estar en la región `us-east-1` (Virginia del Norte).

---

### 🔹 9. **Supported HTTP versions**

[](#-9-supported-http-versions)

- ✅ Marca `HTTP/2` y `HTTP/3` (mejora de rendimiento)

---

### 🔹 10. **Default root object**

[](#-10-default-root-object)

- ❌ Déjalo vacío (no aplica para contenido HLS)

---

### 🔹 11. **IPv6**

[](#-11-ipv6)

- ✅ `On`

---

### 🔹 12. **Standard logging**

[](#-12-standard-logging)

- ❌ `Off` (puedes activarlo después si deseas auditar tráfico)

---

✅ FINALIZA
----------

[](#-finaliza)

Haz clic en **Create distribution**.

Una vez creada:

- Ve a **Behaviors &gt; Edit**
- En la sección de seguridad, asocia el **Key Group** que creaste anteriormente.

### kEY MANAGEMENT

[](#key-management)

#### 1. Genera tu par de claves (privada y pública RSA)

[](#1-genera-tu-par-de-claves-privada-y-pública-rsa)

En tu máquina local, corre:

```
openssl genrsa -out private_key.pem 2048
openssl rsa -pubout -in private_key.pem -out public_key.pem
```

Esto te dará:

- `private_key.pem`: la usarás para firmar las URLs.
- `public_key.pem`: la subirás a AWS.

#### 2. Crea la clave pública en AWS

[](#2-crea-la-clave-pública-en-aws)

1. Ve a [CloudFront &gt; Key Management &gt; Public Keys](https://console.aws.amazon.com/cloudfront/v3/home#/public-keys)
2. Haz clic en **"Create public key"**
3. Ponle un nombre y pega el contenido de `public_key.pem`
4. Guarda el `ID` de la clave pública (ejemplo: `K123ABC456XYZ`)

#### 3. Crea un **Key Group**

[](#3-crea-un-key-group)

1. Ve a **CloudFront &gt; Key Groups**
2. Haz clic en **"Create key group"**
3. Ponle nombre
4. Selecciona la clave pública que creaste antes
5. Guarda el **ID del Key Group** (ejemplo: `abcd1234-keygroup`)

#### 4. Asocia el Key Group a tu distribución de CloudFront

[](#4-asocia-el-key-group-a-tu-distribución-de-cloudfront)

1. Ve a tu distribución de CloudFront
2. En **Behaviors &gt; Edit**, busca la sección **Restrict viewer access (signed URLs or signed cookies)**
3. Selecciona **Yes**
4. En "Trusted key groups", agrega el Key Group creado

Guarda los cambios.

---

#### 5. Guarda tu clave privada en Laravel

[](#5-guarda-tu-clave-privada-en-laravel)

Guarda `private_key.pem` en tu proyecto, por ejemplo en:

```
storage/cloudfront/private_key.pem

```

---

#### 6. Agrega configuración en `.env`

[](#6-agrega-configuración-en-env)

```
CLOUDFRONT_DOMAIN=https://tudistribucion.cloudfront.net
CLOUDFRONT_PUBLIC_KEY_ID=K123ABC456XYZ
CLOUDFRONT_PRIVATE_KEY_PATH=storage/cloudfront/private_key.pem
CLOUDFRONT_URL_EXPIRATION=240

```

---

#### 7. Agrega la configuración a `config/videoprocessor.php`

[](#7-agrega-la-configuración-a-configvideoprocessorphp)

```
'cloudfront' => [
    'domain' => env('CLOUDFRONT_DOMAIN'),
    'public_key_id' => env('CLOUDFRONT_PUBLIC_KEY_ID'),
    'private_key_path' => base_path(env('CLOUDFRONT_PRIVATE_KEY_PATH')),
    'url_expiration' => env('CLOUDFRONT_URL_EXPIRATION', 240),
],
```

---

#### 8. Lógica para generar una URL firmada

[](#8-lógica-para-generar-una-url-firmada)

Aquí tienes una clase de servicio compatible con el sistema moderno:

```
use Carbon\Carbon;

class ModernCloudFrontService
{
    public function generateSignedUrl(string $resourceUrl): string
    {
        $expires = Carbon::now()->addMinutes(config('videoprocessor.cloudfront.url_expiration'))->timestamp;

        $policy = json_encode([
            'Statement' => [[
                'Resource' => $resourceUrl,
                'Condition' => [
                    'DateLessThan' => ['AWS:EpochTime' => $expires],
                ],
            ]],
        ]);

        $privateKey = file_get_contents(config('videoprocessor.cloudfront.private_key_path'));

        openssl_sign($policy, $signature, $privateKey, OPENSSL_ALGO_SHA1);
        $encodedPolicy = strtr(base64_encode($policy), ['+' => '-', '=' => '_', '/' => '~']);
        $encodedSignature = strtr(base64_encode($signature), ['+' => '-', '=' => '_', '/' => '~']);

        return $resourceUrl
            . '?Policy=' . $encodedPolicy
            . '&Signature=' . $encodedSignature
            . '&Key-Pair-Id=' . config('videoprocessor.cloudfront.public_key_id');
    }
}
```

---

#### 9. Cómo usarla

[](#9-cómo-usarla)

```
$service = new ModernCloudFrontService();
$url = $service->generateSignedUrl('https://tudistribucion.cloudfront.net/path/to/video/index.m3u8');
return redirect()->away($url);
```

---

#### ✅ Resultado

[](#-resultado)

El sistema generará URLs como:

```
https://yourcdn.cloudfront.net/video/abc/index.m3u8?Policy=...&Signature=...&Key-Pair-Id=K123ABC456XYZ

```

Y solo podrán reproducirse si son válidas y no han expirado.

---

Notificaciones de SNS para el procesamiento de MediaConverter
-------------------------------------------------------------

[](#notificaciones-de-sns-para-el-procesamiento-de-mediaconverter)

✅ 1. Crea un SNS Topic en AWS Ve a AWS SNS.

Crea un Topic de tipo Standard.

Dale un nombre (ej. MediaConvertJobNotifications).

Guarda el ARN del topic (lo usarás en MediaConvert).

TODO
====

[](#todo)

1. AutoGenerateTranslatedVttRequest &amp; UploadTranslatedVttRequest usan el modelo Language
    - No debería ser así, ya que es una acoplamiento con la app principal
2. Hacer que el paquete use su propio modelo Video yque tenga un trait para todos los mutators y relaciones
3. Ver si este paquete asume el modelo Languaje &amp; Subtitles dentro de su misma estructura.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance60

Regular maintenance activity

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

Recently: every ~21 days

Total

42

Last Release

256d ago

Major Versions

1.2.10 → 2.0.02025-06-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/1326cc571921fa88e3800b030b9ab07ad5dc7638c3bec1ad2e668e54743c5aec?d=identicon)[hrauvc](/maintainers/hrauvc)

---

Top Contributors

[![hrauvc](https://avatars.githubusercontent.com/u/12868727?v=4)](https://github.com/hrauvc "hrauvc (71 commits)")

### Embed Badge

![Health badge](/badges/innoboxrr-video-processor/health.svg)

```
[![Health](https://phpackages.com/badges/innoboxrr-video-processor/health.svg)](https://phpackages.com/packages/innoboxrr-video-processor)
```

###  Alternatives

[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[minuteoflaravel/laravel-audio-video-validator

Laravel validator for video and audio files

9761.0k](/packages/minuteoflaravel-laravel-audio-video-validator)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[humanmade/tachyon-plugin

Rewrites WordPress image URLs to use Tachyon

87338.5k2](/packages/humanmade-tachyon-plugin)[imagekit/imagekit

PHP library for Imagekit

47795.6k9](/packages/imagekit-imagekit)

PHPackages © 2026

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