https://github.com/atd/paperclip_waveform
Paperclip post-processor that generates a waveform image from audio files.
https://github.com/atd/paperclip_waveform
Last synced: 10 months ago
JSON representation
Paperclip post-processor that generates a waveform image from audio files.
- Host: GitHub
- URL: https://github.com/atd/paperclip_waveform
- Owner: atd
- License: mit
- Created: 2012-12-04T21:30:35.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-12-27T16:10:42.000Z (over 13 years ago)
- Last Synced: 2025-08-20T04:35:47.855Z (10 months ago)
- Language: Ruby
- Size: 236 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- License: MIT-LICENSE
Awesome Lists containing this project
README
= Paperclip Waveform
Paperclip Waveform is a Paperclip post-processor. It generates a png file
with the waveform from an audio attachment, using the fantastic waveform gem https://github.com/benalavi/waveform
== Usage
Waveform depends on ruby-audio, which in turn depends on libsndfile.
Build libsndfile from (http://www.mega-nerd.com/libsndfile/), install it via apt:
sudo apt-get install libsndfile1-dev
libsndfile in macports, etc...
ffmpeg is also required to convert original files to WAV
sudo apt-get install ffmpeg
Then add the gem to your Gemfile:
gem 'paperclip_waveform'
And the style to your audio:
class Audio < ActiveRecord::Base
has_attached_file :file,
styles: { waveform: { format: :png, convert_options: { color: :transparent } } },
processors: [ :waveform ]
Take a look at https://github.com/benalavi/waveform/blob/master/bin/waveform for available options