@transloadit/node 4.1.3
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.
- package/LICENSE +21 -0
- package/README.md +701 -0
- package/dist/ApiError.d.ts +22 -0
- package/dist/ApiError.d.ts.map +1 -0
- package/dist/ApiError.js +33 -0
- package/dist/ApiError.js.map +1 -0
- package/dist/InconsistentResponseError.d.ts +4 -0
- package/dist/InconsistentResponseError.d.ts.map +1 -0
- package/dist/InconsistentResponseError.js +4 -0
- package/dist/InconsistentResponseError.js.map +1 -0
- package/dist/PaginationStream.d.ts +14 -0
- package/dist/PaginationStream.d.ts.map +1 -0
- package/dist/PaginationStream.js +36 -0
- package/dist/PaginationStream.js.map +1 -0
- package/dist/PollingTimeoutError.d.ts +5 -0
- package/dist/PollingTimeoutError.d.ts.map +1 -0
- package/dist/PollingTimeoutError.js +5 -0
- package/dist/PollingTimeoutError.js.map +1 -0
- package/dist/Transloadit.d.ts +250 -0
- package/dist/Transloadit.d.ts.map +1 -0
- package/dist/Transloadit.js +661 -0
- package/dist/Transloadit.js.map +1 -0
- package/dist/alphalib/lib/nativeGlobby.d.ts +14 -0
- package/dist/alphalib/lib/nativeGlobby.d.ts.map +1 -0
- package/dist/alphalib/lib/nativeGlobby.js +181 -0
- package/dist/alphalib/lib/nativeGlobby.js.map +1 -0
- package/dist/alphalib/mcache.d.ts +65 -0
- package/dist/alphalib/mcache.d.ts.map +1 -0
- package/dist/alphalib/mcache.js +135 -0
- package/dist/alphalib/mcache.js.map +1 -0
- package/dist/alphalib/tryCatch.d.ts +21 -0
- package/dist/alphalib/tryCatch.d.ts.map +1 -0
- package/dist/alphalib/tryCatch.js +17 -0
- package/dist/alphalib/tryCatch.js.map +1 -0
- package/dist/alphalib/types/assembliesGet.d.ts +62 -0
- package/dist/alphalib/types/assembliesGet.d.ts.map +1 -0
- package/dist/alphalib/types/assembliesGet.js +33 -0
- package/dist/alphalib/types/assembliesGet.js.map +1 -0
- package/dist/alphalib/types/assemblyReplay.d.ts +7858 -0
- package/dist/alphalib/types/assemblyReplay.d.ts.map +1 -0
- package/dist/alphalib/types/assemblyReplay.js +15 -0
- package/dist/alphalib/types/assemblyReplay.js.map +1 -0
- package/dist/alphalib/types/assemblyReplayNotification.d.ts +7849 -0
- package/dist/alphalib/types/assemblyReplayNotification.d.ts.map +1 -0
- package/dist/alphalib/types/assemblyReplayNotification.js +13 -0
- package/dist/alphalib/types/assemblyReplayNotification.js.map +1 -0
- package/dist/alphalib/types/assemblyStatus.d.ts +71084 -0
- package/dist/alphalib/types/assemblyStatus.d.ts.map +1 -0
- package/dist/alphalib/types/assemblyStatus.js +710 -0
- package/dist/alphalib/types/assemblyStatus.js.map +1 -0
- package/dist/alphalib/types/bill.d.ts +44 -0
- package/dist/alphalib/types/bill.d.ts.map +1 -0
- package/dist/alphalib/types/bill.js +8 -0
- package/dist/alphalib/types/bill.js.map +1 -0
- package/dist/alphalib/types/robots/_index.d.ts +76306 -0
- package/dist/alphalib/types/robots/_index.d.ts.map +1 -0
- package/dist/alphalib/types/robots/_index.js +354 -0
- package/dist/alphalib/types/robots/_index.js.map +1 -0
- package/dist/alphalib/types/robots/_instructions-primitives.d.ts +3533 -0
- package/dist/alphalib/types/robots/_instructions-primitives.d.ts.map +1 -0
- package/dist/alphalib/types/robots/_instructions-primitives.js +1491 -0
- package/dist/alphalib/types/robots/_instructions-primitives.js.map +1 -0
- package/dist/alphalib/types/robots/ai-chat.d.ts +2096 -0
- package/dist/alphalib/types/robots/ai-chat.d.ts.map +1 -0
- package/dist/alphalib/types/robots/ai-chat.js +223 -0
- package/dist/alphalib/types/robots/ai-chat.js.map +1 -0
- package/dist/alphalib/types/robots/assembly-savejson.d.ts +52 -0
- package/dist/alphalib/types/robots/assembly-savejson.d.ts.map +1 -0
- package/dist/alphalib/types/robots/assembly-savejson.js +22 -0
- package/dist/alphalib/types/robots/assembly-savejson.js.map +1 -0
- package/dist/alphalib/types/robots/audio-artwork.d.ts +2867 -0
- package/dist/alphalib/types/robots/audio-artwork.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-artwork.js +73 -0
- package/dist/alphalib/types/robots/audio-artwork.js.map +1 -0
- package/dist/alphalib/types/robots/audio-concat.d.ts +2916 -0
- package/dist/alphalib/types/robots/audio-concat.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-concat.js +106 -0
- package/dist/alphalib/types/robots/audio-concat.js.map +1 -0
- package/dist/alphalib/types/robots/audio-encode.d.ts +2864 -0
- package/dist/alphalib/types/robots/audio-encode.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-encode.js +67 -0
- package/dist/alphalib/types/robots/audio-encode.js.map +1 -0
- package/dist/alphalib/types/robots/audio-loop.d.ts +2879 -0
- package/dist/alphalib/types/robots/audio-loop.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-loop.js +67 -0
- package/dist/alphalib/types/robots/audio-loop.js.map +1 -0
- package/dist/alphalib/types/robots/audio-merge.d.ts +2931 -0
- package/dist/alphalib/types/robots/audio-merge.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-merge.js +101 -0
- package/dist/alphalib/types/robots/audio-merge.js.map +1 -0
- package/dist/alphalib/types/robots/audio-waveform.d.ts +3131 -0
- package/dist/alphalib/types/robots/audio-waveform.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-waveform.js +238 -0
- package/dist/alphalib/types/robots/audio-waveform.js.map +1 -0
- package/dist/alphalib/types/robots/azure-import.d.ts +210 -0
- package/dist/alphalib/types/robots/azure-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/azure-import.js +73 -0
- package/dist/alphalib/types/robots/azure-import.js.map +1 -0
- package/dist/alphalib/types/robots/azure-store.d.ts +562 -0
- package/dist/alphalib/types/robots/azure-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/azure-store.js +115 -0
- package/dist/alphalib/types/robots/azure-store.js.map +1 -0
- package/dist/alphalib/types/robots/backblaze-import.d.ts +210 -0
- package/dist/alphalib/types/robots/backblaze-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/backblaze-import.js +81 -0
- package/dist/alphalib/types/robots/backblaze-import.js.map +1 -0
- package/dist/alphalib/types/robots/backblaze-store.d.ts +478 -0
- package/dist/alphalib/types/robots/backblaze-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/backblaze-store.js +76 -0
- package/dist/alphalib/types/robots/backblaze-store.js.map +1 -0
- package/dist/alphalib/types/robots/cloudfiles-import.d.ts +234 -0
- package/dist/alphalib/types/robots/cloudfiles-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/cloudfiles-import.js +80 -0
- package/dist/alphalib/types/robots/cloudfiles-import.js.map +1 -0
- package/dist/alphalib/types/robots/cloudfiles-store.d.ts +490 -0
- package/dist/alphalib/types/robots/cloudfiles-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/cloudfiles-store.js +70 -0
- package/dist/alphalib/types/robots/cloudfiles-store.js.map +1 -0
- package/dist/alphalib/types/robots/cloudflare-import.d.ts +234 -0
- package/dist/alphalib/types/robots/cloudflare-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/cloudflare-import.js +81 -0
- package/dist/alphalib/types/robots/cloudflare-import.js.map +1 -0
- package/dist/alphalib/types/robots/cloudflare-store.d.ts +514 -0
- package/dist/alphalib/types/robots/cloudflare-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/cloudflare-store.js +86 -0
- package/dist/alphalib/types/robots/cloudflare-store.js.map +1 -0
- package/dist/alphalib/types/robots/digitalocean-import.d.ts +234 -0
- package/dist/alphalib/types/robots/digitalocean-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/digitalocean-import.js +78 -0
- package/dist/alphalib/types/robots/digitalocean-import.js.map +1 -0
- package/dist/alphalib/types/robots/digitalocean-store.d.ts +526 -0
- package/dist/alphalib/types/robots/digitalocean-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/digitalocean-store.js +91 -0
- package/dist/alphalib/types/robots/digitalocean-store.js.map +1 -0
- package/dist/alphalib/types/robots/document-autorotate.d.ts +405 -0
- package/dist/alphalib/types/robots/document-autorotate.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-autorotate.js +44 -0
- package/dist/alphalib/types/robots/document-autorotate.js.map +1 -0
- package/dist/alphalib/types/robots/document-convert.d.ts +513 -0
- package/dist/alphalib/types/robots/document-convert.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-convert.js +273 -0
- package/dist/alphalib/types/robots/document-convert.js.map +1 -0
- package/dist/alphalib/types/robots/document-merge.d.ts +429 -0
- package/dist/alphalib/types/robots/document-merge.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-merge.js +86 -0
- package/dist/alphalib/types/robots/document-merge.js.map +1 -0
- package/dist/alphalib/types/robots/document-ocr.d.ts +441 -0
- package/dist/alphalib/types/robots/document-ocr.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-ocr.js +86 -0
- package/dist/alphalib/types/robots/document-ocr.js.map +1 -0
- package/dist/alphalib/types/robots/document-split.d.ts +417 -0
- package/dist/alphalib/types/robots/document-split.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-split.js +48 -0
- package/dist/alphalib/types/robots/document-split.js.map +1 -0
- package/dist/alphalib/types/robots/document-thumbs.d.ts +592 -0
- package/dist/alphalib/types/robots/document-thumbs.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-thumbs.js +196 -0
- package/dist/alphalib/types/robots/document-thumbs.js.map +1 -0
- package/dist/alphalib/types/robots/dropbox-import.d.ts +144 -0
- package/dist/alphalib/types/robots/dropbox-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/dropbox-import.js +65 -0
- package/dist/alphalib/types/robots/dropbox-import.js.map +1 -0
- package/dist/alphalib/types/robots/dropbox-store.d.ts +449 -0
- package/dist/alphalib/types/robots/dropbox-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/dropbox-store.js +68 -0
- package/dist/alphalib/types/robots/dropbox-store.js.map +1 -0
- package/dist/alphalib/types/robots/edgly-deliver.d.ts +100 -0
- package/dist/alphalib/types/robots/edgly-deliver.d.ts.map +1 -0
- package/dist/alphalib/types/robots/edgly-deliver.js +46 -0
- package/dist/alphalib/types/robots/edgly-deliver.js.map +1 -0
- package/dist/alphalib/types/robots/file-compress.d.ts +477 -0
- package/dist/alphalib/types/robots/file-compress.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-compress.js +139 -0
- package/dist/alphalib/types/robots/file-compress.js.map +1 -0
- package/dist/alphalib/types/robots/file-decompress.d.ts +404 -0
- package/dist/alphalib/types/robots/file-decompress.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-decompress.js +94 -0
- package/dist/alphalib/types/robots/file-decompress.js.map +1 -0
- package/dist/alphalib/types/robots/file-filter.d.ts +465 -0
- package/dist/alphalib/types/robots/file-filter.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-filter.js +136 -0
- package/dist/alphalib/types/robots/file-filter.js.map +1 -0
- package/dist/alphalib/types/robots/file-hash.d.ts +417 -0
- package/dist/alphalib/types/robots/file-hash.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-hash.js +59 -0
- package/dist/alphalib/types/robots/file-hash.js.map +1 -0
- package/dist/alphalib/types/robots/file-preview.d.ts +854 -0
- package/dist/alphalib/types/robots/file-preview.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-preview.js +221 -0
- package/dist/alphalib/types/robots/file-preview.js.map +1 -0
- package/dist/alphalib/types/robots/file-read.d.ts +405 -0
- package/dist/alphalib/types/robots/file-read.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-read.js +44 -0
- package/dist/alphalib/types/robots/file-read.js.map +1 -0
- package/dist/alphalib/types/robots/file-serve.d.ts +418 -0
- package/dist/alphalib/types/robots/file-serve.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-serve.js +99 -0
- package/dist/alphalib/types/robots/file-serve.js.map +1 -0
- package/dist/alphalib/types/robots/file-verify.d.ts +441 -0
- package/dist/alphalib/types/robots/file-verify.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-verify.js +73 -0
- package/dist/alphalib/types/robots/file-verify.js.map +1 -0
- package/dist/alphalib/types/robots/file-virusscan.d.ts +435 -0
- package/dist/alphalib/types/robots/file-virusscan.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-virusscan.js +82 -0
- package/dist/alphalib/types/robots/file-virusscan.js.map +1 -0
- package/dist/alphalib/types/robots/file-watermark.d.ts +417 -0
- package/dist/alphalib/types/robots/file-watermark.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-watermark.js +28 -0
- package/dist/alphalib/types/robots/file-watermark.js.map +1 -0
- package/dist/alphalib/types/robots/ftp-import.d.ts +198 -0
- package/dist/alphalib/types/robots/ftp-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/ftp-import.js +60 -0
- package/dist/alphalib/types/robots/ftp-import.js.map +1 -0
- package/dist/alphalib/types/robots/ftp-store.d.ts +532 -0
- package/dist/alphalib/types/robots/ftp-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/ftp-store.js +91 -0
- package/dist/alphalib/types/robots/ftp-store.js.map +1 -0
- package/dist/alphalib/types/robots/google-import.d.ts +174 -0
- package/dist/alphalib/types/robots/google-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/google-import.js +77 -0
- package/dist/alphalib/types/robots/google-import.js.map +1 -0
- package/dist/alphalib/types/robots/google-store.d.ts +476 -0
- package/dist/alphalib/types/robots/google-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/google-store.js +111 -0
- package/dist/alphalib/types/robots/google-store.js.map +1 -0
- package/dist/alphalib/types/robots/html-convert.d.ts +531 -0
- package/dist/alphalib/types/robots/html-convert.d.ts.map +1 -0
- package/dist/alphalib/types/robots/html-convert.js +137 -0
- package/dist/alphalib/types/robots/html-convert.js.map +1 -0
- package/dist/alphalib/types/robots/http-import.d.ts +215 -0
- package/dist/alphalib/types/robots/http-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/http-import.js +135 -0
- package/dist/alphalib/types/robots/http-import.js.map +1 -0
- package/dist/alphalib/types/robots/image-bgremove.d.ts +453 -0
- package/dist/alphalib/types/robots/image-bgremove.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-bgremove.js +65 -0
- package/dist/alphalib/types/robots/image-bgremove.js.map +1 -0
- package/dist/alphalib/types/robots/image-describe.d.ts +453 -0
- package/dist/alphalib/types/robots/image-describe.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-describe.js +86 -0
- package/dist/alphalib/types/robots/image-describe.js.map +1 -0
- package/dist/alphalib/types/robots/image-facedetect.d.ts +477 -0
- package/dist/alphalib/types/robots/image-facedetect.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-facedetect.js +151 -0
- package/dist/alphalib/types/robots/image-facedetect.js.map +1 -0
- package/dist/alphalib/types/robots/image-generate.d.ts +522 -0
- package/dist/alphalib/types/robots/image-generate.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-generate.js +64 -0
- package/dist/alphalib/types/robots/image-generate.js.map +1 -0
- package/dist/alphalib/types/robots/image-merge.d.ts +477 -0
- package/dist/alphalib/types/robots/image-merge.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-merge.js +92 -0
- package/dist/alphalib/types/robots/image-merge.js.map +1 -0
- package/dist/alphalib/types/robots/image-ocr.d.ts +441 -0
- package/dist/alphalib/types/robots/image-ocr.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-ocr.js +79 -0
- package/dist/alphalib/types/robots/image-ocr.js.map +1 -0
- package/dist/alphalib/types/robots/image-optimize.d.ts +453 -0
- package/dist/alphalib/types/robots/image-optimize.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-optimize.js +81 -0
- package/dist/alphalib/types/robots/image-optimize.js.map +1 -0
- package/dist/alphalib/types/robots/image-resize.d.ts +1758 -0
- package/dist/alphalib/types/robots/image-resize.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-resize.js +602 -0
- package/dist/alphalib/types/robots/image-resize.js.map +1 -0
- package/dist/alphalib/types/robots/meta-read.d.ts +98 -0
- package/dist/alphalib/types/robots/meta-read.d.ts.map +1 -0
- package/dist/alphalib/types/robots/meta-read.js +24 -0
- package/dist/alphalib/types/robots/meta-read.js.map +1 -0
- package/dist/alphalib/types/robots/meta-write.d.ts +2842 -0
- package/dist/alphalib/types/robots/meta-write.d.ts.map +1 -0
- package/dist/alphalib/types/robots/meta-write.js +66 -0
- package/dist/alphalib/types/robots/meta-write.js.map +1 -0
- package/dist/alphalib/types/robots/minio-import.d.ts +234 -0
- package/dist/alphalib/types/robots/minio-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/minio-import.js +81 -0
- package/dist/alphalib/types/robots/minio-import.js.map +1 -0
- package/dist/alphalib/types/robots/minio-store.d.ts +514 -0
- package/dist/alphalib/types/robots/minio-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/minio-store.js +87 -0
- package/dist/alphalib/types/robots/minio-store.js.map +1 -0
- package/dist/alphalib/types/robots/progress-simulate.d.ts +229 -0
- package/dist/alphalib/types/robots/progress-simulate.d.ts.map +1 -0
- package/dist/alphalib/types/robots/progress-simulate.js +25 -0
- package/dist/alphalib/types/robots/progress-simulate.js.map +1 -0
- package/dist/alphalib/types/robots/s3-import.d.ts +246 -0
- package/dist/alphalib/types/robots/s3-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/s3-import.js +137 -0
- package/dist/alphalib/types/robots/s3-import.js.map +1 -0
- package/dist/alphalib/types/robots/s3-store.d.ts +593 -0
- package/dist/alphalib/types/robots/s3-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/s3-store.js +169 -0
- package/dist/alphalib/types/robots/s3-store.js.map +1 -0
- package/dist/alphalib/types/robots/script-run.d.ts +423 -0
- package/dist/alphalib/types/robots/script-run.d.ts.map +1 -0
- package/dist/alphalib/types/robots/script-run.js +95 -0
- package/dist/alphalib/types/robots/script-run.js.map +1 -0
- package/dist/alphalib/types/robots/sftp-import.d.ts +192 -0
- package/dist/alphalib/types/robots/sftp-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/sftp-import.js +62 -0
- package/dist/alphalib/types/robots/sftp-import.js.map +1 -0
- package/dist/alphalib/types/robots/sftp-store.d.ts +520 -0
- package/dist/alphalib/types/robots/sftp-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/sftp-store.js +83 -0
- package/dist/alphalib/types/robots/sftp-store.js.map +1 -0
- package/dist/alphalib/types/robots/speech-transcribe.d.ts +465 -0
- package/dist/alphalib/types/robots/speech-transcribe.d.ts.map +1 -0
- package/dist/alphalib/types/robots/speech-transcribe.js +103 -0
- package/dist/alphalib/types/robots/speech-transcribe.js.map +1 -0
- package/dist/alphalib/types/robots/supabase-import.d.ts +246 -0
- package/dist/alphalib/types/robots/supabase-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/supabase-import.js +83 -0
- package/dist/alphalib/types/robots/supabase-import.js.map +1 -0
- package/dist/alphalib/types/robots/supabase-store.d.ts +514 -0
- package/dist/alphalib/types/robots/supabase-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/supabase-store.js +77 -0
- package/dist/alphalib/types/robots/supabase-store.js.map +1 -0
- package/dist/alphalib/types/robots/swift-import.d.ts +246 -0
- package/dist/alphalib/types/robots/swift-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/swift-import.js +81 -0
- package/dist/alphalib/types/robots/swift-import.js.map +1 -0
- package/dist/alphalib/types/robots/swift-store.d.ts +526 -0
- package/dist/alphalib/types/robots/swift-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/swift-store.js +84 -0
- package/dist/alphalib/types/robots/swift-store.js.map +1 -0
- package/dist/alphalib/types/robots/text-speak.d.ts +465 -0
- package/dist/alphalib/types/robots/text-speak.d.ts.map +1 -0
- package/dist/alphalib/types/robots/text-speak.js +119 -0
- package/dist/alphalib/types/robots/text-speak.js.map +1 -0
- package/dist/alphalib/types/robots/text-translate.d.ts +441 -0
- package/dist/alphalib/types/robots/text-translate.d.ts.map +1 -0
- package/dist/alphalib/types/robots/text-translate.js +211 -0
- package/dist/alphalib/types/robots/text-translate.js.map +1 -0
- package/dist/alphalib/types/robots/tigris-import.d.ts +244 -0
- package/dist/alphalib/types/robots/tigris-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/tigris-import.js +85 -0
- package/dist/alphalib/types/robots/tigris-import.js.map +1 -0
- package/dist/alphalib/types/robots/tigris-store.d.ts +524 -0
- package/dist/alphalib/types/robots/tigris-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/tigris-store.js +91 -0
- package/dist/alphalib/types/robots/tigris-store.js.map +1 -0
- package/dist/alphalib/types/robots/tlcdn-deliver.d.ts +100 -0
- package/dist/alphalib/types/robots/tlcdn-deliver.d.ts.map +1 -0
- package/dist/alphalib/types/robots/tlcdn-deliver.js +46 -0
- package/dist/alphalib/types/robots/tlcdn-deliver.js.map +1 -0
- package/dist/alphalib/types/robots/tus-store.d.ts +477 -0
- package/dist/alphalib/types/robots/tus-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/tus-store.js +102 -0
- package/dist/alphalib/types/robots/tus-store.js.map +1 -0
- package/dist/alphalib/types/robots/upload-handle.d.ts +100 -0
- package/dist/alphalib/types/robots/upload-handle.d.ts.map +1 -0
- package/dist/alphalib/types/robots/upload-handle.js +66 -0
- package/dist/alphalib/types/robots/upload-handle.js.map +1 -0
- package/dist/alphalib/types/robots/video-adaptive.d.ts +2915 -0
- package/dist/alphalib/types/robots/video-adaptive.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-adaptive.js +144 -0
- package/dist/alphalib/types/robots/video-adaptive.js.map +1 -0
- package/dist/alphalib/types/robots/video-concat.d.ts +2891 -0
- package/dist/alphalib/types/robots/video-concat.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-concat.js +96 -0
- package/dist/alphalib/types/robots/video-concat.js.map +1 -0
- package/dist/alphalib/types/robots/video-encode.d.ts +3280 -0
- package/dist/alphalib/types/robots/video-encode.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-encode.js +107 -0
- package/dist/alphalib/types/robots/video-encode.js.map +1 -0
- package/dist/alphalib/types/robots/video-merge.d.ts +2987 -0
- package/dist/alphalib/types/robots/video-merge.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-merge.js +102 -0
- package/dist/alphalib/types/robots/video-merge.js.map +1 -0
- package/dist/alphalib/types/robots/video-ondemand.d.ts +4553 -0
- package/dist/alphalib/types/robots/video-ondemand.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-ondemand.js +112 -0
- package/dist/alphalib/types/robots/video-ondemand.js.map +1 -0
- package/dist/alphalib/types/robots/video-subtitle.d.ts +2975 -0
- package/dist/alphalib/types/robots/video-subtitle.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-subtitle.js +122 -0
- package/dist/alphalib/types/robots/video-subtitle.js.map +1 -0
- package/dist/alphalib/types/robots/video-thumbs.d.ts +2938 -0
- package/dist/alphalib/types/robots/video-thumbs.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-thumbs.js +122 -0
- package/dist/alphalib/types/robots/video-thumbs.js.map +1 -0
- package/dist/alphalib/types/robots/vimeo-import.d.ts +189 -0
- package/dist/alphalib/types/robots/vimeo-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/vimeo-import.js +92 -0
- package/dist/alphalib/types/robots/vimeo-import.js.map +1 -0
- package/dist/alphalib/types/robots/vimeo-store.d.ts +520 -0
- package/dist/alphalib/types/robots/vimeo-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/vimeo-store.js +115 -0
- package/dist/alphalib/types/robots/vimeo-store.js.map +1 -0
- package/dist/alphalib/types/robots/wasabi-import.d.ts +244 -0
- package/dist/alphalib/types/robots/wasabi-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/wasabi-import.js +85 -0
- package/dist/alphalib/types/robots/wasabi-import.js.map +1 -0
- package/dist/alphalib/types/robots/wasabi-store.d.ts +526 -0
- package/dist/alphalib/types/robots/wasabi-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/wasabi-store.js +85 -0
- package/dist/alphalib/types/robots/wasabi-store.js.map +1 -0
- package/dist/alphalib/types/robots/youtube-store.d.ts +477 -0
- package/dist/alphalib/types/robots/youtube-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/youtube-store.js +122 -0
- package/dist/alphalib/types/robots/youtube-store.js.map +1 -0
- package/dist/alphalib/types/stackVersions.d.ts +13 -0
- package/dist/alphalib/types/stackVersions.d.ts.map +1 -0
- package/dist/alphalib/types/stackVersions.js +13 -0
- package/dist/alphalib/types/stackVersions.js.map +1 -0
- package/dist/alphalib/types/template.d.ts +131710 -0
- package/dist/alphalib/types/template.d.ts.map +1 -0
- package/dist/alphalib/types/template.js +218 -0
- package/dist/alphalib/types/template.js.map +1 -0
- package/dist/alphalib/types/templateCredential.d.ts +95 -0
- package/dist/alphalib/types/templateCredential.d.ts.map +1 -0
- package/dist/alphalib/types/templateCredential.js +57 -0
- package/dist/alphalib/types/templateCredential.js.map +1 -0
- package/dist/alphalib/zodParseWithContext.d.ts +17 -0
- package/dist/alphalib/zodParseWithContext.d.ts.map +1 -0
- package/dist/alphalib/zodParseWithContext.js +248 -0
- package/dist/alphalib/zodParseWithContext.js.map +1 -0
- package/dist/apiTypes.d.ts +112 -0
- package/dist/apiTypes.d.ts.map +1 -0
- package/dist/apiTypes.js +3 -0
- package/dist/apiTypes.js.map +1 -0
- package/dist/cli/OutputCtl.d.ts +47 -0
- package/dist/cli/OutputCtl.d.ts.map +1 -0
- package/dist/cli/OutputCtl.js +85 -0
- package/dist/cli/OutputCtl.js.map +1 -0
- package/dist/cli/commands/BaseCommand.d.ts +24 -0
- package/dist/cli/commands/BaseCommand.d.ts.map +1 -0
- package/dist/cli/commands/BaseCommand.js +52 -0
- package/dist/cli/commands/BaseCommand.js.map +1 -0
- package/dist/cli/commands/assemblies.d.ts +93 -0
- package/dist/cli/commands/assemblies.d.ts.map +1 -0
- package/dist/cli/commands/assemblies.js +1021 -0
- package/dist/cli/commands/assemblies.js.map +1 -0
- package/dist/cli/commands/auth.d.ts +28 -0
- package/dist/cli/commands/auth.d.ts.map +1 -0
- package/dist/cli/commands/auth.js +280 -0
- package/dist/cli/commands/auth.js.map +1 -0
- package/dist/cli/commands/bills.d.ts +14 -0
- package/dist/cli/commands/bills.d.ts.map +1 -0
- package/dist/cli/commands/bills.js +69 -0
- package/dist/cli/commands/bills.js.map +1 -0
- package/dist/cli/commands/index.d.ts +3 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +39 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/notifications.d.ts +9 -0
- package/dist/cli/commands/notifications.d.ts.map +1 -0
- package/dist/cli/commands/notifications.js +44 -0
- package/dist/cli/commands/notifications.js.map +1 -0
- package/dist/cli/commands/templates.d.ts +73 -0
- package/dist/cli/commands/templates.d.ts.map +1 -0
- package/dist/cli/commands/templates.js +428 -0
- package/dist/cli/commands/templates.js.map +1 -0
- package/dist/cli/helpers.d.ts +13 -0
- package/dist/cli/helpers.d.ts.map +1 -0
- package/dist/cli/helpers.js +39 -0
- package/dist/cli/helpers.js.map +1 -0
- package/dist/cli/template-last-modified.d.ts +10 -0
- package/dist/cli/template-last-modified.d.ts.map +1 -0
- package/dist/cli/template-last-modified.js +134 -0
- package/dist/cli/template-last-modified.js.map +1 -0
- package/dist/cli/types.d.ts +78 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +49 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +41 -0
- package/dist/cli.js.map +1 -0
- package/dist/tus.d.ts +18 -0
- package/dist/tus.d.ts.map +1 -0
- package/dist/tus.js +122 -0
- package/dist/tus.js.map +1 -0
- package/package.json +92 -0
- package/src/ApiError.ts +49 -0
- package/src/InconsistentResponseError.ts +3 -0
- package/src/PaginationStream.ts +54 -0
- package/src/PollingTimeoutError.ts +5 -0
- package/src/Transloadit.ts +980 -0
- package/src/alphalib/lib/nativeGlobby.ts +244 -0
- package/src/alphalib/mcache.ts +184 -0
- package/src/alphalib/tryCatch.ts +30 -0
- package/src/alphalib/types/assembliesGet.ts +42 -0
- package/src/alphalib/types/assemblyReplay.ts +24 -0
- package/src/alphalib/types/assemblyReplayNotification.ts +16 -0
- package/src/alphalib/types/assemblyStatus.ts +794 -0
- package/src/alphalib/types/bill.ts +9 -0
- package/src/alphalib/types/robots/_index.ts +1201 -0
- package/src/alphalib/types/robots/_instructions-primitives.ts +1770 -0
- package/src/alphalib/types/robots/ai-chat.ts +278 -0
- package/src/alphalib/types/robots/assembly-savejson.ts +37 -0
- package/src/alphalib/types/robots/audio-artwork.ts +107 -0
- package/src/alphalib/types/robots/audio-concat.ts +142 -0
- package/src/alphalib/types/robots/audio-encode.ts +103 -0
- package/src/alphalib/types/robots/audio-loop.ts +102 -0
- package/src/alphalib/types/robots/audio-merge.ts +137 -0
- package/src/alphalib/types/robots/audio-waveform.ts +280 -0
- package/src/alphalib/types/robots/azure-import.ts +111 -0
- package/src/alphalib/types/robots/azure-store.ts +143 -0
- package/src/alphalib/types/robots/backblaze-import.ts +119 -0
- package/src/alphalib/types/robots/backblaze-store.ts +104 -0
- package/src/alphalib/types/robots/cloudfiles-import.ts +118 -0
- package/src/alphalib/types/robots/cloudfiles-store.ts +104 -0
- package/src/alphalib/types/robots/cloudflare-import.ts +121 -0
- package/src/alphalib/types/robots/cloudflare-store.ts +120 -0
- package/src/alphalib/types/robots/digitalocean-import.ts +118 -0
- package/src/alphalib/types/robots/digitalocean-store.ts +125 -0
- package/src/alphalib/types/robots/document-autorotate.ts +74 -0
- package/src/alphalib/types/robots/document-convert.ts +302 -0
- package/src/alphalib/types/robots/document-merge.ts +114 -0
- package/src/alphalib/types/robots/document-ocr.ts +120 -0
- package/src/alphalib/types/robots/document-split.ts +78 -0
- package/src/alphalib/types/robots/document-thumbs.ts +231 -0
- package/src/alphalib/types/robots/dropbox-import.ts +100 -0
- package/src/alphalib/types/robots/dropbox-store.ts +97 -0
- package/src/alphalib/types/robots/edgly-deliver.ts +73 -0
- package/src/alphalib/types/robots/file-compress.ts +167 -0
- package/src/alphalib/types/robots/file-decompress.ts +125 -0
- package/src/alphalib/types/robots/file-filter.ts +173 -0
- package/src/alphalib/types/robots/file-hash.ts +86 -0
- package/src/alphalib/types/robots/file-preview.ts +260 -0
- package/src/alphalib/types/robots/file-read.ts +71 -0
- package/src/alphalib/types/robots/file-serve.ts +128 -0
- package/src/alphalib/types/robots/file-verify.ts +102 -0
- package/src/alphalib/types/robots/file-virusscan.ts +113 -0
- package/src/alphalib/types/robots/file-watermark.ts +56 -0
- package/src/alphalib/types/robots/ftp-import.ts +95 -0
- package/src/alphalib/types/robots/ftp-store.ts +119 -0
- package/src/alphalib/types/robots/google-import.ts +115 -0
- package/src/alphalib/types/robots/google-store.ts +139 -0
- package/src/alphalib/types/robots/html-convert.ts +165 -0
- package/src/alphalib/types/robots/http-import.ts +168 -0
- package/src/alphalib/types/robots/image-bgremove.ts +95 -0
- package/src/alphalib/types/robots/image-describe.ts +121 -0
- package/src/alphalib/types/robots/image-facedetect.ts +187 -0
- package/src/alphalib/types/robots/image-generate.ts +92 -0
- package/src/alphalib/types/robots/image-merge.ts +127 -0
- package/src/alphalib/types/robots/image-ocr.ts +112 -0
- package/src/alphalib/types/robots/image-optimize.ts +114 -0
- package/src/alphalib/types/robots/image-resize.ts +653 -0
- package/src/alphalib/types/robots/meta-read.ts +44 -0
- package/src/alphalib/types/robots/meta-write.ts +93 -0
- package/src/alphalib/types/robots/minio-import.ts +120 -0
- package/src/alphalib/types/robots/minio-store.ts +115 -0
- package/src/alphalib/types/robots/progress-simulate.ts +40 -0
- package/src/alphalib/types/robots/s3-import.ts +175 -0
- package/src/alphalib/types/robots/s3-store.ts +198 -0
- package/src/alphalib/types/robots/script-run.ts +122 -0
- package/src/alphalib/types/robots/sftp-import.ts +92 -0
- package/src/alphalib/types/robots/sftp-store.ts +110 -0
- package/src/alphalib/types/robots/speech-transcribe.ts +139 -0
- package/src/alphalib/types/robots/supabase-import.ts +122 -0
- package/src/alphalib/types/robots/supabase-store.ts +105 -0
- package/src/alphalib/types/robots/swift-import.ts +120 -0
- package/src/alphalib/types/robots/swift-store.ts +112 -0
- package/src/alphalib/types/robots/text-speak.ts +152 -0
- package/src/alphalib/types/robots/text-translate.ts +245 -0
- package/src/alphalib/types/robots/tigris-import.ts +124 -0
- package/src/alphalib/types/robots/tigris-store.ts +119 -0
- package/src/alphalib/types/robots/tlcdn-deliver.ts +73 -0
- package/src/alphalib/types/robots/tus-store.ts +129 -0
- package/src/alphalib/types/robots/upload-handle.ts +95 -0
- package/src/alphalib/types/robots/video-adaptive.ts +179 -0
- package/src/alphalib/types/robots/video-concat.ts +130 -0
- package/src/alphalib/types/robots/video-encode.ts +141 -0
- package/src/alphalib/types/robots/video-merge.ts +138 -0
- package/src/alphalib/types/robots/video-ondemand.ts +161 -0
- package/src/alphalib/types/robots/video-subtitle.ts +159 -0
- package/src/alphalib/types/robots/video-thumbs.ts +158 -0
- package/src/alphalib/types/robots/vimeo-import.ts +126 -0
- package/src/alphalib/types/robots/vimeo-store.ts +143 -0
- package/src/alphalib/types/robots/wasabi-import.ts +124 -0
- package/src/alphalib/types/robots/wasabi-store.ts +113 -0
- package/src/alphalib/types/robots/youtube-store.ts +153 -0
- package/src/alphalib/types/stackVersions.ts +12 -0
- package/src/alphalib/types/template.ts +277 -0
- package/src/alphalib/types/templateCredential.ts +61 -0
- package/src/alphalib/zodParseWithContext.ts +306 -0
- package/src/apiTypes.ts +154 -0
- package/src/cli/OutputCtl.ts +115 -0
- package/src/cli/commands/BaseCommand.ts +71 -0
- package/src/cli/commands/assemblies.ts +1373 -0
- package/src/cli/commands/auth.ts +354 -0
- package/src/cli/commands/bills.ts +91 -0
- package/src/cli/commands/index.ts +65 -0
- package/src/cli/commands/notifications.ts +63 -0
- package/src/cli/commands/templates.ts +556 -0
- package/src/cli/helpers.ts +50 -0
- package/src/cli/template-last-modified.ts +156 -0
- package/src/cli/types.ts +70 -0
- package/src/cli.ts +44 -0
- package/src/tus.ts +168 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
import type { RobotMetaInput } from './_instructions-primitives.ts'
|
|
4
|
+
import { interpolateRobot, robotBase } from './_instructions-primitives.ts'
|
|
5
|
+
|
|
6
|
+
export const meta: RobotMetaInput = {
|
|
7
|
+
allowed_for_url_transform: false,
|
|
8
|
+
bytescount: 10,
|
|
9
|
+
discount_factor: 0.1,
|
|
10
|
+
discount_pct: 90,
|
|
11
|
+
example_code: {
|
|
12
|
+
steps: {
|
|
13
|
+
':original': {
|
|
14
|
+
robot: '/upload/handle',
|
|
15
|
+
},
|
|
16
|
+
exported: {
|
|
17
|
+
robot: '/s3/store',
|
|
18
|
+
use: ':original',
|
|
19
|
+
credentials: 'YOUR_S3_CREDENTIALS',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
example_code_description: 'Handle uploads and export the uploaded files to S3:',
|
|
24
|
+
minimum_charge: 0,
|
|
25
|
+
output_factor: 1,
|
|
26
|
+
override_lvl1: 'Handling Uploads',
|
|
27
|
+
purpose_sentence:
|
|
28
|
+
'receives uploads that your users throw at you from browser or apps, or that you throw at us programmatically',
|
|
29
|
+
purpose_verb: 'handle',
|
|
30
|
+
purpose_word: 'handle uploads',
|
|
31
|
+
purpose_words: 'Handle uploads',
|
|
32
|
+
service_slug: 'handling-uploads',
|
|
33
|
+
slot_count: 0,
|
|
34
|
+
title: 'Handle uploads',
|
|
35
|
+
typical_file_size_mb: 1.2,
|
|
36
|
+
typical_file_type: 'file',
|
|
37
|
+
name: 'UploadHandleRobot',
|
|
38
|
+
priceFactor: 10,
|
|
39
|
+
queueSlotCount: 0,
|
|
40
|
+
downloadInputFiles: false,
|
|
41
|
+
preserveInputFileUrls: true,
|
|
42
|
+
isAllowedForUrlTransform: false,
|
|
43
|
+
trackOutputFileSize: false,
|
|
44
|
+
isInternal: false,
|
|
45
|
+
removeJobResultFilesFromDiskRightAfterStoringOnS3: false,
|
|
46
|
+
stage: 'ga',
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const robotUploadHandleInstructionsSchema = robotBase
|
|
50
|
+
.extend({
|
|
51
|
+
robot: z.literal('/upload/handle').describe(`
|
|
52
|
+
Transloadit handles file uploads by default, so specifying this <dfn>Robot</dfn> is optional.
|
|
53
|
+
|
|
54
|
+
It can still be a good idea to define this <dfn>Robot</dfn>, though. It makes your <dfn>Assembly Instructions</dfn> explicit, and allows you to configure exactly how uploads should be handled. For example, you can extract specific metadata from the uploaded files.
|
|
55
|
+
|
|
56
|
+
There are **3 important constraints** when using this <dfn>Robot</dfn>:
|
|
57
|
+
|
|
58
|
+
1. Don’t define a \`use\` parameter, unlike with other <dfn>Robots</dfn>.
|
|
59
|
+
2. Use it only once in a single set of <dfn>Assembly Instructions</dfn>.
|
|
60
|
+
3. Name the Step as \`:original\`.
|
|
61
|
+
`),
|
|
62
|
+
})
|
|
63
|
+
.strict()
|
|
64
|
+
|
|
65
|
+
export const robotUploadHandleInstructionsWithHiddenFieldsSchema =
|
|
66
|
+
robotUploadHandleInstructionsSchema.extend({
|
|
67
|
+
result: z
|
|
68
|
+
.union([z.literal('debug'), robotUploadHandleInstructionsSchema.shape.result])
|
|
69
|
+
.optional(),
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
export type RobotUploadHandleInstructions = z.infer<typeof robotUploadHandleInstructionsSchema>
|
|
73
|
+
export type RobotUploadHandleInstructionsWithHiddenFields = z.infer<
|
|
74
|
+
typeof robotUploadHandleInstructionsWithHiddenFieldsSchema
|
|
75
|
+
>
|
|
76
|
+
|
|
77
|
+
export const interpolatableRobotUploadHandleInstructionsSchema = interpolateRobot(
|
|
78
|
+
robotUploadHandleInstructionsSchema,
|
|
79
|
+
)
|
|
80
|
+
export type InterpolatableRobotUploadHandleInstructions =
|
|
81
|
+
InterpolatableRobotUploadHandleInstructionsInput
|
|
82
|
+
|
|
83
|
+
export type InterpolatableRobotUploadHandleInstructionsInput = z.input<
|
|
84
|
+
typeof interpolatableRobotUploadHandleInstructionsSchema
|
|
85
|
+
>
|
|
86
|
+
|
|
87
|
+
export const interpolatableRobotUploadHandleInstructionsWithHiddenFieldsSchema = interpolateRobot(
|
|
88
|
+
robotUploadHandleInstructionsWithHiddenFieldsSchema,
|
|
89
|
+
)
|
|
90
|
+
export type InterpolatableRobotUploadHandleInstructionsWithHiddenFields = z.infer<
|
|
91
|
+
typeof interpolatableRobotUploadHandleInstructionsWithHiddenFieldsSchema
|
|
92
|
+
>
|
|
93
|
+
export type InterpolatableRobotUploadHandleInstructionsWithHiddenFieldsInput = z.input<
|
|
94
|
+
typeof interpolatableRobotUploadHandleInstructionsWithHiddenFieldsSchema
|
|
95
|
+
>
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
import { stackVersions } from '../stackVersions.ts'
|
|
4
|
+
import type { RobotMetaInput } from './_instructions-primitives.ts'
|
|
5
|
+
import {
|
|
6
|
+
interpolateRobot,
|
|
7
|
+
robotBase,
|
|
8
|
+
robotFFmpegVideo,
|
|
9
|
+
robotUse,
|
|
10
|
+
} from './_instructions-primitives.ts'
|
|
11
|
+
|
|
12
|
+
export const meta: RobotMetaInput = {
|
|
13
|
+
allowed_for_url_transform: false,
|
|
14
|
+
bytescount: Number.POSITIVE_INFINITY,
|
|
15
|
+
discount_factor: 1,
|
|
16
|
+
discount_pct: 0,
|
|
17
|
+
example_code: {
|
|
18
|
+
steps: {
|
|
19
|
+
':original': {
|
|
20
|
+
robot: '/upload/handle',
|
|
21
|
+
},
|
|
22
|
+
encoded_480p: {
|
|
23
|
+
robot: '/video/encode',
|
|
24
|
+
use: ':original',
|
|
25
|
+
preset: 'hls/480p',
|
|
26
|
+
ffmpeg_stack: stackVersions.ffmpeg.recommendedVersion,
|
|
27
|
+
},
|
|
28
|
+
encoded_720p: {
|
|
29
|
+
robot: '/video/encode',
|
|
30
|
+
use: ':original',
|
|
31
|
+
preset: 'hls/720p',
|
|
32
|
+
ffmpeg_stack: stackVersions.ffmpeg.recommendedVersion,
|
|
33
|
+
},
|
|
34
|
+
encoded_1080p: {
|
|
35
|
+
robot: '/video/encode',
|
|
36
|
+
use: ':original',
|
|
37
|
+
preset: 'hls/1080p',
|
|
38
|
+
ffmpeg_stack: stackVersions.ffmpeg.recommendedVersion,
|
|
39
|
+
},
|
|
40
|
+
hls_bundled: {
|
|
41
|
+
robot: '/video/adaptive',
|
|
42
|
+
use: {
|
|
43
|
+
steps: ['encoded_480p', 'encoded_720p', 'encoded_1080p'],
|
|
44
|
+
bundle_steps: true,
|
|
45
|
+
},
|
|
46
|
+
technique: 'hls',
|
|
47
|
+
playlist_name: 'my_playlist.m3u8',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
example_code_description:
|
|
52
|
+
'Implementing HTTP Live Streaming: encode the uploaded video into three versions, then cut them into several segments and generate playlist files containing all the segments:',
|
|
53
|
+
minimum_charge: 0,
|
|
54
|
+
output_factor: 1.2,
|
|
55
|
+
override_lvl1: 'Video Encoding',
|
|
56
|
+
purpose_sentence:
|
|
57
|
+
'encodes videos into HTTP Live Streaming (HLS) and MPEG-Dash supported formats and generates the necessary manifest and playlist files',
|
|
58
|
+
purpose_verb: 'convert',
|
|
59
|
+
purpose_word: 'make adaptive',
|
|
60
|
+
purpose_words: 'Convert videos to HLS and MPEG-Dash',
|
|
61
|
+
service_slug: 'video-encoding',
|
|
62
|
+
slot_count: 60,
|
|
63
|
+
title: 'Convert videos to HLS and MPEG-Dash',
|
|
64
|
+
typical_file_size_mb: 80,
|
|
65
|
+
typical_file_type: 'video',
|
|
66
|
+
name: 'VideoAdaptiveRobot',
|
|
67
|
+
priceFactor: 1,
|
|
68
|
+
queueSlotCount: 60,
|
|
69
|
+
isAllowedForUrlTransform: false,
|
|
70
|
+
trackOutputFileSize: true,
|
|
71
|
+
isInternal: false,
|
|
72
|
+
removeJobResultFilesFromDiskRightAfterStoringOnS3: false,
|
|
73
|
+
stage: 'ga',
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const robotVideoAdaptiveInstructionsSchema = robotBase
|
|
77
|
+
.merge(robotUse)
|
|
78
|
+
.merge(robotFFmpegVideo)
|
|
79
|
+
.extend({
|
|
80
|
+
robot: z.literal('/video/adaptive').describe(`
|
|
81
|
+
This <dfn>Robot</dfn> accepts all types of video files and audio files. Do not forget to use <dfn>Step</dfn> bundling in your \`use\` parameter to make the <dfn>Robot</dfn> work on several input files at once.
|
|
82
|
+
|
|
83
|
+
This <dfn>Robot</dfn> is normally used in combination with [🤖/video/encode](/docs/robots/video-encode/). We have implemented video and audio encoding presets specifically for MPEG-Dash and HTTP Live Streaming support. These presets are prefixed with \`"dash/"\` and \`"hls/"\`. [View a HTTP Live Streaming demo here](/demos/video-encoding/implement-http-live-streaming/).
|
|
84
|
+
|
|
85
|
+
### Required CORS settings for MPEG-Dash and HTTP Live Streaming
|
|
86
|
+
|
|
87
|
+
Playing back MPEG-Dash Manifest or HLS playlist files requires a proper CORS setup on the server-side. The file-serving server should be configured to add the following header fields to responses:
|
|
88
|
+
|
|
89
|
+
\`\`\`
|
|
90
|
+
Access-Control-Allow-Origin: *
|
|
91
|
+
Access-Control-Allow-Methods: GET
|
|
92
|
+
Access-Control-Allow-Headers: *
|
|
93
|
+
\`\`\`
|
|
94
|
+
|
|
95
|
+
If the files are stored in an Amazon S3 Bucket, you can use the following [CORS definition](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManageCorsUsing.html) to ensure the CORS header fields are set correctly:
|
|
96
|
+
|
|
97
|
+
\`\`\`json
|
|
98
|
+
[
|
|
99
|
+
{
|
|
100
|
+
"AllowedHeaders": ["*"],
|
|
101
|
+
"AllowedMethods": ["GET"],
|
|
102
|
+
"AllowedOrigins": ["*"],
|
|
103
|
+
"ExposeHeaders": []
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
\`\`\`
|
|
107
|
+
|
|
108
|
+
To set up CORS for your S3 bucket:
|
|
109
|
+
|
|
110
|
+
1. Visit <https://s3.console.aws.amazon.com/s3/buckets/>
|
|
111
|
+
1. Click on your bucket
|
|
112
|
+
1. Click "Permissions"
|
|
113
|
+
1. Edit "Cross-origin resource sharing (CORS)"
|
|
114
|
+
|
|
115
|
+
### Storing Segments and Playlist files
|
|
116
|
+
|
|
117
|
+
The <dfn>Robot</dfn> gives its result files (segments, initialization segments, MPD manifest files and M3U8 playlist files) the right metadata property \`relative_path\`, so that you can store them easily using one of our storage <dfn>Robots</dfn>.
|
|
118
|
+
|
|
119
|
+
In the \`path\` parameter of the storage <dfn>Robot</dfn> of your choice, use the <dfn>Assembly Variable</dfn> \`\${file.meta.relative_path}\` to store files in the proper paths to make the playlist files work.
|
|
120
|
+
`),
|
|
121
|
+
technique: z
|
|
122
|
+
.enum(['dash', 'hls'])
|
|
123
|
+
.default('dash')
|
|
124
|
+
.describe(`
|
|
125
|
+
Determines which streaming technique should be used. Currently supports \`"dash"\` for MPEG-Dash and \`"hls"\` for HTTP Live Streaming.
|
|
126
|
+
`),
|
|
127
|
+
playlist_name: z
|
|
128
|
+
.string()
|
|
129
|
+
.optional()
|
|
130
|
+
.describe(`
|
|
131
|
+
The filename for the generated manifest/playlist file. The default is \`"playlist.mpd"\` if your \`technique\` is \`"dash"\`, and \`"playlist.m3u8"\` if your \`technique\` is \`"hls"\`.
|
|
132
|
+
`),
|
|
133
|
+
segment_duration: z
|
|
134
|
+
.number()
|
|
135
|
+
.int()
|
|
136
|
+
.default(10)
|
|
137
|
+
.describe(`
|
|
138
|
+
The duration for each segment in seconds.
|
|
139
|
+
`),
|
|
140
|
+
closed_captions: z
|
|
141
|
+
.boolean()
|
|
142
|
+
.default(true)
|
|
143
|
+
.describe(`
|
|
144
|
+
Determines whether you want closed caption support when using the \`"hls"\` technique.
|
|
145
|
+
`),
|
|
146
|
+
})
|
|
147
|
+
.strict()
|
|
148
|
+
|
|
149
|
+
export const robotVideoAdaptiveInstructionsWithHiddenFieldsSchema =
|
|
150
|
+
robotVideoAdaptiveInstructionsSchema.extend({
|
|
151
|
+
result: z
|
|
152
|
+
.union([z.literal('debug'), robotVideoAdaptiveInstructionsSchema.shape.result])
|
|
153
|
+
.optional(),
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
export type RobotVideoAdaptiveInstructions = z.infer<typeof robotVideoAdaptiveInstructionsSchema>
|
|
157
|
+
export type RobotVideoAdaptiveInstructionsWithHiddenFields = z.infer<
|
|
158
|
+
typeof robotVideoAdaptiveInstructionsWithHiddenFieldsSchema
|
|
159
|
+
>
|
|
160
|
+
|
|
161
|
+
export const interpolatableRobotVideoAdaptiveInstructionsSchema = interpolateRobot(
|
|
162
|
+
robotVideoAdaptiveInstructionsSchema,
|
|
163
|
+
)
|
|
164
|
+
export type InterpolatableRobotVideoAdaptiveInstructions =
|
|
165
|
+
InterpolatableRobotVideoAdaptiveInstructionsInput
|
|
166
|
+
|
|
167
|
+
export type InterpolatableRobotVideoAdaptiveInstructionsInput = z.input<
|
|
168
|
+
typeof interpolatableRobotVideoAdaptiveInstructionsSchema
|
|
169
|
+
>
|
|
170
|
+
|
|
171
|
+
export const interpolatableRobotVideoAdaptiveInstructionsWithHiddenFieldsSchema = interpolateRobot(
|
|
172
|
+
robotVideoAdaptiveInstructionsWithHiddenFieldsSchema,
|
|
173
|
+
)
|
|
174
|
+
export type InterpolatableRobotVideoAdaptiveInstructionsWithHiddenFields = z.infer<
|
|
175
|
+
typeof interpolatableRobotVideoAdaptiveInstructionsWithHiddenFieldsSchema
|
|
176
|
+
>
|
|
177
|
+
export type InterpolatableRobotVideoAdaptiveInstructionsWithHiddenFieldsInput = z.input<
|
|
178
|
+
typeof interpolatableRobotVideoAdaptiveInstructionsWithHiddenFieldsSchema
|
|
179
|
+
>
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
import type { RobotMetaInput } from './_instructions-primitives.ts'
|
|
4
|
+
import {
|
|
5
|
+
interpolateRobot,
|
|
6
|
+
robotBase,
|
|
7
|
+
robotFFmpegVideo,
|
|
8
|
+
robotUse,
|
|
9
|
+
} from './_instructions-primitives.ts'
|
|
10
|
+
|
|
11
|
+
export const meta: RobotMetaInput = {
|
|
12
|
+
allowed_for_url_transform: false,
|
|
13
|
+
bytescount: 4,
|
|
14
|
+
discount_factor: 0.25,
|
|
15
|
+
discount_pct: 75,
|
|
16
|
+
example_code: {
|
|
17
|
+
steps: {
|
|
18
|
+
concatenated: {
|
|
19
|
+
robot: '/video/concat',
|
|
20
|
+
use: {
|
|
21
|
+
steps: [
|
|
22
|
+
{
|
|
23
|
+
name: ':original',
|
|
24
|
+
fields: 'first_video_file',
|
|
25
|
+
as: 'video_1',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: ':original',
|
|
29
|
+
fields: 'second_video_file',
|
|
30
|
+
as: 'video_2',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: ':original',
|
|
34
|
+
fields: 'third_video_file',
|
|
35
|
+
as: 'video_3',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
example_code_description:
|
|
43
|
+
'If you have a form with 3 file input fields and want to concatenate the uploaded videos in a specific order, instruct Transloadit using the `name` attribute of each input field. Use this attribute as the value for the `fields` key in the JSON, and set `as` to `video_[[index]]`. Transloadit will concatenate the files based on the ascending index order:',
|
|
44
|
+
minimum_charge: 0,
|
|
45
|
+
output_factor: 0.6,
|
|
46
|
+
override_lvl1: 'Video Encoding',
|
|
47
|
+
purpose_sentence: 'concatenates several videos together',
|
|
48
|
+
purpose_verb: 'concatenate',
|
|
49
|
+
purpose_word: 'concatenate',
|
|
50
|
+
purpose_words: 'Concatenate videos',
|
|
51
|
+
service_slug: 'video-encoding',
|
|
52
|
+
slot_count: 60,
|
|
53
|
+
title: 'Concatenate videos',
|
|
54
|
+
typical_file_size_mb: 80,
|
|
55
|
+
typical_file_type: 'video',
|
|
56
|
+
uses_tools: ['ffmpeg'],
|
|
57
|
+
name: 'VideoConcatRobot',
|
|
58
|
+
priceFactor: 4,
|
|
59
|
+
queueSlotCount: 60,
|
|
60
|
+
isAllowedForUrlTransform: false,
|
|
61
|
+
trackOutputFileSize: true,
|
|
62
|
+
isInternal: false,
|
|
63
|
+
removeJobResultFilesFromDiskRightAfterStoringOnS3: false,
|
|
64
|
+
stage: 'ga',
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const robotVideoConcatInstructionsSchema = robotBase
|
|
68
|
+
.merge(robotUse)
|
|
69
|
+
.merge(robotFFmpegVideo)
|
|
70
|
+
.extend({
|
|
71
|
+
robot: z.literal('/video/concat').describe(`
|
|
72
|
+
> [!Note]
|
|
73
|
+
> Input videos may have differing dimensions and streams - the Robot can handle this fine. It will pre-transcode the input videos if necessary before concatenation at no additional cost.
|
|
74
|
+
|
|
75
|
+
Itʼs possible to concatenate a virtually infinite number of video files using [🤖/video/concat](/docs/robots/video-concat/).
|
|
76
|
+
`),
|
|
77
|
+
video_fade_seconds: z
|
|
78
|
+
.number()
|
|
79
|
+
.default(1)
|
|
80
|
+
.describe(`
|
|
81
|
+
When used this adds a video fade in and out effect between each section of your concatenated video. The float value is used so if you want a video delay effect of 500 milliseconds between each video section you would select \`0.5\`, however, integer values can also be represented.
|
|
82
|
+
|
|
83
|
+
This parameter does not add a video fade effect at the beginning or end of your video. If you want to do so, create an additional [🤖/video/encode](/docs/robots/video-encode/) Step and use our \`ffmpeg\` parameter as shown in this [demo](/demos/video-encoding/concatenate-fade-effect/).
|
|
84
|
+
|
|
85
|
+
Please note this parameter is independent of adding audio fades between sections.
|
|
86
|
+
`),
|
|
87
|
+
audio_fade_seconds: z
|
|
88
|
+
.number()
|
|
89
|
+
.default(1)
|
|
90
|
+
.describe(`
|
|
91
|
+
When used this adds an audio fade in and out effect between each section of your concatenated video. The float value is used so if you want an audio delay effect of 500 milliseconds between each video section you would select \`0.5\`, however, integer values can also be represented.
|
|
92
|
+
|
|
93
|
+
This parameter does not add an audio fade effect at the beginning or end of your video. If you want to do so, create an additional [🤖/video/encode](/docs/robots/video-encode/] Step and use our \`ffmpeg\` parameter as shown in this [demo](/demos/audio-encoding/ffmpeg-fade-in-and-out/).
|
|
94
|
+
|
|
95
|
+
Please note this parameter is independent of adding video fades between sections.
|
|
96
|
+
`),
|
|
97
|
+
})
|
|
98
|
+
.strict()
|
|
99
|
+
|
|
100
|
+
export const robotVideoConcatInstructionsWithHiddenFieldsSchema =
|
|
101
|
+
robotVideoConcatInstructionsSchema.extend({
|
|
102
|
+
result: z
|
|
103
|
+
.union([z.literal('debug'), robotVideoConcatInstructionsSchema.shape.result])
|
|
104
|
+
.optional(),
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
export type RobotVideoConcatInstructions = z.infer<typeof robotVideoConcatInstructionsSchema>
|
|
108
|
+
export type RobotVideoConcatInstructionsWithHiddenFields = z.infer<
|
|
109
|
+
typeof robotVideoConcatInstructionsWithHiddenFieldsSchema
|
|
110
|
+
>
|
|
111
|
+
|
|
112
|
+
export const interpolatableRobotVideoConcatInstructionsSchema = interpolateRobot(
|
|
113
|
+
robotVideoConcatInstructionsSchema,
|
|
114
|
+
)
|
|
115
|
+
export type InterpolatableRobotVideoConcatInstructions =
|
|
116
|
+
InterpolatableRobotVideoConcatInstructionsInput
|
|
117
|
+
|
|
118
|
+
export type InterpolatableRobotVideoConcatInstructionsInput = z.input<
|
|
119
|
+
typeof interpolatableRobotVideoConcatInstructionsSchema
|
|
120
|
+
>
|
|
121
|
+
|
|
122
|
+
export const interpolatableRobotVideoConcatInstructionsWithHiddenFieldsSchema = interpolateRobot(
|
|
123
|
+
robotVideoConcatInstructionsWithHiddenFieldsSchema,
|
|
124
|
+
)
|
|
125
|
+
export type InterpolatableRobotVideoConcatInstructionsWithHiddenFields = z.infer<
|
|
126
|
+
typeof interpolatableRobotVideoConcatInstructionsWithHiddenFieldsSchema
|
|
127
|
+
>
|
|
128
|
+
export type InterpolatableRobotVideoConcatInstructionsWithHiddenFieldsInput = z.input<
|
|
129
|
+
typeof interpolatableRobotVideoConcatInstructionsWithHiddenFieldsSchema
|
|
130
|
+
>
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
import type { RobotMetaInput } from './_instructions-primitives.ts'
|
|
4
|
+
import {
|
|
5
|
+
interpolateRobot,
|
|
6
|
+
robotBase,
|
|
7
|
+
robotUse,
|
|
8
|
+
videoEncodeSpecificInstructionsSchema,
|
|
9
|
+
} from './_instructions-primitives.ts'
|
|
10
|
+
|
|
11
|
+
export const meta: RobotMetaInput = {
|
|
12
|
+
allowed_for_url_transform: false,
|
|
13
|
+
bytescount: 1,
|
|
14
|
+
discount_factor: 1,
|
|
15
|
+
discount_pct: 0,
|
|
16
|
+
example_code: {
|
|
17
|
+
steps: {
|
|
18
|
+
hevc_encoded: {
|
|
19
|
+
robot: '/video/encode',
|
|
20
|
+
use: ':original',
|
|
21
|
+
preset: 'hevc',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
example_code_description:
|
|
26
|
+
'Transcode uploaded video to [HEVC](https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding) (H.265):',
|
|
27
|
+
minimum_charge: 0,
|
|
28
|
+
output_factor: 0.6,
|
|
29
|
+
override_lvl1: 'Video Encoding',
|
|
30
|
+
purpose_sentence: 'encodes, resizes, applies watermarks to videos and animated GIFs',
|
|
31
|
+
purpose_verb: 'transcode',
|
|
32
|
+
purpose_word: 'transcode/resize/watermark',
|
|
33
|
+
purpose_words: 'Transcode, resize, or watermark videos',
|
|
34
|
+
service_slug: 'video-encoding',
|
|
35
|
+
slot_count: 60,
|
|
36
|
+
title: 'Transcode, resize, or watermark videos',
|
|
37
|
+
typical_file_size_mb: 80,
|
|
38
|
+
typical_file_type: 'video',
|
|
39
|
+
uses_tools: ['ffmpeg'],
|
|
40
|
+
name: 'VideoEncodeRobot',
|
|
41
|
+
priceFactor: 1,
|
|
42
|
+
queueSlotCount: 60,
|
|
43
|
+
isAllowedForUrlTransform: false,
|
|
44
|
+
trackOutputFileSize: true,
|
|
45
|
+
isInternal: false,
|
|
46
|
+
stage: 'ga',
|
|
47
|
+
removeJobResultFilesFromDiskRightAfterStoringOnS3: false,
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export const robotVideoEncodeInstructionsSchema = robotBase
|
|
51
|
+
.merge(robotUse)
|
|
52
|
+
.merge(videoEncodeSpecificInstructionsSchema)
|
|
53
|
+
.extend({
|
|
54
|
+
robot: z.literal('/video/encode').describe(`
|
|
55
|
+
The /video/encode Robot is a versatile tool for video processing that handles transcoding, resizing, and watermarking. It supports various formats including modern standards like HEVC (H.265), and provides features such as presets for common devices, custom FFmpeg parameters for powerusers, watermark positioning, and more.
|
|
56
|
+
|
|
57
|
+
## Adding text overlays with FFmpeg
|
|
58
|
+
|
|
59
|
+
You can add text overlays to videos using FFmpeg's \`drawtext\` filter through this <Definition term="Robot">Robot</Definition>'s \`ffmpeg\` parameter. Here are two examples — one with the default font and one with a custom font family name:
|
|
60
|
+
|
|
61
|
+
\`\`\`json
|
|
62
|
+
{
|
|
63
|
+
"steps": {
|
|
64
|
+
":original": {
|
|
65
|
+
"robot": "/upload/handle"
|
|
66
|
+
},
|
|
67
|
+
"text_overlay_default": {
|
|
68
|
+
"use": ":original",
|
|
69
|
+
"robot": "/video/encode",
|
|
70
|
+
"preset": "empty",
|
|
71
|
+
"ffmpeg_stack": "{{stacks.ffmpeg.recommended_version}}",
|
|
72
|
+
"ffmpeg": {
|
|
73
|
+
"codec:a": "copy",
|
|
74
|
+
"vf": "drawtext=text='My text overlay':fontcolor=white:fontsize=24:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/2"
|
|
75
|
+
},
|
|
76
|
+
"result": true
|
|
77
|
+
},
|
|
78
|
+
"text_overlay_custom": {
|
|
79
|
+
"use": ":original",
|
|
80
|
+
"robot": "/video/encode",
|
|
81
|
+
"preset": "empty",
|
|
82
|
+
"ffmpeg_stack": "{{stacks.ffmpeg.recommended_version}}",
|
|
83
|
+
"ffmpeg": {
|
|
84
|
+
"codec:a": "copy",
|
|
85
|
+
"vf": "drawtext=font='Times New Roman':text='My text overlay':fontcolor=white:fontsize=24:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/2"
|
|
86
|
+
},
|
|
87
|
+
"result": true
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
\`\`\`
|
|
92
|
+
|
|
93
|
+
**Notes:**
|
|
94
|
+
|
|
95
|
+
- Use the \`font\` attribute to reference a font by family name with FFmpeg's \`drawtext\`
|
|
96
|
+
- FFmpeg font family names typically do not contain dashes (e.g. \`Times New Roman\`), while
|
|
97
|
+
ImageMagick uses dashed names (e.g. \`Times-New-Roman\`).
|
|
98
|
+
- Preserve the source audio by setting \`"codec:a": "copy"\`.
|
|
99
|
+
- Position text with the \`x\` and \`y\` expressions. The example above centers the text.
|
|
100
|
+
|
|
101
|
+
See the live demo [here](/demos/video-encoding/add-text-overlay/).
|
|
102
|
+
`),
|
|
103
|
+
font_size: z.number().optional(),
|
|
104
|
+
font_color: z.string().optional(),
|
|
105
|
+
text_background_color: z.string().optional(),
|
|
106
|
+
})
|
|
107
|
+
.strict()
|
|
108
|
+
|
|
109
|
+
export const robotVideoEncodeInstructionsWithHiddenFieldsSchema =
|
|
110
|
+
robotVideoEncodeInstructionsSchema.extend({
|
|
111
|
+
result: z
|
|
112
|
+
.union([z.literal('debug'), robotVideoEncodeInstructionsSchema.shape.result])
|
|
113
|
+
.optional(),
|
|
114
|
+
chunked_transcoding: z.boolean().optional(),
|
|
115
|
+
realtime: z.boolean().optional(),
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
export type RobotVideoEncodeInstructions = z.infer<typeof robotVideoEncodeInstructionsSchema>
|
|
119
|
+
export type RobotVideoEncodeInstructionsWithHiddenFields = z.infer<
|
|
120
|
+
typeof robotVideoEncodeInstructionsWithHiddenFieldsSchema
|
|
121
|
+
>
|
|
122
|
+
|
|
123
|
+
export const interpolatableRobotVideoEncodeInstructionsSchema = interpolateRobot(
|
|
124
|
+
robotVideoEncodeInstructionsSchema,
|
|
125
|
+
)
|
|
126
|
+
export type InterpolatableRobotVideoEncodeInstructions =
|
|
127
|
+
InterpolatableRobotVideoEncodeInstructionsInput
|
|
128
|
+
|
|
129
|
+
export type InterpolatableRobotVideoEncodeInstructionsInput = z.input<
|
|
130
|
+
typeof interpolatableRobotVideoEncodeInstructionsSchema
|
|
131
|
+
>
|
|
132
|
+
|
|
133
|
+
export const interpolatableRobotVideoEncodeInstructionsWithHiddenFieldsSchema = interpolateRobot(
|
|
134
|
+
robotVideoEncodeInstructionsWithHiddenFieldsSchema,
|
|
135
|
+
)
|
|
136
|
+
export type InterpolatableRobotVideoEncodeInstructionsWithHiddenFields = z.infer<
|
|
137
|
+
typeof interpolatableRobotVideoEncodeInstructionsWithHiddenFieldsSchema
|
|
138
|
+
>
|
|
139
|
+
export type InterpolatableRobotVideoEncodeInstructionsWithHiddenFieldsInput = z.input<
|
|
140
|
+
typeof interpolatableRobotVideoEncodeInstructionsWithHiddenFieldsSchema
|
|
141
|
+
>
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
import type { RobotMetaInput } from './_instructions-primitives.ts'
|
|
4
|
+
import {
|
|
5
|
+
color_with_alpha,
|
|
6
|
+
interpolateRobot,
|
|
7
|
+
resize_strategy,
|
|
8
|
+
robotBase,
|
|
9
|
+
robotFFmpegVideo,
|
|
10
|
+
robotUse,
|
|
11
|
+
} from './_instructions-primitives.ts'
|
|
12
|
+
|
|
13
|
+
export const meta: RobotMetaInput = {
|
|
14
|
+
allowed_for_url_transform: false,
|
|
15
|
+
bytescount: 1,
|
|
16
|
+
discount_factor: 1,
|
|
17
|
+
discount_pct: 0,
|
|
18
|
+
minimum_charge: 0,
|
|
19
|
+
output_factor: 0.6,
|
|
20
|
+
override_lvl1: 'Video Encoding',
|
|
21
|
+
purpose_sentence:
|
|
22
|
+
'composes a new video by adding an audio track to existing still image(s) or video',
|
|
23
|
+
purpose_verb: 'merge',
|
|
24
|
+
purpose_word: 'merge',
|
|
25
|
+
purpose_words: 'Merge video, audio, images into one video',
|
|
26
|
+
service_slug: 'video-encoding',
|
|
27
|
+
slot_count: 60,
|
|
28
|
+
title: 'Merge video, audio, images into one video',
|
|
29
|
+
typical_file_size_mb: 80,
|
|
30
|
+
typical_file_type: 'video',
|
|
31
|
+
uses_tools: ['ffmpeg'],
|
|
32
|
+
name: 'VideoMergeRobot',
|
|
33
|
+
priceFactor: 1,
|
|
34
|
+
queueSlotCount: 60,
|
|
35
|
+
isAllowedForUrlTransform: false,
|
|
36
|
+
trackOutputFileSize: true,
|
|
37
|
+
isInternal: false,
|
|
38
|
+
removeJobResultFilesFromDiskRightAfterStoringOnS3: false,
|
|
39
|
+
stage: 'ga',
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const robotVideoMergeInstructionsSchema = robotBase
|
|
43
|
+
.merge(robotUse)
|
|
44
|
+
.merge(robotFFmpegVideo)
|
|
45
|
+
.extend({
|
|
46
|
+
robot: z.literal('/video/merge'),
|
|
47
|
+
resize_strategy: resize_strategy.describe(`
|
|
48
|
+
If the given width/height parameters are bigger than the input image's dimensions, then the \`resize_strategy\` determines how the image will be resized to match the provided width/height. See the [available resize strategies](/docs/topics/resize-strategies/).
|
|
49
|
+
`),
|
|
50
|
+
background: color_with_alpha.default('#00000000').describe(`
|
|
51
|
+
The background color of the resulting video the \`"rrggbbaa"\` format (red, green, blue, alpha) when used with the \`"pad"\` resize strategy. The default color is black.
|
|
52
|
+
`),
|
|
53
|
+
framerate: z
|
|
54
|
+
.union([z.number().int().min(1), z.string().regex(/^\d+(?:\/\d+)?$/)])
|
|
55
|
+
.default('1/5')
|
|
56
|
+
.describe(`
|
|
57
|
+
When merging images to generate a video this is the input framerate. A value of "1/5" means each image is given 5 seconds before the next frame appears (the inverse of a framerate of "5"). Likewise for "1/10", "1/20", etc. A value of "5" means there are 5 frames per second.
|
|
58
|
+
`),
|
|
59
|
+
image_durations: z
|
|
60
|
+
.array(z.number())
|
|
61
|
+
.default([])
|
|
62
|
+
.describe(`
|
|
63
|
+
When merging images to generate a video this allows you to define how long (in seconds) each image will be shown inside of the video. So if you pass 3 images and define \`[2.4, 5.6, 9]\` the first image will be shown for 2.4s, the second image for 5.6s and the last one for 9s. The \`duration\` parameter will automatically be set to the sum of the image_durations, so \`17\` in our example. It can still be overwritten, though, in which case the last image will be shown until the defined duration is reached.
|
|
64
|
+
`),
|
|
65
|
+
duration: z
|
|
66
|
+
.number()
|
|
67
|
+
.default(5)
|
|
68
|
+
.describe(`
|
|
69
|
+
When merging images to generate a video or when merging audio and video this is the desired target duration in seconds. The float value can take one decimal digit. If you want all images to be displayed exactly once, then you can set the duration according to this formula: \`duration = numberOfImages / framerate\`. This also works for the inverse framerate values like \`1/5\`.
|
|
70
|
+
|
|
71
|
+
If you set this value to \`null\` (default), then the duration of the input audio file will be used when merging images with an audio file.
|
|
72
|
+
|
|
73
|
+
When merging audio files and video files, the duration of the longest video or audio file is used by default.
|
|
74
|
+
`),
|
|
75
|
+
audio_delay: z
|
|
76
|
+
.number()
|
|
77
|
+
.default(0)
|
|
78
|
+
.describe(`
|
|
79
|
+
When merging a video and an audio file, and when merging images and an audio file to generate a video, this is the desired delay in seconds for the audio file to start playing. Imagine you merge a video file without sound and an audio file, but you wish the audio to start playing after 5 seconds and not immediately, then this is the parameter to use.
|
|
80
|
+
`),
|
|
81
|
+
loop: z
|
|
82
|
+
.boolean()
|
|
83
|
+
.default(false)
|
|
84
|
+
.describe(`
|
|
85
|
+
Determines whether the shorter media file should be looped to match the duration of the longer one. For example, if you merge a 1-minute video with a 3-minute audio file and enable this option, the video will play three times in a row to match the audio length.`),
|
|
86
|
+
replace_audio: z
|
|
87
|
+
.boolean()
|
|
88
|
+
.default(false)
|
|
89
|
+
.describe(`
|
|
90
|
+
Determines whether the audio of the video should be replaced with a provided audio file.
|
|
91
|
+
`),
|
|
92
|
+
vstack: z
|
|
93
|
+
.boolean()
|
|
94
|
+
.default(false)
|
|
95
|
+
.describe(`
|
|
96
|
+
Stacks the input media vertically. All streams need to have the same pixel format and width - so consider using a [/video/encode](/docs/robots/video-encode/) <dfn>Step</dfn> before using this parameter to enforce this.
|
|
97
|
+
`),
|
|
98
|
+
image_url: z
|
|
99
|
+
.string()
|
|
100
|
+
.url()
|
|
101
|
+
.optional()
|
|
102
|
+
.describe(`
|
|
103
|
+
The URL of an image to be merged with the audio or video. When this parameter is provided, the robot will download the image from the URL and merge it with the other media.
|
|
104
|
+
`),
|
|
105
|
+
})
|
|
106
|
+
.strict()
|
|
107
|
+
|
|
108
|
+
export const robotVideoMergeInstructionsWithHiddenFieldsSchema =
|
|
109
|
+
robotVideoMergeInstructionsSchema.extend({
|
|
110
|
+
result: z
|
|
111
|
+
.union([z.literal('debug'), robotVideoMergeInstructionsSchema.shape.result])
|
|
112
|
+
.optional(),
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
export type RobotVideoMergeInstructions = z.infer<typeof robotVideoMergeInstructionsSchema>
|
|
116
|
+
export type RobotVideoMergeInstructionsWithHiddenFields = z.infer<
|
|
117
|
+
typeof robotVideoMergeInstructionsWithHiddenFieldsSchema
|
|
118
|
+
>
|
|
119
|
+
|
|
120
|
+
export const interpolatableRobotVideoMergeInstructionsSchema = interpolateRobot(
|
|
121
|
+
robotVideoMergeInstructionsSchema,
|
|
122
|
+
)
|
|
123
|
+
export type InterpolatableRobotVideoMergeInstructions =
|
|
124
|
+
InterpolatableRobotVideoMergeInstructionsInput
|
|
125
|
+
|
|
126
|
+
export type InterpolatableRobotVideoMergeInstructionsInput = z.input<
|
|
127
|
+
typeof interpolatableRobotVideoMergeInstructionsSchema
|
|
128
|
+
>
|
|
129
|
+
|
|
130
|
+
export const interpolatableRobotVideoMergeInstructionsWithHiddenFieldsSchema = interpolateRobot(
|
|
131
|
+
robotVideoMergeInstructionsWithHiddenFieldsSchema,
|
|
132
|
+
)
|
|
133
|
+
export type InterpolatableRobotVideoMergeInstructionsWithHiddenFields = z.infer<
|
|
134
|
+
typeof interpolatableRobotVideoMergeInstructionsWithHiddenFieldsSchema
|
|
135
|
+
>
|
|
136
|
+
export type InterpolatableRobotVideoMergeInstructionsWithHiddenFieldsInput = z.input<
|
|
137
|
+
typeof interpolatableRobotVideoMergeInstructionsWithHiddenFieldsSchema
|
|
138
|
+
>
|