Download the PHP package tonymans33/video-optimizer without Composer

On this page you can find all versions of the php package tonymans33/video-optimizer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package video-optimizer

Video Optimizer for Filament

Latest Version on Packagist Total Downloads

Automatically optimize and convert videos uploaded through Filament forms using FFmpeg. Reduce file sizes and standardize formats without any manual intervention.

Results

See the dramatic file size reduction:

Before Optimization

Original MP4: 17.8 MB

After Optimization

Optimized WebM: 679 KB (96% reduction!)

🎯 Result: Same video quality, 96% smaller file size - from 17.8 MB down to just 679 KB!

Features

Requirements

Installing FFmpeg

Installation

Install the package via Composer:

Publish the configuration file (optional):

Usage

Basic Usage

Replace Filament's FileUpload with VideoOptimizer:

With Spatie Media Library

For projects using Spatie Media Library:

Using the Facade

Configuration

Set global defaults in config/video-optimizer.php:

Component-level settings override these defaults.

Optimization Levels

Level CRF File Size Quality Use Case
low 36 Smallest Lower Web previews, thumbnails
medium 28 Balanced Good Recommended for most use cases
high 20 Larger Best High-quality content, archives
null - Original Original No optimization

CRF = Constant Rate Factor (lower = better quality, larger file)

Supported Formats

How It Works

  1. User uploads a video through your Filament form
  2. Component detects video MIME type
  3. If optimization/conversion is enabled:
    • Creates temporary file
    • Processes with FFmpeg
    • Saves optimized version
    • Cleans up temporary files
  4. If processing fails, original file is uploaded (graceful fallback)

Advanced Example

Performance Considerations

Troubleshooting

FFmpeg not found

Error: Binary not found

Solution: Install FFmpeg and ensure it's in your system PATH

Videos not being optimized

  1. Check Laravel logs: storage/logs/laravel.log
  2. Verify MIME type is detected as video
  3. Confirm optimization level is set (not null)
  4. Ensure local disk exists in config/filesystems.php

Upload fails silently

The package falls back to original file upload if optimization fails. Check logs for error details.

Memory limit errors

For large videos, increase PHP memory:

Testing

Changelog

Please see CHANGELOG for more information on recent changes.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Security

If you discover any security issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of video-optimizer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3
filament/forms Version ^3.0|^4.0
illuminate/contracts Version ^10.0|^11.0|^12.0
php-ffmpeg/php-ffmpeg Version ^1.2
spatie/laravel-package-tools Version ^1.19.0
pbmedia/laravel-ffmpeg Version ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tonymans33/video-optimizer contains the following files

Loading the files please wait ...