diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2021-05-05 19:44:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-05 19:44:01 +0200 |
commit | 036556d3509fac5fa487a0d5ff3cf95767e8d84f (patch) | |
tree | f3435a4f1a5cbb999fde3118e9d17e62a889a59d /lib/paperclip/video_transcoder.rb | |
parent | dfa002932d660656792a78887264dd00820f2dda (diff) |
Fix media processing getting stuck on too much stdin/stderr (#16136)
* Fix media processing getting stuck on too much stdin/stderr See thoughtbot/terrapin#5 * Remove dependency on paperclip-av-transcoder gem * Remove dependency on streamio-ffmpeg gem * Disable stdin on ffmpeg process
Diffstat (limited to 'lib/paperclip/video_transcoder.rb')
-rw-r--r-- | lib/paperclip/video_transcoder.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/paperclip/video_transcoder.rb b/lib/paperclip/video_transcoder.rb deleted file mode 100644 index 4d9544231..000000000 --- a/lib/paperclip/video_transcoder.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -module Paperclip - # This transcoder is only to be used for the MediaAttachment model - # to check when uploaded videos are actually gifv's - class VideoTranscoder < Paperclip::Processor - def make - movie = FFMPEG::Movie.new(@file.path) - - attachment.instance.type = MediaAttachment.types[:gifv] unless movie.audio_codec - - Paperclip::Transcoder.make(file, actual_options(movie), attachment) - end - - private - - def actual_options(movie) - opts = options[:passthrough_options] - if opts && opts[:video_codecs].include?(movie.video_codec) && opts[:audio_codecs].include?(movie.audio_codec) && opts[:colorspaces].include?(movie.colorspace) - opts[:options] - else - options - end - end - end -end |