Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quality of mp3 #5

Closed
alexmamonchik opened this issue Aug 28, 2018 · 5 comments
Closed

quality of mp3 #5

alexmamonchik opened this issue Aug 28, 2018 · 5 comments

Comments

@alexmamonchik
Copy link
Contributor

looks like we can't rewrite a quality of a final mp3 file and locked to 128 kbps. Is it interesting if I can create some PR with ability to set 320 kbps?

@TrevorHinesley
Copy link
Owner

TrevorHinesley commented Aug 28, 2018

You should be able to set the quality via the compression output argument. See output_options here.

@alexmamonchik
Copy link
Contributor Author

sorry, here is my code:

class AudioUploader < CarrierWave::Uploader::Base
  include CarrierWave::Audio
  storage :file

  version :mp3 do
    process convert: [output_options: { compression: 320 }]
  end

  def full_filename(for_file)
    "#{super.chomp(File.extname(super))}.mp3"
  end

  def extension_whitelist
    %w(mp3 wav ogg)
  end

and it doesn't work

@alexmamonchik
Copy link
Contributor Author

@TrevorHinesley please, look at #6

@TrevorHinesley
Copy link
Owner

TrevorHinesley commented Aug 28, 2018

That's perfect, sorry about that! I'll cut a new gem version.

@TrevorHinesley
Copy link
Owner

Released in V 1.0.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants