Giter VIP home page Giter VIP logo

wav-mp3's Introduction

WAV - MP3 Paperclip-processor

Uploads WAV files and converts them to MP3.

Requirements

  1. Rails 3

  2. Paperclip

  3. Lame

Install

Follow instructions on Lame

Include:

gem ‘wav-mp3’ & run:

bundle install

Or: gem install wav-mp3

Usage

Inside Model include:

has_attached_file :wav,

:styles => {
   :mp3 => { 
     :params => "-q1 -b 320",
     :format => "mp3" }
  },
  :processors => [:wav_mp3]

Plugin will upload and save song.wav file & convert and save song.mp3 file…

be carefull

it wont work with files that have special characters. Keep file-names simple an web friendly… or fork the GEM

Params

Quality related:

-m m/s/j/f/a mode selection -q n Internal algorithm quality setting 0..9. 0 = slowest algorithms, but potentially highest quality 9 = faster algorithms, very poor quality -h same as -q2 -f same as -q7

Constant Bit Rate (CBR)

-b n set bitrate (8, 16, 24, …, 320) –freeformat produce a free format bitstream. User must also specify a bitrate with -b, between 8 and 640 kbps.

Variable Bit Rate (VBR)

-v VBR –vbr-old use old variable bitrate (VBR) routine –vbr-new use new variable bitrate (VBR) routine (default) -V n VBR quality setting (0=highest quality, 9=lowest) -b n specify a minimum allowed bitrate (8,16,24,…,320) -B n specify a maximum allowed bitrate (8,16,24,…,320) -F strictly enforce minimum bitrate -t disable VBR informational tag –nohist disable display of VBR bitrate histogram

–abr n specify average bitrate desired

ID3 tagging:

–tt <title> audio/song title (max 30 chars for version 1 tag) –ta <artist> audio/song artist (max 30 chars for version 1 tag) –tl <album> audio/song album (max 30 chars for version 1 tag) –ty <year> audio/song year of issue (1 to 9999) –tc <comment> user-defined text (max 30 chars for v1 tag, 28 for v1.1) –tn <track> audio/song track number (1 to 255, creates v1.1 tag) –tg <genre> audio/song genre (name or number in list) –add-id3v2 force addition of version 2 tag –id3v1-only add only a version 1 tag –id3v2-only add only a version 2 tag –space-id3v1 pad version 1 tag with spaces instead of nulls –pad-id3v2 same as ‘–pad-id3v2-size 128’ –pad-id3v2-size <num> adds version 2 tag, pad with extra <num> bytes –genre-list print alphabetically sorted ID3 genre list and exit

For more details about Lame parameters visit: lame.cvs.sourceforge.net/viewvc/lame/lame/USAGE

Gem info

created by: moonFlash twitter: moonflash

wav-mp3's People

Contributors

moonflash avatar procom32 avatar

Watchers

Andrei M Navarro avatar

Forkers

allejo392

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.