remotion_lambda 4.0.533 → 4.0.535

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: dcc6c6d44b4e55ebf75a011c126c174e73ae5f538e6f17e4be9360650a94b526
4
- data.tar.gz: 7965f448e2e238306296bfae7dfdea23026ab90308aaf19584b5acffa35e5272
3
+ metadata.gz: 5a0c224b324d5ab309b0591b99193554c880c67ed149bc316ae3c22a7e4e7900
4
+ data.tar.gz: 6a89d368e2c5befefac898bf1a3386d167a8698d93f8a7e6141003262b4c9713
5
5
  SHA512:
6
- metadata.gz: 27063183bc4b392c79a780be70b54fd504aebf64fbcc3966fce32fd588d12c0cbf50c9768a2832006259bec890ac0efcbbd5a16c1403c439b5005c5a552b99ee
7
- data.tar.gz: ae084694aa7908f49ebdfbec7e57bb168a2068b55b7bd94be65979f9cc53e145c45fed0e267ba073ad7b8faca670a10d55293c19f5ecf51ddf8984c1d1ca7696
6
+ metadata.gz: 1da87d63f757782c9102bdfbec9186ef884e9ec45509c70ebd635db1717cd72c394784dfe2be9d25832d66dbb5a5f454804d49e1f456d89962b00bea6137f070
7
+ data.tar.gz: 978839f599a807f5e1cb9893f0c02d43b7e8ba938ce9e28dccbc435e129506113dddb1e29f978fb4789603fb301b7ab07aa204eb15bff1de66a9a24a483bdc7f
@@ -0,0 +1,33 @@
1
+ require_relative 'render_media_on_lambda_payload'
2
+
3
+ def get_render_frames_on_lambda_payload(
4
+ image_format: 'png',
5
+ jpeg_quality: nil,
6
+ output_prefix: nil,
7
+ image_sequence_pattern: nil,
8
+ **options
9
+ )
10
+ unless ['png', 'jpeg'].include?(image_format)
11
+ raise ArgumentError, 'image_format must be "png" or "jpeg".'
12
+ end
13
+ if !jpeg_quality.nil? && image_format != 'jpeg'
14
+ raise ArgumentError, 'jpeg_quality can only be passed with image_format: "jpeg".'
15
+ end
16
+
17
+ payload = get_render_media_on_lambda_payload(
18
+ **options,
19
+ codec: nil,
20
+ image_format: image_format,
21
+ jpeg_quality: jpeg_quality.nil? ? 80 : jpeg_quality,
22
+ muted: true,
23
+ out_name: nil,
24
+ number_of_gif_loops: nil,
25
+ download_behavior: options[:download_behavior] || {type: 'play-in-browser'}
26
+ )
27
+ payload[:output] = {
28
+ type: 'sequence',
29
+ outputPrefix: output_prefix,
30
+ imageSequencePattern: image_sequence_pattern
31
+ }
32
+ payload
33
+ end
@@ -45,6 +45,7 @@ def get_render_media_on_lambda_payload(
45
45
  media_cache_size_in_bytes: nil,
46
46
  offthread_video_threads: nil,
47
47
  out_name: nil,
48
+ separate_audio_to: nil,
48
49
  overwrite: nil,
49
50
  pixel_format: nil,
50
51
  prefer_lossless: false,
@@ -58,6 +59,7 @@ def get_render_media_on_lambda_payload(
58
59
  webhook: nil,
59
60
  x264_preset: nil,
60
61
  gop_size: nil,
62
+ disable_shared_memory_capture: false,
61
63
  chromium_options: {},
62
64
  is_production: nil,
63
65
  sample_rate: 48000
@@ -108,6 +110,7 @@ payload = {
108
110
  mediaCacheSizeInBytes: media_cache_size_in_bytes,
109
111
  offthreadVideoThreads: offthread_video_threads,
110
112
  outName: out_name,
113
+ separateAudioTo: separate_audio_to,
111
114
  overwrite: resolve_overwrite(overwrite, VERSION),
112
115
  pixelFormat: pixel_format,
113
116
  preferLossless: prefer_lossless,
@@ -119,11 +122,13 @@ payload = {
119
122
  serveUrl: serve_url,
120
123
  timeoutInMilliseconds: timeout_in_milliseconds,
121
124
  type: "start",
125
+ output: {type: "media"},
122
126
  version: VERSION,
123
127
  videoBitrate: video_bitrate,
124
128
  webhook: webhook,
125
129
  x264Preset: x264_preset,
126
130
  gopSize: gop_size,
131
+ disableSharedMemoryCapture: disable_shared_memory_capture,
127
132
  bucketName: bucket_name,
128
133
  isProduction: is_production
129
134
  }
@@ -31,6 +31,12 @@ module RemotionLambda
31
31
  body
32
32
  end
33
33
 
34
+ def render_frames_on_lambda(function_name, payload)
35
+ body = invoke(function_name, payload)
36
+ raise "Failed to call renderFramesOnLambda: #{body['message']}" if body["type"] == "error"
37
+ body
38
+ end
39
+
34
40
  def render_still_on_lambda(function_name, payload)
35
41
  body = invoke(function_name, payload)
36
42
  raise "Failed to call renderStillOnLambda: #{body['message']}" if body["type"] == "error"
@@ -81,7 +87,7 @@ module RemotionLambda
81
87
  if @aws_profile
82
88
  Aws::SharedCredentials.new(profile_name: @aws_profile)
83
89
  else
84
- Aws::Credentials.new(ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'])
90
+ Aws::Credentials.new(ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'])
85
91
  end
86
92
  end
87
93
  end
@@ -1 +1 @@
1
- VERSION = "4.0.533"
1
+ VERSION = "4.0.535"
@@ -3,6 +3,7 @@ require 'json'
3
3
  require 'logger'
4
4
  require_relative 'remotion_lambda/version'
5
5
  require_relative 'remotion_lambda/render_media_on_lambda_payload'
6
+ require_relative 'remotion_lambda/render_frames_on_lambda_payload'
6
7
  require_relative 'remotion_lambda/render_progress_payload'
7
8
  require_relative 'remotion_lambda/render_still_on_lambda_payload'
8
9
  require_relative 'remotion_lambda/s3_output_provider'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remotion_lambda
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.533
4
+ version: 4.0.535
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonny Burger
@@ -88,6 +88,7 @@ files:
88
88
  - README.md
89
89
  - lib/remotion_lambda.rb
90
90
  - lib/remotion_lambda/cancel_render_on_lambda_spec.rb
91
+ - lib/remotion_lambda/render_frames_on_lambda_payload.rb
91
92
  - lib/remotion_lambda/render_media_on_lambda_payload.rb
92
93
  - lib/remotion_lambda/render_media_on_lambda_payload_spec.rb
93
94
  - lib/remotion_lambda/render_progress_payload.rb