From 817657cd22d402a2b7d999464b7d28ecd93f16a6 Mon Sep 17 00:00:00 2001 From: Benjamin Kiah Stroud <32469930+bkiahstroud@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:39:15 -0800 Subject: [PATCH 1/2] =?UTF-8?q?Revert=20"=F0=9F=A9=B9=20Temporary=20fix=20?= =?UTF-8?q?for=20video=20processing"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit e8af16542ada7a7dc411341ca95c9fd4ed2ffdfb. --- .../hyrax/iiif_av/displays_content_decorator.rb | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/app/presenters/concerns/hyrax/iiif_av/displays_content_decorator.rb b/app/presenters/concerns/hyrax/iiif_av/displays_content_decorator.rb index a2fb7347e..b249008a3 100644 --- a/app/presenters/concerns/hyrax/iiif_av/displays_content_decorator.rb +++ b/app/presenters/concerns/hyrax/iiif_av/displays_content_decorator.rb @@ -42,18 +42,11 @@ def video_display_content(_url, label = '') height = solr_document.height&.try(:to_i) || 240 duration = conformed_duration_in_seconds IIIFManifest::V3::DisplayContent.new( - # Hyrax::IiifAv::Engine.routes.url_helpers.iiif_av_content_url( - # solr_document.id, - # label: label, - # host: request.base_url - # ), - # TODO: This is a hack to pull the download url from hyrax as the video resource. - # Ultimately we want to fix the processing times of the video derivatives so it doesn't take - # hours to days to complete. The draw back of doing it this way is that we're using the original - # video file which is fine if it's already processed, but if it's a raw, then it is not ideal for - # streaming purposes. The good thing is that PALs seem to be processing the video derivatives out - # of band first before ingesting so we shouldn't run into this issue. - Hyrax::Engine.routes.url_helpers.download_url(solr_document.id, host: request.base_url, protocol: 'https'), + Hyrax::IiifAv::Engine.routes.url_helpers.iiif_av_content_url( + solr_document.id, + label: label, + host: request.base_url + ), label: label, width: width, height: height, From 307236a1f820b419447b739634af74433d5d0b78 Mon Sep 17 00:00:00 2001 From: Benjamin Kiah Stroud <32469930+bkiahstroud@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:42:29 -0800 Subject: [PATCH 2/2] =?UTF-8?q?Revert=20"=F0=9F=90=9B=20HACK:=20Disable=20?= =?UTF-8?q?mp4=20and=20webm=20derivative=20generation"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9194865b80a05d548f9c75e3a75dc83bb5086111. --- .../file_set_derivatives_overrides.rb | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/config/initializers/file_set_derivatives_overrides.rb b/config/initializers/file_set_derivatives_overrides.rb index d67ca84e6..af88c5318 100644 --- a/config/initializers/file_set_derivatives_overrides.rb +++ b/config/initializers/file_set_derivatives_overrides.rb @@ -48,17 +48,12 @@ 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') } - ]) - # rubocop:enable Style/TrailingCommaInHashLiteral + { label: 'webm', format: 'webm', + url: derivative_url('webm') }, + { label: 'mp4', format: 'mp4', + url: derivative_url('mp4') }]) end -end +end \ No newline at end of file