Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CarrierWave - video encoding with Voyeur - app/uploaders/
# encoding: utf-8
class VideoUploader < CarrierWave::Uploader::Base
include CarrierWave::VideoConverter
storage :file
version :mp4 do
process :encode_video => [:mp4]
def full_filename(for_file)
"#{File.basename(for_file, File.extname(for_file))}.mp4"
end
end
version :webm do
process :encode_video => [:webm]
def full_filename(for_file)
"#{File.basename(for_file, File.extname(for_file))}.webm"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.