]>
cat aescling's git repositories - mastodon.git/blob - lib/paperclip/video_transcoder.rb
1 # frozen_string_literal: true
4 # This transcoder is only to be used for the MediaAttachment model
5 # to check when uploaded videos are actually gifv's
6 class VideoTranscoder
< Paperclip
::Processor
8 meta
= ::Av.cli
.identify(@file.path
)
10 attachment
.instance
.type
= MediaAttachment
.types
[:gifv] unless meta
[:audio_encode]
11 options
[:format] = File
.extname(attachment
.instance
.file_file_name
)[1..-1] if options
[:keep_same_format]
13 Paperclip
::Transcoder.make(file
, options
, attachment
)
This page took 0.054153 seconds and 5 git commands to generate.