Create a gist now

Instantly share code, notes, and snippets.

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