Skip to content

Commit

Permalink
Add example image to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed Nov 4, 2020
1 parent 9b91edb commit 8b1c217
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# 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.
This audio image generator generates thumbnails for audio files uploaded through [Spatie's Media Library](https://github.com/spatie/laravel-medialibrary), just as it already does for image, video, and PDF formats. By default they look like this:

![Example waveform image](https://github.com/Synchro/laravel-medialibrary-audio/blob/main/tests/testfiles/example_waveform.png)

Spatie's docs have more details of [how plugins integrate with Media Library](https://spatie.be/docs/laravel-medialibrary/v9/converting-other-file-types/creating-a-custom-image-generator).
Thumbnails of a mono waveform of the whole audio file are generated using ffmpeg's `waveform` converter. It uses the same [PHP FFMpeg package](https://packagist.org/packages/php-ffmpeg/php-ffmpeg) that is used for the video formats already supported by Media Library, so there are no additional dependencies.

## Installation & configuration
Expand Down
3 changes: 2 additions & 1 deletion tests/testfiles/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
!test_mp3.mp3
!test_ogg.ogg
!test_wav.wav
!test_wma.wma
!test_wma.wma
!example_waveform.png
Binary file added tests/testfiles/example_waveform.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8b1c217

Please sign in to comment.