🎥 Make videos programmatically with React
Add forceFps and forceDurationInFrames to Go, PHP, Python, and Ruby Lambda packages
Jonny Burger0f43d8ba53d4
diff --git a/packages/lambda-go/internalops.go b/packages/lambda-go/internalops.goindex ab12bc1bd7..f57c778c27 100644--- a/packages/lambda-go/internalops.go+++ b/packages/lambda-go/internalops.go@@ -36,6 +36,8 @@ func constructRenderInternals(options *RemotionOptions) (*renderInternalOptions,VideoBitrate: options.VideoBitrate,Webhook: options.Webhook,ForceHeight: options.ForceHeight,+ ForceFps: options.ForceFps,+ ForceDurationInFrames: options.ForceDurationInFrames,OffthreadVideoCacheSizeInBytes: options.OffthreadVideoCacheSizeInBytes,MediaCacheSizeInBytes: options.MediaCacheSizeInBytes,OffthreadVideoThreads: options.OffthreadVideoThreads,diff --git a/packages/lambda-go/models.go b/packages/lambda-go/models.goindex 5f49377cf0..1262e4f462 100644--- a/packages/lambda-go/models.go+++ b/packages/lambda-go/models.go@@ -37,6 +37,8 @@ type RemotionOptions struct {EncodingMaxRate interface{} `json:"encodingMaxRate"`Webhook interface{} `json:"webhook"`ForceHeight interface{} `json:"forceHeight"`+ ForceFps interface{} `json:"forceFps"`+ ForceDurationInFrames interface{} `json:"forceDurationInFrames"`OffthreadVideoCacheSizeInBytes interface{} `json:"offthreadVideoCacheSizeInBytes"`MediaCacheSizeInBytes interface{} `json:"mediaCacheSizeInBytes"`OffthreadVideoThreads interface{} `json:"offthreadVideoThreads"`@@ -97,6 +99,8 @@ type renderInternalOptions struct {OffthreadVideoThreads interface{} `json:"offthreadVideoThreads"`ForceHeight interface{} `json:"forceHeight"`ForceWidth interface{} `json:"forceWidth"`+ ForceFps interface{} `json:"forceFps"`+ ForceDurationInFrames interface{} `json:"forceDurationInFrames"`ApiKey interface{} `json:"apiKey,omitempty"`LicenseKey interface{} `json:"licenseKey"`BucketName interface{} `json:"bucketName"`diff --git a/packages/lambda-php/composer.lock b/packages/lambda-php/composer.lockindex 477b81d4f0..fb72274859 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": "de2d3234d8b3ac7fce37dc7eace49d7c",+ "content-hash": "5791cffc444d3883edf14579a984e777","packages": [{"name": "aws/aws-crt-php",diff --git a/packages/lambda-php/src/RenderParams.php b/packages/lambda-php/src/RenderParams.phpindex 9bef0a45c5..1391b3443a 100644--- a/packages/lambda-php/src/RenderParams.php+++ b/packages/lambda-php/src/RenderParams.php@@ -46,6 +46,8 @@ class RenderParamsprotected $webhook = null;protected $forceHeight = null;protected $forceWidth = null;+ protected $forceFps = null;+ protected $forceDurationInFrames = null;protected $licenseKey = null;protected $offthreadVideoCacheSizeInBytes = null;protected $mediaCacheSizeInBytes = null;@@ -90,6 +92,8 @@ class RenderParams?string $webhook = null,?int $forceHeight = null,?int $forceWidth = null,+ ?int $forceFps = null,+ ?int $forceDurationInFrames = null,?string $licenseKey = null,?int $offthreadVideoCacheSizeInBytes = null,?int $mediaCacheSizeInBytes = null,@@ -146,6 +150,8 @@ class RenderParams$this->webhook = $webhook;$this->forceHeight = $forceHeight;$this->forceWidth = $forceWidth;+ $this->forceFps = $forceFps;+ $this->forceDurationInFrames = $forceDurationInFrames;$this->licenseKey = $licenseKey;$this->offthreadVideoCacheSizeInBytes = $offthreadVideoCacheSizeInBytes;$this->mediaCacheSizeInBytes = $mediaCacheSizeInBytes;@@ -201,6 +207,8 @@ class RenderParams'webhook' => $this->getWebhook(),'forceHeight' => $this->getForceHeight(),'forceWidth' => $this->getForceWidth(),+ 'forceFps' => $this->getForceFps(),+ 'forceDurationInFrames' => $this->getForceDurationInFrames(),'licenseKey' => $this->getLicenseKey(),'offthreadVideoCacheSizeInBytes' => $this->getOffthreadVideoCacheSizeInBytes(),'mediaCacheSizeInBytes' => $this->getMediaCacheSizeInBytes(),@@ -755,6 +763,15 @@ class RenderParams$this->forceWidth = $forceWidth;}+ public function setForceFps($forceFps)+ {+ $this->forceFps = $forceFps;+ }++ public function setForceDurationInFrames($forceDurationInFrames)+ {+ $this->forceDurationInFrames = $forceDurationInFrames;+ }public function setLicenseKey($licenseKey){@@ -831,6 +848,15 @@ class RenderParamsreturn $this->forceWidth;}+ public function getForceFps()+ {+ return $this->forceFps;+ }++ public function getForceDurationInFrames()+ {+ return $this->forceDurationInFrames;+ }public function getLicenseKey(){diff --git a/packages/lambda-python/remotion_lambda/models.py b/packages/lambda-python/remotion_lambda/models.pyindex c2d9273e61..856b3b6fb6 100644--- a/packages/lambda-python/remotion_lambda/models.py+++ b/packages/lambda-python/remotion_lambda/models.py@@ -315,6 +315,8 @@ class RenderMediaParams:video_bitrate: Optional[int] = Nonewebhook: Optional[Webhook] = Noneforce_height: Optional[int] = None+ force_fps: Optional[int] = None+ force_duration_in_frames: Optional[int] = Noneoffthreadvideo_cache_size_in_bytes: Optional[int] = Nonemedia_cache_size_in_bytes: Optional[int] = Noneoffthreadvideo_threads: Optional[int] = None@@ -373,6 +375,8 @@ class RenderMediaParams:'videoBitrate': self.video_bitrate,'webhook': self.webhook,'forceHeight': self.force_height,+ 'forceFps': self.force_fps,+ 'forceDurationInFrames': self.force_duration_in_frames,'offthreadVideoCacheSizeInBytes': self.offthreadvideo_cache_size_in_bytes,'mediaCacheSizeInBytes': self.media_cache_size_in_bytes,'offthreadVideoThreads': self.offthreadvideo_threads,@@ -450,6 +454,8 @@ class RenderStillParams:license_key: Optional[str] = Nonestorage_class: Optional[str] = Noneforce_height: Optional[int] = None+ force_fps: Optional[int] = None+ force_duration_in_frames: Optional[int] = Noneforce_bucket_name: Optional[str] = Nonedump_browser_logs: Optional[bool] = Nonedelete_after: Optional[DeleteAfter] = None@@ -505,6 +511,8 @@ class RenderStillParams:'forceWidth': self.force_width,'licenseKey': self.license_key if self.license_key is not None else self.api_key,'forceHeight': self.force_height,+ 'forceFps': self.force_fps,+ 'forceDurationInFrames': self.force_duration_in_frames,'forceBucketName': self.force_bucket_name,'deleteAfter': self.delete_after,'attempt': self.attempt,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.rbindex 64272ee98c..01d8ad76cc 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@@ -18,6 +18,8 @@ def get_render_media_on_lambda_payload(env_variables: {},every_nth_frame: 1,force_height: nil,+ force_fps: nil,+ force_duration_in_frames: nil,force_path_style: false,force_width: nil,api_key: nil,@@ -74,6 +76,8 @@ payload = {envVariables: env_variables,everyNthFrame: every_nth_frame,forceHeight: force_height,+ forceFps: force_fps,+ forceDurationInFrames: force_duration_in_frames,forcePathStyle: force_path_style,forceWidth: force_width,licenseKey: license_key || api_key,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.rbindex fb98c16a34..3d8aba4b52 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@@ -7,6 +7,8 @@ def get_render_still_on_lambda_payload(download_behavior: nil,env_variables: {},force_height: nil,+ force_fps: nil,+ force_duration_in_frames: nil,force_path_style: false,force_width: nil,api_key: nil,@@ -43,6 +45,8 @@ payload = {downloadBehavior: download_behavior,envVariables: env_variables,forceHeight: force_height,+ forceFps: force_fps,+ forceDurationInFrames: force_duration_in_frames,forcePathStyle: force_path_style,forceWidth: force_width,licenseKey: license_key || api_key,