@remotion/lambda 3.1.10 → 3.2.1

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.
Files changed (359) hide show
  1. package/dist/admin/make-layer-public.js +2 -2
  2. package/dist/api/presign-url.js +5 -0
  3. package/dist/api/render-media-on-lambda.d.ts +3 -2
  4. package/dist/api/render-media-on-lambda.js +45 -35
  5. package/dist/api/render-still-on-lambda.js +39 -30
  6. package/dist/cli/commands/render/render.js +2 -1
  7. package/dist/functions/helpers/create-post-render-data.js +7 -1
  8. package/dist/functions/helpers/find-output-file-in-bucket.js +6 -0
  9. package/dist/functions/helpers/get-lambdas-invoked-stats.d.ts +7 -1
  10. package/dist/functions/helpers/get-lambdas-invoked-stats.js +8 -3
  11. package/dist/functions/helpers/get-progress.js +11 -5
  12. package/dist/functions/launch.js +30 -7
  13. package/dist/functions/renderer.js +2 -1
  14. package/dist/functions/start.js +1 -0
  15. package/dist/shared/constants.d.ts +4 -1
  16. package/dist/shared/constants.js +1 -1
  17. package/dist/shared/hosted-layers.js +60 -60
  18. package/dist/shared/validate-lambda-codec.d.ts +1 -1
  19. package/dist/shared/validate-lambda-codec.js +1 -0
  20. package/package.json +6 -6
  21. package/remotionlambda.zip +0 -0
  22. package/dist/admin/bundle-lambda.d.ts.map +0 -1
  23. package/dist/admin/bundle-lambda.js.map +0 -1
  24. package/dist/admin/make-layer-public.d.ts.map +0 -1
  25. package/dist/admin/make-layer-public.js.map +0 -1
  26. package/dist/api/bucket-exists.d.ts.map +0 -1
  27. package/dist/api/bucket-exists.js.map +0 -1
  28. package/dist/api/clean-items.d.ts.map +0 -1
  29. package/dist/api/clean-items.js.map +0 -1
  30. package/dist/api/create-bucket.d.ts.map +0 -1
  31. package/dist/api/create-bucket.js.map +0 -1
  32. package/dist/api/create-function.d.ts.map +0 -1
  33. package/dist/api/create-function.js.map +0 -1
  34. package/dist/api/delete-function.d.ts.map +0 -1
  35. package/dist/api/delete-function.js.map +0 -1
  36. package/dist/api/delete-site.d.ts.map +0 -1
  37. package/dist/api/delete-site.js.map +0 -1
  38. package/dist/api/deploy-function.d.ts.map +0 -1
  39. package/dist/api/deploy-function.js.map +0 -1
  40. package/dist/api/deploy-site.d.ts.map +0 -1
  41. package/dist/api/deploy-site.js.map +0 -1
  42. package/dist/api/download-media.d.ts.map +0 -1
  43. package/dist/api/download-media.js.map +0 -1
  44. package/dist/api/enable-s3-website.d.ts.map +0 -1
  45. package/dist/api/enable-s3-website.js.map +0 -1
  46. package/dist/api/estimate-price.d.ts.map +0 -1
  47. package/dist/api/estimate-price.js.map +0 -1
  48. package/dist/api/get-aws-client.d.ts.map +0 -1
  49. package/dist/api/get-aws-client.js.map +0 -1
  50. package/dist/api/get-buckets.d.ts.map +0 -1
  51. package/dist/api/get-buckets.js.map +0 -1
  52. package/dist/api/get-function-info.d.ts.map +0 -1
  53. package/dist/api/get-function-info.js.map +0 -1
  54. package/dist/api/get-functions.d.ts.map +0 -1
  55. package/dist/api/get-functions.js.map +0 -1
  56. package/dist/api/get-or-create-bucket.d.ts.map +0 -1
  57. package/dist/api/get-or-create-bucket.js.map +0 -1
  58. package/dist/api/get-regions.d.ts.map +0 -1
  59. package/dist/api/get-regions.js.map +0 -1
  60. package/dist/api/get-render-progress.d.ts.map +0 -1
  61. package/dist/api/get-render-progress.js.map +0 -1
  62. package/dist/api/get-sites.d.ts.map +0 -1
  63. package/dist/api/get-sites.js.map +0 -1
  64. package/dist/api/iam-validation/role-permissions.d.ts.map +0 -1
  65. package/dist/api/iam-validation/role-permissions.js.map +0 -1
  66. package/dist/api/iam-validation/simulate-rule.d.ts.map +0 -1
  67. package/dist/api/iam-validation/simulate-rule.js.map +0 -1
  68. package/dist/api/iam-validation/simulate.d.ts.map +0 -1
  69. package/dist/api/iam-validation/simulate.js.map +0 -1
  70. package/dist/api/iam-validation/suggested-policy.d.ts.map +0 -1
  71. package/dist/api/iam-validation/suggested-policy.js.map +0 -1
  72. package/dist/api/iam-validation/user-permissions.d.ts.map +0 -1
  73. package/dist/api/iam-validation/user-permissions.js.map +0 -1
  74. package/dist/api/mock-functions.d.ts.map +0 -1
  75. package/dist/api/mock-functions.js.map +0 -1
  76. package/dist/api/presign-url.d.ts.map +0 -1
  77. package/dist/api/presign-url.js.map +0 -1
  78. package/dist/api/render-media-on-lambda.d.ts.map +0 -1
  79. package/dist/api/render-media-on-lambda.js.map +0 -1
  80. package/dist/api/render-still-on-lambda.d.ts.map +0 -1
  81. package/dist/api/render-still-on-lambda.js.map +0 -1
  82. package/dist/api/upload-dir.d.ts.map +0 -1
  83. package/dist/api/upload-dir.js.map +0 -1
  84. package/dist/cli/args.d.ts.map +0 -1
  85. package/dist/cli/args.js.map +0 -1
  86. package/dist/cli/commands/functions/deploy.d.ts.map +0 -1
  87. package/dist/cli/commands/functions/deploy.js.map +0 -1
  88. package/dist/cli/commands/functions/index.d.ts.map +0 -1
  89. package/dist/cli/commands/functions/index.js.map +0 -1
  90. package/dist/cli/commands/functions/ls.d.ts.map +0 -1
  91. package/dist/cli/commands/functions/ls.js.map +0 -1
  92. package/dist/cli/commands/functions/rm.d.ts.map +0 -1
  93. package/dist/cli/commands/functions/rm.js.map +0 -1
  94. package/dist/cli/commands/functions/rmall.d.ts.map +0 -1
  95. package/dist/cli/commands/functions/rmall.js.map +0 -1
  96. package/dist/cli/commands/policies/policies.d.ts.map +0 -1
  97. package/dist/cli/commands/policies/policies.js.map +0 -1
  98. package/dist/cli/commands/policies/role.d.ts.map +0 -1
  99. package/dist/cli/commands/policies/role.js.map +0 -1
  100. package/dist/cli/commands/policies/user.d.ts.map +0 -1
  101. package/dist/cli/commands/policies/user.js.map +0 -1
  102. package/dist/cli/commands/policies/validate.d.ts.map +0 -1
  103. package/dist/cli/commands/policies/validate.js.map +0 -1
  104. package/dist/cli/commands/quotas/increase.d.ts.map +0 -1
  105. package/dist/cli/commands/quotas/increase.js.map +0 -1
  106. package/dist/cli/commands/quotas/index.d.ts.map +0 -1
  107. package/dist/cli/commands/quotas/index.js.map +0 -1
  108. package/dist/cli/commands/quotas/list.d.ts.map +0 -1
  109. package/dist/cli/commands/quotas/list.js.map +0 -1
  110. package/dist/cli/commands/regions.d.ts.map +0 -1
  111. package/dist/cli/commands/regions.js.map +0 -1
  112. package/dist/cli/commands/render/progress.d.ts.map +0 -1
  113. package/dist/cli/commands/render/progress.js.map +0 -1
  114. package/dist/cli/commands/render/render.d.ts.map +0 -1
  115. package/dist/cli/commands/render/render.js.map +0 -1
  116. package/dist/cli/commands/sites/create.d.ts.map +0 -1
  117. package/dist/cli/commands/sites/create.js.map +0 -1
  118. package/dist/cli/commands/sites/index.d.ts.map +0 -1
  119. package/dist/cli/commands/sites/index.js.map +0 -1
  120. package/dist/cli/commands/sites/ls.d.ts.map +0 -1
  121. package/dist/cli/commands/sites/ls.js.map +0 -1
  122. package/dist/cli/commands/sites/rm.d.ts.map +0 -1
  123. package/dist/cli/commands/sites/rm.js.map +0 -1
  124. package/dist/cli/commands/sites/rmall.d.ts.map +0 -1
  125. package/dist/cli/commands/sites/rmall.js.map +0 -1
  126. package/dist/cli/commands/still.d.ts.map +0 -1
  127. package/dist/cli/commands/still.js.map +0 -1
  128. package/dist/cli/get-aws-region.d.ts.map +0 -1
  129. package/dist/cli/get-aws-region.js.map +0 -1
  130. package/dist/cli/help.d.ts.map +0 -1
  131. package/dist/cli/help.js.map +0 -1
  132. package/dist/cli/helpers/confirm.d.ts.map +0 -1
  133. package/dist/cli/helpers/confirm.js.map +0 -1
  134. package/dist/cli/helpers/date-string.d.ts.map +0 -1
  135. package/dist/cli/helpers/date-string.js.map +0 -1
  136. package/dist/cli/helpers/find-function-name.d.ts.map +0 -1
  137. package/dist/cli/helpers/find-function-name.js.map +0 -1
  138. package/dist/cli/helpers/format-bytes.d.ts +0 -7
  139. package/dist/cli/helpers/format-bytes.d.ts.map +0 -1
  140. package/dist/cli/helpers/format-bytes.js +0 -104
  141. package/dist/cli/helpers/format-bytes.js.map +0 -1
  142. package/dist/cli/helpers/get-cloudwatch-stream-url.d.ts.map +0 -1
  143. package/dist/cli/helpers/get-cloudwatch-stream-url.js.map +0 -1
  144. package/dist/cli/helpers/progress-bar.d.ts.map +0 -1
  145. package/dist/cli/helpers/progress-bar.js.map +0 -1
  146. package/dist/cli/helpers/quit.d.ts.map +0 -1
  147. package/dist/cli/helpers/quit.js.map +0 -1
  148. package/dist/cli/helpers/yes-or-no.d.ts.map +0 -1
  149. package/dist/cli/helpers/yes-or-no.js.map +0 -1
  150. package/dist/cli/index.d.ts.map +0 -1
  151. package/dist/cli/index.js.map +0 -1
  152. package/dist/cli/is-cli.d.ts.map +0 -1
  153. package/dist/cli/is-cli.js.map +0 -1
  154. package/dist/cli/log.d.ts.map +0 -1
  155. package/dist/cli/log.js.map +0 -1
  156. package/dist/client.d.ts.map +0 -1
  157. package/dist/client.js.map +0 -1
  158. package/dist/defaults.d.ts.map +0 -1
  159. package/dist/defaults.js.map +0 -1
  160. package/dist/functions/chunk-optimization/can-use-optimization.d.ts.map +0 -1
  161. package/dist/functions/chunk-optimization/can-use-optimization.js.map +0 -1
  162. package/dist/functions/chunk-optimization/collect-data.d.ts.map +0 -1
  163. package/dist/functions/chunk-optimization/collect-data.js.map +0 -1
  164. package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.d.ts.map +0 -1
  165. package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.js.map +0 -1
  166. package/dist/functions/chunk-optimization/get-profile-duration.d.ts.map +0 -1
  167. package/dist/functions/chunk-optimization/get-profile-duration.js.map +0 -1
  168. package/dist/functions/chunk-optimization/is-valid-profile.d.ts.map +0 -1
  169. package/dist/functions/chunk-optimization/is-valid-profile.js.map +0 -1
  170. package/dist/functions/chunk-optimization/optimize-invocation-order.d.ts.map +0 -1
  171. package/dist/functions/chunk-optimization/optimize-invocation-order.js.map +0 -1
  172. package/dist/functions/chunk-optimization/optimize-profile.d.ts.map +0 -1
  173. package/dist/functions/chunk-optimization/optimize-profile.js.map +0 -1
  174. package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts.map +0 -1
  175. package/dist/functions/chunk-optimization/plan-frame-ranges.js.map +0 -1
  176. package/dist/functions/chunk-optimization/s3-optimization-file.d.ts.map +0 -1
  177. package/dist/functions/chunk-optimization/s3-optimization-file.js.map +0 -1
  178. package/dist/functions/chunk-optimization/simulate-frame-ranges.d.ts.map +0 -1
  179. package/dist/functions/chunk-optimization/simulate-frame-ranges.js.map +0 -1
  180. package/dist/functions/chunk-optimization/sort-by-duration.d.ts.map +0 -1
  181. package/dist/functions/chunk-optimization/sort-by-duration.js.map +0 -1
  182. package/dist/functions/chunk-optimization/types.d.ts.map +0 -1
  183. package/dist/functions/chunk-optimization/types.js.map +0 -1
  184. package/dist/functions/helpers/best-frames-per-lambda-param.d.ts.map +0 -1
  185. package/dist/functions/helpers/best-frames-per-lambda-param.js.map +0 -1
  186. package/dist/functions/helpers/calculate-chunk-times.d.ts.map +0 -1
  187. package/dist/functions/helpers/calculate-chunk-times.js.map +0 -1
  188. package/dist/functions/helpers/calculate-price-from-bucket.d.ts.map +0 -1
  189. package/dist/functions/helpers/calculate-price-from-bucket.js.map +0 -1
  190. package/dist/functions/helpers/clean-tmpdir.d.ts.map +0 -1
  191. package/dist/functions/helpers/clean-tmpdir.js.map +0 -1
  192. package/dist/functions/helpers/concat-videos.d.ts.map +0 -1
  193. package/dist/functions/helpers/concat-videos.js.map +0 -1
  194. package/dist/functions/helpers/create-post-render-data.d.ts.map +0 -1
  195. package/dist/functions/helpers/create-post-render-data.js.map +0 -1
  196. package/dist/functions/helpers/delete-chunks.d.ts.map +0 -1
  197. package/dist/functions/helpers/delete-chunks.js.map +0 -1
  198. package/dist/functions/helpers/expected-out-name.d.ts.map +0 -1
  199. package/dist/functions/helpers/expected-out-name.js.map +0 -1
  200. package/dist/functions/helpers/find-output-file-in-bucket.d.ts.map +0 -1
  201. package/dist/functions/helpers/find-output-file-in-bucket.js.map +0 -1
  202. package/dist/functions/helpers/format-costs-info.d.ts.map +0 -1
  203. package/dist/functions/helpers/format-costs-info.js.map +0 -1
  204. package/dist/functions/helpers/get-browser-instance.d.ts.map +0 -1
  205. package/dist/functions/helpers/get-browser-instance.js.map +0 -1
  206. package/dist/functions/helpers/get-chromium-executable-path.d.ts.map +0 -1
  207. package/dist/functions/helpers/get-chromium-executable-path.js.map +0 -1
  208. package/dist/functions/helpers/get-cleanup-progress.d.ts.map +0 -1
  209. package/dist/functions/helpers/get-cleanup-progress.js.map +0 -1
  210. package/dist/functions/helpers/get-current-architecture.d.ts.map +0 -1
  211. package/dist/functions/helpers/get-current-architecture.js.map +0 -1
  212. package/dist/functions/helpers/get-current-region.d.ts.map +0 -1
  213. package/dist/functions/helpers/get-current-region.js.map +0 -1
  214. package/dist/functions/helpers/get-encoding-metadata.d.ts.map +0 -1
  215. package/dist/functions/helpers/get-encoding-metadata.js.map +0 -1
  216. package/dist/functions/helpers/get-files-in-folder.d.ts.map +0 -1
  217. package/dist/functions/helpers/get-files-in-folder.js.map +0 -1
  218. package/dist/functions/helpers/get-files-to-delete.d.ts.map +0 -1
  219. package/dist/functions/helpers/get-files-to-delete.js.map +0 -1
  220. package/dist/functions/helpers/get-final-encoding-status.d.ts.map +0 -1
  221. package/dist/functions/helpers/get-final-encoding-status.js.map +0 -1
  222. package/dist/functions/helpers/get-folder-size.d.ts.map +0 -1
  223. package/dist/functions/helpers/get-folder-size.js.map +0 -1
  224. package/dist/functions/helpers/get-lambdas-invoked-stats.d.ts.map +0 -1
  225. package/dist/functions/helpers/get-lambdas-invoked-stats.js.map +0 -1
  226. package/dist/functions/helpers/get-output-url-from-metadata.d.ts.map +0 -1
  227. package/dist/functions/helpers/get-output-url-from-metadata.js.map +0 -1
  228. package/dist/functions/helpers/get-overall-progress.d.ts.map +0 -1
  229. package/dist/functions/helpers/get-overall-progress.js.map +0 -1
  230. package/dist/functions/helpers/get-post-render-data.d.ts.map +0 -1
  231. package/dist/functions/helpers/get-post-render-data.js.map +0 -1
  232. package/dist/functions/helpers/get-progress.d.ts.map +0 -1
  233. package/dist/functions/helpers/get-progress.js.map +0 -1
  234. package/dist/functions/helpers/get-render-metadata.d.ts.map +0 -1
  235. package/dist/functions/helpers/get-render-metadata.js.map +0 -1
  236. package/dist/functions/helpers/get-retry-stats.d.ts.map +0 -1
  237. package/dist/functions/helpers/get-retry-stats.js.map +0 -1
  238. package/dist/functions/helpers/get-time-to-finish.d.ts.map +0 -1
  239. package/dist/functions/helpers/get-time-to-finish.js.map +0 -1
  240. package/dist/functions/helpers/inspect-errors.d.ts.map +0 -1
  241. package/dist/functions/helpers/inspect-errors.js.map +0 -1
  242. package/dist/functions/helpers/io.d.ts.map +0 -1
  243. package/dist/functions/helpers/io.js.map +0 -1
  244. package/dist/functions/helpers/is-enosp-err.d.ts.map +0 -1
  245. package/dist/functions/helpers/is-enosp-err.js.map +0 -1
  246. package/dist/functions/helpers/is-warm.d.ts.map +0 -1
  247. package/dist/functions/helpers/is-warm.js.map +0 -1
  248. package/dist/functions/helpers/min-max.d.ts.map +0 -1
  249. package/dist/functions/helpers/min-max.js.map +0 -1
  250. package/dist/functions/helpers/print-cloudwatch-helper.d.ts.map +0 -1
  251. package/dist/functions/helpers/print-cloudwatch-helper.js.map +0 -1
  252. package/dist/functions/helpers/print-concurrency-curve.d.ts.map +0 -1
  253. package/dist/functions/helpers/print-concurrency-curve.js.map +0 -1
  254. package/dist/functions/helpers/read-with-progress.d.ts.map +0 -1
  255. package/dist/functions/helpers/read-with-progress.js.map +0 -1
  256. package/dist/functions/helpers/timer.d.ts.map +0 -1
  257. package/dist/functions/helpers/timer.js.map +0 -1
  258. package/dist/functions/helpers/validate-composition.d.ts.map +0 -1
  259. package/dist/functions/helpers/validate-composition.js.map +0 -1
  260. package/dist/functions/helpers/write-lambda-error.d.ts.map +0 -1
  261. package/dist/functions/helpers/write-lambda-error.js.map +0 -1
  262. package/dist/functions/helpers/write-post-render-data.d.ts.map +0 -1
  263. package/dist/functions/helpers/write-post-render-data.js.map +0 -1
  264. package/dist/functions/index.d.ts.map +0 -1
  265. package/dist/functions/index.js.map +0 -1
  266. package/dist/functions/info.d.ts.map +0 -1
  267. package/dist/functions/info.js.map +0 -1
  268. package/dist/functions/launch.d.ts.map +0 -1
  269. package/dist/functions/launch.js.map +0 -1
  270. package/dist/functions/progress.d.ts.map +0 -1
  271. package/dist/functions/progress.js.map +0 -1
  272. package/dist/functions/renderer.d.ts.map +0 -1
  273. package/dist/functions/renderer.js.map +0 -1
  274. package/dist/functions/start.d.ts.map +0 -1
  275. package/dist/functions/start.js.map +0 -1
  276. package/dist/functions/still.d.ts.map +0 -1
  277. package/dist/functions/still.js.map +0 -1
  278. package/dist/index.d.ts.map +0 -1
  279. package/dist/index.js.map +0 -1
  280. package/dist/internals.d.ts.map +0 -1
  281. package/dist/internals.js.map +0 -1
  282. package/dist/pricing/aws-regions.d.ts.map +0 -1
  283. package/dist/pricing/aws-regions.js.map +0 -1
  284. package/dist/pricing/price-per-1-s.d.ts.map +0 -1
  285. package/dist/pricing/price-per-1-s.js.map +0 -1
  286. package/dist/regions.d.ts.map +0 -1
  287. package/dist/regions.js.map +0 -1
  288. package/dist/shared/await.d.ts.map +0 -1
  289. package/dist/shared/await.js.map +0 -1
  290. package/dist/shared/aws-clients.d.ts.map +0 -1
  291. package/dist/shared/aws-clients.js.map +0 -1
  292. package/dist/shared/bundle-site.d.ts.map +0 -1
  293. package/dist/shared/bundle-site.js.map +0 -1
  294. package/dist/shared/call-lambda.d.ts.map +0 -1
  295. package/dist/shared/call-lambda.js.map +0 -1
  296. package/dist/shared/check-credentials.d.ts.map +0 -1
  297. package/dist/shared/check-credentials.js.map +0 -1
  298. package/dist/shared/chunk.d.ts +0 -2
  299. package/dist/shared/chunk.d.ts.map +0 -1
  300. package/dist/shared/chunk.js +0 -12
  301. package/dist/shared/chunk.js.map +0 -1
  302. package/dist/shared/constants.d.ts.map +0 -1
  303. package/dist/shared/constants.js.map +0 -1
  304. package/dist/shared/convert-to-serve-url.d.ts.map +0 -1
  305. package/dist/shared/convert-to-serve-url.js.map +0 -1
  306. package/dist/shared/docs-url.d.ts.map +0 -1
  307. package/dist/shared/docs-url.js.map +0 -1
  308. package/dist/shared/function-zip-path.d.ts.map +0 -1
  309. package/dist/shared/function-zip-path.js.map +0 -1
  310. package/dist/shared/get-account-id.d.ts.map +0 -1
  311. package/dist/shared/get-account-id.js.map +0 -1
  312. package/dist/shared/get-function-version.d.ts.map +0 -1
  313. package/dist/shared/get-function-version.js.map +0 -1
  314. package/dist/shared/hosted-layers.d.ts.map +0 -1
  315. package/dist/shared/hosted-layers.js.map +0 -1
  316. package/dist/shared/is-in-lambda.d.ts.map +0 -1
  317. package/dist/shared/is-in-lambda.js.map +0 -1
  318. package/dist/shared/make-s3-url.d.ts.map +0 -1
  319. package/dist/shared/make-s3-url.js.map +0 -1
  320. package/dist/shared/parse-lambda-initialized-key.d.ts.map +0 -1
  321. package/dist/shared/parse-lambda-initialized-key.js.map +0 -1
  322. package/dist/shared/parse-lambda-timings-key.d.ts.map +0 -1
  323. package/dist/shared/parse-lambda-timings-key.js.map +0 -1
  324. package/dist/shared/random-hash.d.ts.map +0 -1
  325. package/dist/shared/random-hash.js.map +0 -1
  326. package/dist/shared/return-values.d.ts.map +0 -1
  327. package/dist/shared/return-values.js.map +0 -1
  328. package/dist/shared/sleep.d.ts.map +0 -1
  329. package/dist/shared/sleep.js.map +0 -1
  330. package/dist/shared/stream-to-string.d.ts.map +0 -1
  331. package/dist/shared/stream-to-string.js.map +0 -1
  332. package/dist/shared/validate-architecture.d.ts.map +0 -1
  333. package/dist/shared/validate-architecture.js.map +0 -1
  334. package/dist/shared/validate-aws-region.d.ts.map +0 -1
  335. package/dist/shared/validate-aws-region.js.map +0 -1
  336. package/dist/shared/validate-bucketname.d.ts.map +0 -1
  337. package/dist/shared/validate-bucketname.js.map +0 -1
  338. package/dist/shared/validate-disk-size-in-mb.d.ts.map +0 -1
  339. package/dist/shared/validate-disk-size-in-mb.js.map +0 -1
  340. package/dist/shared/validate-frames-per-lambda.d.ts.map +0 -1
  341. package/dist/shared/validate-frames-per-lambda.js.map +0 -1
  342. package/dist/shared/validate-memory-size.d.ts.map +0 -1
  343. package/dist/shared/validate-memory-size.js.map +0 -1
  344. package/dist/shared/validate-outname.d.ts.map +0 -1
  345. package/dist/shared/validate-outname.js.map +0 -1
  346. package/dist/shared/validate-presign-expiration.d.ts.map +0 -1
  347. package/dist/shared/validate-presign-expiration.js.map +0 -1
  348. package/dist/shared/validate-privacy.d.ts.map +0 -1
  349. package/dist/shared/validate-privacy.js.map +0 -1
  350. package/dist/shared/validate-retention-period.d.ts.map +0 -1
  351. package/dist/shared/validate-retention-period.js.map +0 -1
  352. package/dist/shared/validate-retries.d.ts.map +0 -1
  353. package/dist/shared/validate-retries.js.map +0 -1
  354. package/dist/shared/validate-serveurl.d.ts.map +0 -1
  355. package/dist/shared/validate-serveurl.js.map +0 -1
  356. package/dist/shared/validate-site-name.d.ts.map +0 -1
  357. package/dist/shared/validate-site-name.js.map +0 -1
  358. package/dist/shared/validate-timeout.d.ts.map +0 -1
  359. package/dist/shared/validate-timeout.js.map +0 -1
