Download the PHP package synchro/laravel-medialibrary-audio without Composer

On this page you can find all versions of the php package synchro/laravel-medialibrary-audio. 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 laravel-medialibrary-audio

Audio File Thumbnail Generator for Spatie's Laravel Media Library

This audio image generator generates thumbnails for audio files uploaded through Spatie's Media Library, just as it already does for image, video, and PDF formats. By default they look like this:

Example waveform image

Spatie's docs have more details of how plugins integrate with Media Library. Thumbnails of a mono waveform of the whole audio file are generated using ffmpeg's waveform converter. It uses the same PHP FFMpeg package that is used for the video formats already supported by Media Library, so there are no additional dependencies.

Installation & configuration

Install using composer with:

composer require synchro/laravel-medialibrary-audio 

Installing Spatie's Media Library (version 9.1.0 or later) in your Laravel project will generate a config file in config/media-library.php. Add the audio waveform generator to the list of generators in the image_generators section, including optionally setting default width, height, foreground and background properties (default values shown):

These parameters are optional - you can leave them out if you're happy with the defaults.

Thumbnail colours

The waveform is drawn in the foreground colour, over the background colour. Both should be specified using standard HTML 6-digit hex values (with a leading #) passed through the media library config, as above.

Thumbnail sizing

The base size of the thumbnails can be set via the media library config, as shown above. The default is 2048 x 2048 pixels, neutral values chosen because audio files have no inherent size or aspect ratio. This is quite large, but since the images are very simple, they will compress very well in PNG format. This size doesn't directly affect the thumbnails delivered to clients because media library itself generates scaled-down versions to match client requests, however, it does have a direct effect on the aspect ratio of the thumbnails, so if you want a 16:9 ratio, change the height to 1152, or 1536 for 4:3.

Supported formats

Running tests

If your local ffmpeg installation is in a different path you can use the environment variables to define your own path:

Or on recent macOS with homebrew:


All versions of laravel-medialibrary-audio with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/support Version ^8.0 || ^9.0 || ^10.0
spatie/laravel-medialibrary Version ^9.1.0 || ^10.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 synchro/laravel-medialibrary-audio contains the following files

Loading the files please wait ....