Skip to content

🎥 Make videos programmatically with React

lambda sdks

Jonny Burger369b20b2ed41
diff --git a/packages/lambda-go/internalops.go b/packages/lambda-go/internalops.go
index 085fb3630b..f176b6272a 100644
--- a/packages/lambda-go/internalops.go
+++ b/packages/lambda-go/internalops.go
@@ -37,6 +37,7 @@ func constructRenderInternals(options *RemotionOptions) (*renderInternalOptions,
Webhook: options.Webhook,
ForceHeight: options.ForceHeight,
OffthreadVideoCacheSizeInBytes: options.OffthreadVideoCacheSizeInBytes,
+ MediaCacheSizeInBytes: options.MediaCacheSizeInBytes,
OffthreadVideoThreads: options.OffthreadVideoThreads,
X264Preset: options.X264Preset,
ForceWidth: options.ForceWidth,
diff --git a/packages/lambda-go/models.go b/packages/lambda-go/models.go
index 6c707926c2..1392d8db58 100644
--- a/packages/lambda-go/models.go
+++ b/packages/lambda-go/models.go
@@ -38,6 +38,7 @@ type RemotionOptions struct {
Webhook interface{} `json:"webhook"`
ForceHeight interface{} `json:"forceHeight"`
OffthreadVideoCacheSizeInBytes interface{} `json:"offthreadVideoCacheSizeInBytes"`
+ MediaCacheSizeInBytes interface{} `json:"mediaCacheSizeInBytes"`
OffthreadVideoThreads interface{} `json:"offthreadVideoThreads"`
ForceWidth interface{} `json:"forceWidth"`
ApiKey interface{} `json:"apiKey"`
@@ -90,6 +91,7 @@ type renderInternalOptions struct {
EncodingMaxRate interface{} `json:"encodingMaxRate"`
Webhook interface{} `json:"webhook"`
OffthreadVideoCacheSizeInBytes interface{} `json:"offthreadVideoCacheSizeInBytes"`
+ MediaCacheSizeInBytes interface{} `json:"mediaCacheSizeInBytes"`
OffthreadVideoThreads interface{} `json:"offthreadVideoThreads"`
ForceHeight interface{} `json:"forceHeight"`
ForceWidth interface{} `json:"forceWidth"`
diff --git a/packages/lambda-php/composer.lock b/packages/lambda-php/composer.lock
index d8fc4697e4..b05316a5a3 100644
--- a/packages/lambda-php/composer.lock
+++ b/packages/lambda-php/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "802b0b4f2f6fe5ddc8b2e41b1d9f422f",
+ "content-hash": "1c0cdc6c6ece66f4170252b90e7caabe",
"packages": [
{
"name": "aws/aws-crt-php",
diff --git a/packages/lambda-php/src/RenderParams.php b/packages/lambda-php/src/RenderParams.php
index bc352c4c4c..55fe4037e6 100644
--- a/packages/lambda-php/src/RenderParams.php
+++ b/packages/lambda-php/src/RenderParams.php
@@ -48,6 +48,7 @@ class RenderParams
protected $forceWidth = null;
protected $apiKey = null;
protected $offthreadVideoCacheSizeInBytes = null;
+ protected $mediaCacheSizeInBytes = null;
protected $offthreadVideoThreads = null;
protected $audioCodec = null;
protected $rendererFunctionName = null;
@@ -90,6 +91,7 @@ class RenderParams
?int $forceWidth = null,
?int $apiKey = null,
?int $offthreadVideoCacheSizeInBytes = null,
+ ?int $mediaCacheSizeInBytes = null,
?int $offthreadVideoThreads = null,
?string $audioCodec = null,
?string $storageClass = null,
@@ -144,6 +146,7 @@ class RenderParams
$this->forceWidth = $forceWidth;
$this->apiKey = $apiKey;
$this->offthreadVideoCacheSizeInBytes = $offthreadVideoCacheSizeInBytes;
+ $this->mediaCacheSizeInBytes = $mediaCacheSizeInBytes;
$this->offthreadVideoThreads = $offthreadVideoThreads;
$this->audioCodec = $audioCodec;
$this->storageClass = $storageClass;
@@ -197,6 +200,7 @@ class RenderParams
'forceWidth' => $this->getForceWidth(),
'apiKey' => $this->getApiKey(),
'offthreadVideoCacheSizeInBytes' => $this->getOffthreadVideoCacheSizeInBytes(),
+ 'mediaCacheSizeInBytes' => $this->getMediaCacheSizeInBytes(),
'offthreadVideoThreads' => $this->getOffthreadVideoThreads(),
'bucketName' => $this->getBucketName(),
'audioCodec' => $this->getAudioCodec(),
@@ -756,6 +760,16 @@ class RenderParams
{
$this->offthreadVideoCacheSizeInBytes = $offthreadVideoCacheSizeInBytes;
}
+
+ public function getMediaCacheSizeInBytes()
+ {
+ return $this->mediaCacheSizeInBytes;
+ }
+
+ public function setMediaCacheSizeInBytes($mediaCacheSizeInBytes)
+ {
+ $this->mediaCacheSizeInBytes = $mediaCacheSizeInBytes;
+ }
public function setOffthreadVideoThreads($offthreadVideoThreads)
{
$this->offthreadVideoThreads = $offthreadVideoThreads;
@@ -821,6 +835,8 @@ class RenderParams
{
return $this->offthreadVideoCacheSizeInBytes;
}
+
+
public function getOffthreadVideoThreads()
{
return $this->offthreadVideoThreads;
diff --git a/packages/lambda-python/remotion_lambda/models.py b/packages/lambda-python/remotion_lambda/models.py
index e09ce55c2b..1a8f250ea0 100644
--- a/packages/lambda-python/remotion_lambda/models.py
+++ b/packages/lambda-python/remotion_lambda/models.py
@@ -316,6 +316,7 @@ class RenderMediaParams:
webhook: Optional[Webhook] = None
force_height: Optional[int] = None
offthreadvideo_cache_size_in_bytes: Optional[int] = None
+ media_cache_size_in_bytes: Optional[int] = None
offthreadvideo_threads: Optional[int] = None
force_width: Optional[int] = None
api_key: Optional[str] = None
@@ -370,6 +371,7 @@ class RenderMediaParams:
'webhook': self.webhook,
'forceHeight': self.force_height,
'offthreadVideoCacheSizeInBytes': self.offthreadvideo_cache_size_in_bytes,
+ 'mediaCacheSizeInBytes': self.media_cache_size_in_bytes,
'offthreadVideoThreads': self.offthreadvideo_threads,
'forceWidth': self.force_width,
'apiKey': self.api_key,
@@ -447,6 +449,7 @@ class RenderStillParams:
delete_after: Optional[DeleteAfter] = None
force_path_style: Optional[bool] = None
offthreadvideo_cache_size_in_bytes: Optional[int] = None
+ media_cache_size_in_bytes: Optional[int] = None
offthreadvideo_threads: Optional[int] = None
streamed: bool = False
@@ -499,6 +502,7 @@ class RenderStillParams:
'deleteAfter': self.delete_after,
'attempt': self.attempt,
'offthreadVideoCacheSizeInBytes': self.offthreadvideo_cache_size_in_bytes,
+ 'mediaCacheSizeInBytes': self.media_cache_size_in_bytes,
'offthreadVideoThreads': self.offthreadvideo_threads,
'streamed': self.streamed,
}
diff --git a/packages/lambda-ruby/lib/remotion_lambda/render_media_on_lambda_payload.rb b/packages/lambda-ruby/lib/remotion_lambda/render_media_on_lambda_payload.rb
index 589fa047d9..6b606f3154 100644
--- a/packages/lambda-ruby/lib/remotion_lambda/render_media_on_lambda_payload.rb
+++ b/packages/lambda-ruby/lib/remotion_lambda/render_media_on_lambda_payload.rb
@@ -32,6 +32,7 @@ def get_render_media_on_lambda_payload(
muted: false,
number_of_gif_loops: 0,
offthread_video_cache_size_in_bytes: nil,
+ media_cache_size_in_bytes: nil,
offthread_video_threads: nil,
out_name: nil,
overwrite: false,
@@ -84,6 +85,7 @@ payload = {
muted: muted,
numberOfGifLoops: number_of_gif_loops,
offthreadVideoCacheSizeInBytes: offthread_video_cache_size_in_bytes,
+ mediaCacheSizeInBytes: media_cache_size_in_bytes,
offthreadVideoThreads: offthread_video_threads,
outName: out_name,
overwrite: overwrite,
diff --git a/packages/lambda-ruby/lib/remotion_lambda/render_still_on_lambda_payload.rb b/packages/lambda-ruby/lib/remotion_lambda/render_still_on_lambda_payload.rb
index 4f6950a9de..e91847992e 100644
--- a/packages/lambda-ruby/lib/remotion_lambda/render_still_on_lambda_payload.rb
+++ b/packages/lambda-ruby/lib/remotion_lambda/render_still_on_lambda_payload.rb
@@ -19,6 +19,7 @@ def get_render_still_on_lambda_payload(
metadata: {},
offthread_video_threads: nil,
offthread_video_cache_size_in_bytes: nil,
+ media_cache_size_in_bytes: nil,
out_name: nil,
overwrite: false,
privacy: "public",
@@ -49,6 +50,7 @@ payload = {
logLevel: log_level,
maxRetries: max_retries,
offthreadVideoCacheSizeInBytes: offthread_video_cache_size_in_bytes,
+ mediaCacheSizeInBytes: media_cache_size_in_bytes,
offthreadVideoThreads: offthread_video_threads,
outName: out_name,
privacy: privacy,