@@ -43,11 +43,11 @@ const makeLayerPublic = async () => {
43
43
  const { Version, LayerArn } = await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.PublishLayerVersionCommand({
44
44
  Content: {
45
45
  S3Bucket: 'remotionlambda-binaries-' + region,
46
- S3Key: `remotion-layer-${layer}-v6-${architecture}.zip`,
46
+ S3Key: `remotion-layer-${layer}-v7-${architecture}.zip`,
47
47
  },
48
48
  LayerName: layerName,
49
49
  LicenseInfo: layer === 'chromium'
50
- ? 'Chromium 101, compiled from source. Read Chromium License: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/LICENSE'
50
+ ? 'Chromium 104, compiled from source. Read Chromium License: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/LICENSE'
51
51
  : layer === 'ffmpeg'
52
52
  ? 'Compiled from FFMPEG source. Read FFMPEG license: https://ffmpeg.org/legal.html'
53
53
  : 'Contains Noto Sans font. Read Noto Sans License: https://fonts.google.com/noto/specimen/Noto+Sans/about',
@@ -31,6 +31,11 @@ const presignUrl = async ({ region, bucketName, objectKey, checkIfObjectExists =
31
31
  if (err.name === 'NotFound') {
32
32
  return null;
33
33
  }
34
+ if (err.message === 'UnknownError' ||
35
+ err.$metadata
36
+ .httpStatusCode === 403) {
37
+ throw new Error(`Unable to access item "${objectKey}" from bucket "${bucketName}". You must have permission for both "s3:GetObject" and "s3:ListBucket" actions.`);
38
+ }
34
39
  throw err;
35
40
  }
36
41
  }
@@ -29,6 +29,7 @@ export declare type RenderMediaOnLambdaInput = {
29
29
  numberOfGifLoops?: number | null;
30
30
  concurrencyPerLambda?: number;
31
31
  downloadBehavior?: DownloadBehavior | null;
32
+ muted?: boolean;
32
33
  };
33
34
  export declare type RenderMediaOnLambdaOutput = {
34
35
  renderId: string;
@@ -52,8 +53,8 @@ export declare type RenderMediaOnLambdaOutput = {
52
53
  * @param params.logLevel Level of logging that Lambda function should perform. Default "info".
53
54
  * @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
54
55
  */
55
- export declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
56
+ export declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
56
57
  /**
57
58
  * @deprecated Renamed to renderMediaOnLambda()
58
59
  */
59
- export declare const renderVideoOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
60
+ export declare const renderVideoOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
@@ -26,46 +26,56 @@ const validate_serveurl_1 = require("../shared/validate-serveurl");
26
26
  * @param params.logLevel Level of logging that Lambda function should perform. Default "info".
27
27
  * @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
28
28
  */
29
- const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, }) => {
29
+ const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, }) => {
30
+ var _a;
30
31
  const actualCodec = (0, validate_lambda_codec_1.validateLambdaCodec)(codec);
31
32
  (0, validate_serveurl_1.validateServeUrl)(serveUrl);
32
33
  (0, validate_frames_per_lambda_1.validateFramesPerLambda)(framesPerLambda !== null && framesPerLambda !== void 0 ? framesPerLambda : null);
33
34
  (0, validate_download_behavior_1.validateDownloadBehavior)(downloadBehavior);
34
35
  const realServeUrl = await (0, convert_to_serve_url_1.convertToServeUrl)(serveUrl, region);
35
- const res = await (0, call_lambda_1.callLambda)({
36
- functionName,
37
- type: constants_1.LambdaRoutines.start,
38
- payload: {
39
- framesPerLambda: framesPerLambda !== null && framesPerLambda !== void 0 ? framesPerLambda : null,
40
- composition,
41
- serveUrl: realServeUrl,
42
- inputProps,
43
- codec: actualCodec,
44
- imageFormat,
45
- crf,
46
- envVariables,
47
- pixelFormat,
48
- proResProfile,
49
- quality,
50
- maxRetries,
51
- privacy,
52
- logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
53
- frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
54
- outName: outName !== null && outName !== void 0 ? outName : null,
55
- timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : 30000,
56
- chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
57
- scale: scale !== null && scale !== void 0 ? scale : 1,
58
- everyNthFrame: everyNthFrame !== null && everyNthFrame !== void 0 ? everyNthFrame : 1,
59
- numberOfGifLoops: numberOfGifLoops !== null && numberOfGifLoops !== void 0 ? numberOfGifLoops : 0,
60
- concurrencyPerLambda: concurrencyPerLambda !== null && concurrencyPerLambda !== void 0 ? concurrencyPerLambda : 1,
61
- downloadBehavior: downloadBehavior !== null && downloadBehavior !== void 0 ? downloadBehavior : { type: 'play-in-browser' },
62
- },
63
- region,
64
- });
65
- return {
66
- renderId: res.renderId,
67
- bucketName: res.bucketName,
68
- };
36
+ try {
37
+ const res = await (0, call_lambda_1.callLambda)({
38
+ functionName,
39
+ type: constants_1.LambdaRoutines.start,
40
+ payload: {
41
+ framesPerLambda: framesPerLambda !== null && framesPerLambda !== void 0 ? framesPerLambda : null,
42
+ composition,
43
+ serveUrl: realServeUrl,
44
+ inputProps,
45
+ codec: actualCodec,
46
+ imageFormat,
47
+ crf,
48
+ envVariables,
49
+ pixelFormat,
50
+ proResProfile,
51
+ quality,
52
+ maxRetries,
53
+ privacy,
54
+ logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
55
+ frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
56
+ outName: outName !== null && outName !== void 0 ? outName : null,
57
+ timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : 30000,
58
+ chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
59
+ scale: scale !== null && scale !== void 0 ? scale : 1,
60
+ everyNthFrame: everyNthFrame !== null && everyNthFrame !== void 0 ? everyNthFrame : 1,
61
+ numberOfGifLoops: numberOfGifLoops !== null && numberOfGifLoops !== void 0 ? numberOfGifLoops : 0,
62
+ concurrencyPerLambda: concurrencyPerLambda !== null && concurrencyPerLambda !== void 0 ? concurrencyPerLambda : 1,
63
+ downloadBehavior: downloadBehavior !== null && downloadBehavior !== void 0 ? downloadBehavior : { type: 'play-in-browser' },
64
+ muted: muted !== null && muted !== void 0 ? muted : false,
65
+ },
66
+ region,
67
+ });
68
+ return {
69
+ renderId: res.renderId,
70
+ bucketName: res.bucketName,
71
+ };
72
+ }
73
+ catch (err) {
74
+ if ((_a = err.stack) === null || _a === void 0 ? void 0 : _a.includes('UnrecognizedClientException')) {
75
+ throw new Error('UnrecognizedClientException: The AWS credentials provided were probably mixed up. Learn how to fix this issue here: https://remotion.dev/docs/lambda/troubleshooting/unrecognizedclientexception');
76
+ }
77
+ throw err;
78
+ }
69
79
  };
70
80
  exports.renderMediaOnLambda = renderMediaOnLambda;
71
81
  /**
@@ -21,36 +21,45 @@ const convert_to_serve_url_1 = require("../shared/convert-to-serve-url");
21
21
  * @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.
22
22
  */
23
23
  const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, }) => {
24
+ var _a;
24
25
  const realServeUrl = await (0, convert_to_serve_url_1.convertToServeUrl)(serveUrl, region);
25
- const res = await (0, call_lambda_1.callLambda)({
26
- functionName,
27
- type: constants_1.LambdaRoutines.still,
28
- payload: {
29
- composition,
30
- serveUrl: realServeUrl,
31
- inputProps,
32
- imageFormat,
33
- envVariables,
34
- quality,
35
- maxRetries: maxRetries !== null && maxRetries !== void 0 ? maxRetries : constants_1.DEFAULT_MAX_RETRIES,
36
- frame: frame !== null && frame !== void 0 ? frame : 0,
37
- privacy,
38
- attempt: 1,
39
- logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
40
- outName: outName !== null && outName !== void 0 ? outName : null,
41
- timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : 30000,
42
- chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
43
- scale: scale !== null && scale !== void 0 ? scale : 1,
44
- downloadBehavior: downloadBehavior !== null && downloadBehavior !== void 0 ? downloadBehavior : { type: 'play-in-browser' },
45
- },
46
- region,
47
- });
48
- return {
49
- estimatedPrice: res.estimatedPrice,
50
- url: res.output,
51
- sizeInBytes: res.size,
52
- bucketName: res.bucketName,
53
- renderId: res.renderId,
54
- };
26
+ try {
27
+ const res = await (0, call_lambda_1.callLambda)({
28
+ functionName,
29
+ type: constants_1.LambdaRoutines.still,
30
+ payload: {
31
+ composition,
32
+ serveUrl: realServeUrl,
33
+ inputProps,
34
+ imageFormat,
35
+ envVariables,
36
+ quality,
37
+ maxRetries: maxRetries !== null && maxRetries !== void 0 ? maxRetries : constants_1.DEFAULT_MAX_RETRIES,
38
+ frame: frame !== null && frame !== void 0 ? frame : 0,
39
+ privacy,
40
+ attempt: 1,
41
+ logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
42
+ outName: outName !== null && outName !== void 0 ? outName : null,
43
+ timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : 30000,
44
+ chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
45
+ scale: scale !== null && scale !== void 0 ? scale : 1,
46
+ downloadBehavior: downloadBehavior !== null && downloadBehavior !== void 0 ? downloadBehavior : { type: 'play-in-browser' },
47
+ },
48
+ region,
49
+ });
50
+ return {
51
+ estimatedPrice: res.estimatedPrice,
52
+ url: res.output,
53
+ sizeInBytes: res.size,
54
+ bucketName: res.bucketName,
55
+ renderId: res.renderId,
56
+ };
57
+ }
58
+ catch (err) {
59
+ if ((_a = err.stack) === null || _a === void 0 ? void 0 : _a.includes('UnrecognizedClientException')) {
60
+ throw new Error('UnrecognizedClientException: The AWS credentials provided were probably mixed up. Learn how to fix this issue here: https://remotion.dev/docs/lambda/troubleshooting/unrecognizedclientexception');
61
+ }
62
+ throw err;
63
+ }
55
64
  };
