Skip to content

Commit

Permalink
Merge pull request #925 from scientist-softserv/hack-remove-video-der…
Browse files Browse the repository at this point in the history
…ivating

🐛 HACK: Disable mp4 and webm derivative generation
  • Loading branch information
ShanaLMoore committed Dec 6, 2023
2 parents de17484 + 9194865 commit 64934e9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions config/initializers/file_set_derivatives_overrides.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,17 @@ def create_video_derivatives(filename)
original_size = "#{width}x#{height}"
size = width.nil? || height.nil? ? DEFAULT_VIDEO_SIZE : original_size
Hydra::Derivatives::Processors::Video::Processor.config.size_attributes = size
# HACK: Commented out the non-thumbnail derivative generation as they are clogging the ecosystem.
# See https://github.com/scientist-softserv/palni-palci/issues/924
# rubocop:disable Style/TrailingCommaInHashLiteral
Hydra::Derivatives::VideoDerivatives.create(filename,
outputs: [{ label: :thumbnail, format: 'jpg',
url: derivative_url('thumbnail') },
{ label: 'webm', format: 'webm',
url: derivative_url('webm') },
{ label: 'mp4', format: 'mp4',
url: derivative_url('mp4') }])
# { label: 'webm', format: 'webm',
# url: derivative_url('webm') },
# { label: 'mp4', format: 'mp4',
# url: derivative_url('mp4') }
])
# rubocop:enable Style/TrailingCommaInHashLiteral
end
end
end

0 comments on commit 64934e9

Please sign in to comment.