active_encode 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8e79b7e04c4ce64bd75701672631d45b7c7c7a340361295bfc007be2f28aa293
|
|
4
|
+
data.tar.gz: e5cd432ef6102257eff4d257906961ed1513e81f58520bdc6c6d4f07293d5a5a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7126ae7b947b53233cd05f2202fb155a327144e8f611c81640b90611c0c600358e66374908820e7f6df35cb4d0837f8e2487d883b6151b9c3009526e330c7cc5
|
|
7
|
+
data.tar.gz: 73369f2a8423a4bcc5d346af76f7da2d8c3ca290da5f229218c137fdeb6e6155e1a4db4ade5e947bf78e3a3ef8cc8b35e2941b53767a52d3ecaac8e35211619d
|
data/.circleci/config.yml
CHANGED
|
@@ -17,6 +17,7 @@ jobs:
|
|
|
17
17
|
executor:
|
|
18
18
|
name: 'samvera/ruby'
|
|
19
19
|
ruby_version: << parameters.ruby_version >>
|
|
20
|
+
resource_class: large
|
|
20
21
|
environment:
|
|
21
22
|
ENGINE_CART_RAILS_OPTIONS: --skip-git --skip-bundle --skip-listen --skip-spring --skip-yarn --skip-keeps --skip-coffee --skip-puma --skip-test
|
|
22
23
|
RAILS_VERSION: << parameters.rails_version >>
|
|
@@ -37,12 +38,13 @@ jobs:
|
|
|
37
38
|
keys:
|
|
38
39
|
- v1-ffmpeg-<< parameters.ffmpeg_version >>
|
|
39
40
|
|
|
40
|
-
- run: curl https://www.johnvansickle.com/ffmpeg/old-releases/ffmpeg-<< parameters.ffmpeg_version >>-amd64-static.tar.xz | tar xJ -C /tmp/ --strip-components=1
|
|
41
|
+
- run: if [ ! -f /tmp/ffmpeg ]; then curl https://www.johnvansickle.com/ffmpeg/old-releases/ffmpeg-<< parameters.ffmpeg_version >>-amd64-static.tar.xz | tar xJ -C /tmp/ --strip-components=1; fi
|
|
41
42
|
|
|
42
43
|
- save_cache:
|
|
43
44
|
key: v1-ffmpeg-<< parameters.ffmpeg_version >>`
|
|
44
45
|
paths:
|
|
45
46
|
- /tmp/ffmpeg
|
|
47
|
+
- /tmp/ffprobe
|
|
46
48
|
|
|
47
49
|
- samvera/cached_checkout
|
|
48
50
|
|
|
@@ -519,6 +519,8 @@ module ActiveEncode
|
|
|
519
519
|
# NOTE: certain audio files don't return any track information
|
|
520
520
|
@probe_cache ||= {}
|
|
521
521
|
@probe_cache[url] ||= mediaconvert.probe({ input_files: [{ file_url: url }] })&.probe_results&.first
|
|
522
|
+
rescue Aws::MediaConvert::Errors::ServiceError
|
|
523
|
+
nil
|
|
522
524
|
end
|
|
523
525
|
|
|
524
526
|
def output_id_format
|
|
@@ -74,7 +74,7 @@ module ActiveEncode
|
|
|
74
74
|
|
|
75
75
|
# Copy derivatives to work directory
|
|
76
76
|
options[:outputs].each do |opt|
|
|
77
|
-
output_path = copy_derivative_to_working_path(opt[:url], new_encode.id)
|
|
77
|
+
output_path = copy_derivative_to_working_path(opt[:url], opt[:label], new_encode.id)
|
|
78
78
|
filename_label_hash[output_path] = opt[:label]
|
|
79
79
|
end
|
|
80
80
|
|
|
@@ -286,8 +286,9 @@ module ActiveEncode
|
|
|
286
286
|
ActiveEncode.sanitize_input(input_url)
|
|
287
287
|
end
|
|
288
288
|
|
|
289
|
-
def copy_derivative_to_working_path(url, id)
|
|
290
|
-
|
|
289
|
+
def copy_derivative_to_working_path(url, label, id)
|
|
290
|
+
label_url = add_label_to_url(ActiveEncode.sanitize_base(url), label)
|
|
291
|
+
output_path = working_path("outputs/#{label_url}#{File.extname url}", id)
|
|
291
292
|
if url.start_with? "s3://"
|
|
292
293
|
# Use aws-sdk-s3 download_file method
|
|
293
294
|
# Single request mode needed for compatibility with minio
|
|
@@ -297,6 +298,12 @@ module ActiveEncode
|
|
|
297
298
|
end
|
|
298
299
|
output_path
|
|
299
300
|
end
|
|
301
|
+
|
|
302
|
+
def add_label_to_url(url, label)
|
|
303
|
+
return url if url.match?(/\-#{label}$/)
|
|
304
|
+
|
|
305
|
+
url.gsub(/#{label}$/, '') + "-#{label}"
|
|
306
|
+
end
|
|
300
307
|
end
|
|
301
308
|
end
|
|
302
309
|
end
|