56
65
  exports.renderStillOnLambda = renderStillOnLambda;
@@ -38,7 +38,7 @@ const renderCommand = async (args) => {
38
38
  (0, quit_1.quit)(1);
39
39
  }
40
40
  const outName = (_a = args[2]) !== null && _a !== void 0 ? _a : null;
41
- const { chromiumOptions, codec, crf, envVariables, frameRange, imageFormat, inputProps, logLevel, pixelFormat, proResProfile, puppeteerTimeout, quality, scale, everyNthFrame, numberOfGifLoops, } = await cli_1.CliInternals.getCliOptions({
41
+ const { chromiumOptions, codec, crf, envVariables, frameRange, imageFormat, inputProps, logLevel, pixelFormat, proResProfile, puppeteerTimeout, quality, scale, everyNthFrame, numberOfGifLoops, muted, } = await cli_1.CliInternals.getCliOptions({
42
42
  type: 'series',
43
43
  isLambda: true,
44
44
  });
@@ -75,6 +75,7 @@ const renderCommand = async (args) => {
75
75
  numberOfGifLoops,
76
76
  everyNthFrame,
77
77
  concurrencyPerLambda: args_1.parsedLambdaCli['concurrency-per-lambda'],
78
+ muted,
78
79
  });
79
80
  const totalSteps = outName ? 5 : 4;
80
81
  const progressBar = cli_1.CliInternals.createOverwriteableCliOutput(cli_1.CliInternals.quietFlagProvided());
@@ -41,7 +41,13 @@ const createPostRenderData = ({ renderId, region, memorySizeInMb, renderMetadata
41
41
  const renderSize = contents
42
42
  .map((c) => { var _a; return (_a = c.Size) !== null && _a !== void 0 ? _a : 0; })
43
43
  .reduce((a, b) => a + b, 0);
44
- const { timeToInvokeLambdas } = (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)(contents, renderId, renderMetadata.startedDate);
44
+ const { timeToInvokeLambdas } = (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)({
45
+ contents,
46
+ renderId,
47
+ estimatedRenderLambdaInvokations: renderMetadata.estimatedRenderLambdaInvokations,
48
+ startDate: renderMetadata.startedDate,
49
+ checkIfAllLambdasWereInvoked: false,
50
+ });
45
51
  const retriesInfo = (0, get_retry_stats_1.getRetryStats)({ contents, renderId });
46
52
  if (timeToInvokeLambdas === null) {
47
53
  throw new Error('should have timing for all lambdas');
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.findOutputFileInBucket = void 0;
4
4
  const client_s3_1 = require("@aws-sdk/client-s3");
5
+ const suggested_policy_1 = require("../../api/iam-validation/suggested-policy");
5
6
  const aws_clients_1 = require("../../shared/aws-clients");
6
7
  const expected_out_name_1 = require("./expected-out-name");
7
8
  const get_output_url_from_metadata_1 = require("./get-output-url-from-metadata");
@@ -26,6 +27,11 @@ const findOutputFileInBucket = async ({ region, renderMetadata, bucketName, }) =
26
27
  if (err.name === 'NotFound') {
27
28
  return null;
28
29
  }
30
+ if (err.message === 'UnknownError' ||
31
+ err.$metadata
32
+ .httpStatusCode === 403) {
33
+ throw new Error(`Unable to access item "${expectedOutData.key}" from bucket "${expectedOutData.renderBucketName}". The "${suggested_policy_1.ROLE_NAME}" role must have permission for both "s3:GetObject" and "s3:ListBucket" actions.`);
34
+ }
29
35
  throw err;
30
36
  }
31
37
  };
@@ -3,4 +3,10 @@ export declare type LambdaInvokeStats = {
3
3
  timeToInvokeLambdas: number | null;
4
4
  lambdasInvoked: number;
5
5
  };
6
- export declare const getLambdasInvokedStats: (contents: _Object[], renderId: string, startDate: number | null) => LambdaInvokeStats;
6
+ export declare const getLambdasInvokedStats: ({ contents, renderId, estimatedRenderLambdaInvokations, startDate, checkIfAllLambdasWereInvoked, }: {
7
+ contents: _Object[];
8
+ renderId: string;
9
+ estimatedRenderLambdaInvokations: number | null;
10
+ startDate: number | null;
11
+ checkIfAllLambdasWereInvoked: boolean;
12
+ }) => LambdaInvokeStats;
@@ -2,11 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getLambdasInvokedStats = void 0;
4
4
  const constants_1 = require("../../shared/constants");
5
+ const parse_lambda_initialized_key_1 = require("../../shared/parse-lambda-initialized-key");
5
6
  const min_max_1 = require("./min-max");
6
- const getLambdasInvokedStats = (contents, renderId, startDate) => {
7
+ const getLambdasInvokedStats = ({ contents, renderId, estimatedRenderLambdaInvokations, startDate, checkIfAllLambdasWereInvoked, }) => {
7
8
  var _a;
8
- const lambdasInvoked = contents.filter((c) => { var _a; return (_a = c.Key) === null || _a === void 0 ? void 0 : _a.startsWith((0, constants_1.lambdaInitializedPrefix)(renderId)); });
9
- const timeToInvokeLambdas = startDate === null
9
+ const lambdasInvoked = contents
10
+ .filter((c) => { var _a; return (_a = c.Key) === null || _a === void 0 ? void 0 : _a.startsWith((0, constants_1.lambdaInitializedPrefix)(renderId)); })
11
+ .filter((c) => (0, parse_lambda_initialized_key_1.parseLambdaInitializedKey)(c.Key).attempt === 1);
12
+ const allLambdasInvoked = !checkIfAllLambdasWereInvoked ||
13
+ lambdasInvoked.length === estimatedRenderLambdaInvokations;
14
+ const timeToInvokeLambdas = !allLambdasInvoked || startDate === null
10
15
  ? null
11
16
  : ((_a = (0, min_max_1.max)(lambdasInvoked.map((l) => { var _a; return (_a = l.LastModified) === null || _a === void 0 ? void 0 : _a.getTime(); }))) !== null && _a !== void 0 ? _a : 0) - startDate;
12
17
  return {
@@ -23,7 +23,7 @@ const get_time_to_finish_1 = require("./get-time-to-finish");
23
23
  const inspect_errors_1 = require("./inspect-errors");
24
24
  const io_1 = require("./io");
25
25
  const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region, memorySizeInMb, timeoutInMiliseconds, }) => {
26
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
26
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
27
27
  const postRenderData = await (0, get_post_render_data_1.getPostRenderData)({
28
28
  bucketName,
29
29
  region,
@@ -135,7 +135,13 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
135
135
  const renderSize = contents
136
136
  .map((c) => { var _a; return (_a = c.Size) !== null && _a !== void 0 ? _a : 0; })
137
137
  .reduce((a, b) => a + b, 0);
138
- const lambdasInvokedStats = (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)(contents, renderId, (_g = renderMetadata === null || renderMetadata === void 0 ? void 0 : renderMetadata.startedDate) !== null && _g !== void 0 ? _g : null);
138
+ const lambdasInvokedStats = (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)({
139
+ contents,
140
+ renderId,
141
+ estimatedRenderLambdaInvokations: (_g = renderMetadata === null || renderMetadata === void 0 ? void 0 : renderMetadata.estimatedRenderLambdaInvokations) !== null && _g !== void 0 ? _g : null,
142
+ startDate: (_h = renderMetadata === null || renderMetadata === void 0 ? void 0 : renderMetadata.startedDate) !== null && _h !== void 0 ? _h : null,
143
+ checkIfAllLambdasWereInvoked: true,
144
+ });
139
145
  const retriesInfo = (0, get_retry_stats_1.getRetryStats)({
140
146
  contents,
141
147
  renderId,
@@ -147,7 +153,7 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
147
153
  lambdaInvokeStatus: lambdasInvokedStats,
148
154
  });
149
155
  const chunkCount = outputFile
150
- ? (_h = renderMetadata === null || renderMetadata === void 0 ? void 0 : renderMetadata.totalChunks) !== null && _h !== void 0 ? _h : 0
156
+ ? (_j = renderMetadata === null || renderMetadata === void 0 ? void 0 : renderMetadata.totalChunks) !== null && _j !== void 0 ? _j : 0
151
157
  : chunks.length;
152
158
  // We add a 20 second buffer for it, since AWS timeshifts can be quite a lot. Once it's 20sec over the limit, we consider it timed out
153
159
  const isBeyondTimeout = renderMetadata &&
@@ -178,7 +184,7 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
178
184
  renderId,
179
185
  renderMetadata,
180
186
  bucket: bucketName,
181
- outputFile: (_j = outputFile === null || outputFile === void 0 ? void 0 : outputFile.url) !== null && _j !== void 0 ? _j : null,
187
+ outputFile: (_k = outputFile === null || outputFile === void 0 ? void 0 : outputFile.url) !== null && _k !== void 0 ? _k : null,
182
188
  timeToFinish,
183
189
  errors: allErrors,
184
190
  fatalErrorEncountered: allErrors.some((f) => f.isFatal && !f.willRetry),
@@ -193,7 +199,7 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
193
199
  type: 'absolute-time',
194
200
  })
195
201
  : null,
196
- timeToInvokeLambdas: (_k = encodingStatus === null || encodingStatus === void 0 ? void 0 : encodingStatus.timeToInvoke) !== null && _k !== void 0 ? _k : lambdasInvokedStats.timeToInvokeLambdas,
202
+ timeToInvokeLambdas: (_l = encodingStatus === null || encodingStatus === void 0 ? void 0 : encodingStatus.timeToInvoke) !== null && _l !== void 0 ? _l : lambdasInvokedStats.timeToInvokeLambdas,
197
203
  overallProgress: (0, get_overall_progress_1.getOverallProgress)({
198
204
  cleanup: cleanup ? cleanup.filesDeleted / cleanup.minFilesToDelete : 0,
199
205
  encoding: finalEncodingStatus && renderMetadata
@@ -39,6 +39,27 @@ const timer_1 = require("./helpers/timer");
39
39
  const validate_composition_1 = require("./helpers/validate-composition");
40
40
  const write_lambda_error_1 = require("./helpers/write-lambda-error");
41
41
  const write_post_render_data_1 = require("./helpers/write-post-render-data");
42
+ const callFunctionWithRetry = async (payload, retries = 0) => {
43
+ try {
44
+ await (0, aws_clients_1.getLambdaClient)((0, get_current_region_1.getCurrentRegionInFunction)()).send(new client_lambda_1.InvokeCommand({
45
+ FunctionName: process.env.AWS_LAMBDA_FUNCTION_NAME,
46
+ // @ts-expect-error
47
+ Payload: JSON.stringify(payload),
48
+ InvocationType: 'Event',
49
+ }), {});
50
+ }
51
+ catch (err) {
52
+ if (err.name === 'ResourceConflictException') {
53
+ if (retries > 10) {
54
+ throw err;
55
+ }
56
+ await new Promise((resolve) => {
57
+ setTimeout(resolve, 1000);
58
+ });
59
+ return callFunctionWithRetry(payload, retries + 1);
60
+ }
61
+ }
62
+ };
42
63
  const innerLaunchHandler = async (params, options) => {
43
64
  var _a, _b;
44
65
  if (params.type !== constants_1.LambdaRoutines.launch) {
@@ -127,6 +148,7 @@ const innerLaunchHandler = async (params, options) => {
127
148
  scale: params.scale,
128
149
  everyNthFrame: params.everyNthFrame,
129
150
  concurrencyPerLambda: params.concurrencyPerLambda,
151
+ muted: params.muted,
130
152
  };
131
153
  return payload;
132
154
  });
@@ -167,12 +189,7 @@ const innerLaunchHandler = async (params, options) => {
167
189
  });
168
190
  await Promise.all(lambdaPayloads.map(async (payload, index) => {
169
191
  const callingLambdaTimer = (0, timer_1.timer)('Calling chunk ' + index);
170
- await (0, aws_clients_1.getLambdaClient)((0, get_current_region_1.getCurrentRegionInFunction)()).send(new client_lambda_1.InvokeCommand({
171
- FunctionName: process.env.AWS_LAMBDA_FUNCTION_NAME,
172
- // @ts-expect-error
173
- Payload: JSON.stringify(payload),
174
- InvocationType: 'Event',
175
- }), {});
192
+ await callFunctionWithRetry(payload);
176
193
  callingLambdaTimer.end();
177
194
  }));
178
195
  reqSend.end();
@@ -295,7 +312,13 @@ const innerLaunchHandler = async (params, options) => {
295
312
  framesEncoded: frameCount.length,
296
313
  totalFrames: frameCount.length,
297
314
  doneIn: encodingStop ? encodingStop - encodingStart : null,
298
- timeToInvoke: (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)(contents, params.renderId, renderMetadata.startedDate).timeToInvokeLambdas,
315
+ timeToInvoke: (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)({
316
+ contents,
317
+ renderId: params.renderId,
318
+ estimatedRenderLambdaInvokations: renderMetadata.estimatedRenderLambdaInvokations,
319
+ checkIfAllLambdasWereInvoked: false,
320
+ startDate: renderMetadata.startedDate,
321
+ }).timeToInvokeLambdas,
299
322
  };
300
323
  const finalEncodingProgressProm = (0, io_1.lambdaWriteFile)({
301
324
  bucketName: params.bucketName,
@@ -113,9 +113,10 @@ const renderHandler = async (params, options, logs) => {
113
113
  everyNthFrame: params.everyNthFrame,
114
114
  numberOfGifLoops: null,
115
115
  downloadMap,
116
+ muted: params.muted,
117
+ enforceAudioTrack: true,
116
118
  });
117
119
  const endRendered = Date.now();
118
- console.log('Adding silent audio, chunk', params.chunk);
119
120
  const condensedTimingData = {
120
121
  ...chunkTimingData,
121
122
  timings: Object.values(chunkTimingData.timings),
@@ -43,6 +43,7 @@ const startHandler = async (params) => {
43
43
  everyNthFrame: params.everyNthFrame,
44
44
  concurrencyPerLambda: params.concurrencyPerLambda,
45
45
  downloadBehavior: params.downloadBehavior,
46
+ muted: params.muted,
46
47
  };
47
48
  await (0, aws_clients_1.getLambdaClient)((0, get_current_region_1.getCurrentRegionInFunction)()).send(new client_lambda_1.InvokeCommand({
48
49
  FunctionName: process.env.AWS_LAMBDA_FUNCTION_NAME,
@@ -113,6 +113,7 @@ export declare type LambdaPayloads = {
113
113
  numberOfGifLoops: number | null;
114
114
  concurrencyPerLambda: number;
115
115
  downloadBehavior: DownloadBehavior;
116
+ muted: boolean;
116
117
  };
117
118
  launch: {
118
119
  type: LambdaRoutines.launch;
@@ -141,6 +142,7 @@ export declare type LambdaPayloads = {
141
142
  numberOfGifLoops: number | null;
142
143
  concurrencyPerLambda: number;
143
144
  downloadBehavior: DownloadBehavior;
145
+ muted: boolean;
144
146
  };
145
147
  status: {
146
148
  type: LambdaRoutines.status;
@@ -176,6 +178,7 @@ export declare type LambdaPayloads = {
176
178
  chromiumOptions: ChromiumOptions;
177
179
  scale: number;
178
180
  everyNthFrame: number;
181
+ muted: boolean;
179
182
  };
180
183
  still: {
181
184
  type: LambdaRoutines.still;
@@ -224,7 +227,7 @@ export declare type RenderMetadata = {
224
227
  renderId: string;
225
228
  outName: OutNameInput | undefined;
226
229
  };
227
- export declare type LambdaVersions = '2022-08-01' | '2022-07-28' | '2022-07-27' | '2022-07-25' | '2022-07-23' | '2022-07-20' | '2022-07-18' | '2022-07-15' | '2022-07-14' | '2022-07-12' | '2022-07-10' | '2022-07-09' | '2022-07-08' | '2022-07-04' | '2022-06-30' | '2022-06-29' | '2022-06-25' | '2022-06-22' | '2022-06-21' | '2022-06-14' | '2022-06-08' | '2022-06-07' | '2022-06-02' | '2022-05-31' | '2022-05-28' | '2022-05-27' | '2022-05-19' | '2022-05-16' | '2022-05-11' | '2022-05-07' | '2022-05-06' | '2022-05-03' | '2022-04-20' | '2022-04-19' | '2022-04-18' | '2022-04-09' | '2022-04-08' | '2022-04-05' | '2022-04-02' | '2022-03-29' | '2022-03-17' | '2022-03-02' | '2022-03-01' | '2022-02-27' | '2022-02-14' | '2022-02-12' | '2022-02-09' | '2022-02-08' | '2022-02-07' | '2022-02-06' | '2022-02-05' | '2022-02-04' | '2022-02-03' | '2022-01-23' | '2022-01-19' | '2022-01-11' | '2022-01-10' | '2022-01-09' | '2022-01-06' | '2022-01-05' | '2021-12-22' | '2021-12-17' | '2021-12-16' | '2021-12-15' | '2021-12-14' | '2021-12-13' | '2021-12-11' | '2021-12-10' | '2021-12-04' | '2021-11-29' | '2021-11-27' | '2021-11-24' | '2021-11-22' | '2021-11-19' | '2021-11-18' | '2021-11-15' | '2021-11-12' | '2021-11-10' | '2021-11-01' | '2021-10-29' | '2021-10-27' | '2021-10-21' | '2021-10-19' | '2021-10-07' | '2021-10-03' | '2021-10-01' | '2021-09-15' | '2021-09-06' | '2021-08-06' | '2021-07-14' | '2021-07-05' | '2021-07-02' | '2021-06-23' | 'n/a';
230
+ export declare type LambdaVersions = '2022-08-10' | '2022-08-04' | '2022-08-02' | '2022-08-01' | '2022-07-28' | '2022-07-27' | '2022-07-25' | '2022-07-23' | '2022-07-20' | '2022-07-18' | '2022-07-15' | '2022-07-14' | '2022-07-12' | '2022-07-10' | '2022-07-09' | '2022-07-08' | '2022-07-04' | '2022-06-30' | '2022-06-29' | '2022-06-25' | '2022-06-22' | '2022-06-21' | '2022-06-14' | '2022-06-08' | '2022-06-07' | '2022-06-02' | '2022-05-31' | '2022-05-28' | '2022-05-27' | '2022-05-19' | '2022-05-16' | '2022-05-11' | '2022-05-07' | '2022-05-06' | '2022-05-03' | '2022-04-20' | '2022-04-19' | '2022-04-18' | '2022-04-09' | '2022-04-08' | '2022-04-05' | '2022-04-02' | '2022-03-29' | '2022-03-17' | '2022-03-02' | '2022-03-01' | '2022-02-27' | '2022-02-14' | '2022-02-12' | '2022-02-09' | '2022-02-08' | '2022-02-07' | '2022-02-06' | '2022-02-05' | '2022-02-04' | '2022-02-03' | '2022-01-23' | '2022-01-19' | '2022-01-11' | '2022-01-10' | '2022-01-09' | '2022-01-06' | '2022-01-05' | '2021-12-22' | '2021-12-17' | '2021-12-16' | '2021-12-15' | '2021-12-14' | '2021-12-13' | '2021-12-11' | '2021-12-10' | '2021-12-04' | '2021-11-29' | '2021-11-27' | '2021-11-24' | '2021-11-22' | '2021-11-19' | '2021-11-18' | '2021-11-15' | '2021-11-12' | '2021-11-10' | '2021-11-01' | '2021-10-29' | '2021-10-27' | '2021-10-21' | '2021-10-19' | '2021-10-07' | '2021-10-03' | '2021-10-01' | '2021-09-15' | '2021-09-06' | '2021-08-06' | '2021-07-14' | '2021-07-05' | '2021-07-02' | '2021-06-23' | 'n/a';
228
231
  export declare const CURRENT_VERSION: LambdaVersions;
229
232
  export declare type PostRenderData = {
230
233
  cost: {
@@ -84,6 +84,6 @@ var LambdaRoutines;
84
84
  LambdaRoutines["renderer"] = "renderer";
85
85
  LambdaRoutines["still"] = "still";
86
86
  })(LambdaRoutines = exports.LambdaRoutines || (exports.LambdaRoutines = {}));
87
- exports.CURRENT_VERSION = '2022-08-01';
87
+ exports.CURRENT_VERSION = '2022-08-10';
88
88
  exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = 'L-B99A9384';
89
89
  exports.LAMBDA_BURST_LIMIT_QUOTA = 'L-548AE339';