You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This <dfn>Robot</dfn> allows you to hash any file as part of the <dfn>Assembly</dfn> execution process. This can be useful for verifying the integrity of a file for example.
39
+
`),
37
40
result: z
38
41
.boolean()
39
42
.optional()
40
43
.describe(`Whether the results of this Step should be present in the Assembly Status JSON`),
This <dfn>Robot</dfn>'s purpose is to generate a meaningful preview image for any file, in such a way that the resulting thumbnail highlights the file's content. The goal is not to losslessly present the original media in a smaller way. Instead, it is to maximize the chance of a person recognizing the media at a glance, while being visually pleasing and consistent with other previews. The generation process depends on the file type. For example, the <dfn>Robot</dfn> can extract artwork from media files, frames from videos, generate a waveform for audio files, and preview the content of documents and images. The details of all available strategies are provided in the next section.
51
+
52
+
If no file-specific thumbnail can be generated because the file type is not supported, a generic icon containing the file extension will be generated.
53
+
54
+
The default parameters ensure that the <dfn>Robot</dfn> always generates a preview image with the predefined dimensions and formats, to allow an easy integration into your application's UI. In addition, the generated preview images are optimized by default to reduce their file size while keeping their quality.
55
+
`),
49
56
result: z
50
57
.boolean()
51
58
.optional()
52
59
.describe(`Whether the results of this Step should be present in the Assembly Status JSON`),
The output format for the generated thumbnail image. If a short video clip is generated using the \`clip\` strategy, its format is defined by \`clip_format\`.
@@ -65,6 +71,9 @@ Height of the thumbnail, in pixels.
65
71
To achieve the desired dimensions of the preview thumbnail, the <dfn>Robot</dfn> might have to resize the generated image. This happens, for example, when the dimensions of a frame extracted from a video do not match the chosen \`width\` and \`height\` parameters.
66
72
67
73
See the list of available [resize strategies](/docs/transcoding/image-manipulation/image-resize/#resize-strategies) for more details.
The hexadecimal code of the color used to fill the background (only used for the pad resize strategy). The format is \`#rrggbb[aa]\` (red, green, blue, alpha). Use \`#00000000\` for a transparent padding.
Copy file name to clipboardExpand all lines: src/alphalib/types/robots/media-playlist.ts
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ import { useParamSchema } from './_instructions-primitives.ts'
5
5
6
6
exportconstmeta: RobotMeta={
7
7
allowed_for_url_transform: true,
8
-
bytescount: 20,
8
+
bytescount: 10,
9
9
discount_factor: 0.1,
10
10
discount_pct: 90,
11
11
minimum_charge: 0,
@@ -29,7 +29,7 @@ export const robotMediaPlaylistInstructionsSchema = z
29
29
.optional()
30
30
.describe(`Whether the results of this Step should be present in the Assembly Status JSON`),
31
31
robot: z.literal('/media/playlist').describe(`
32
-
🤖/media/playlist is deprecated and will be removed! Please use [🤖/video/adaptive](/docs/transcoding/video-encoding/video-adaptive/) for all your HLS and MPEG-Dash needs instead.
32
+
**Warning:** 🤖/media/playlist is deprecated and will be removed! Please use [🤖/video/adaptive](/docs/transcoding/video-encoding/video-adaptive/) for all your HLS and MPEG-Dash needs instead.
@@ -41,10 +41,10 @@ URL prefixes to use in the playlist file. Example: \`"/234p/"\`
41
41
resolution: z.string().optional().describe(`
42
42
The resolution reported in the playlist file. Example: \`"416×234"\`. [More info](https://developer.apple.com/library/ios/technotes/tn2224/_index.html#//apple_ref/doc/uid/DTS40009745-CH1-DECIDEONYOURVARIANTS-DEVICE_CAPABILITIES).
43
43
`),
44
-
codes: z.string().optional().describe(`
44
+
codecs: z.string().optional().describe(`
45
45
The codecs reported in the playlist file. Example: \`"avc1.42001e,mp4a.40.34"\`. [More info](https://developer.apple.com/library/ios/technotes/tn2224/_index.html#//apple_ref/doc/uid/DTS40009745-CH1-DECIDEONYOURVARIANTS-DEVICE_CAPABILITIES).
The bandwidth reported in the playlist file. Example: \`2560000\`. [More info](https://developer.apple.com/library/ios/technotes/tn2224/_index.html#//apple_ref/doc/uid/DTS40009745-CH1-DECIDEONYOURVARIANTS-DEVICE_CAPABILITIES). This value is expressed in bits per second.
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.
71
+
72
+
This <dfn>Robot</dfn> is normally used in combination with [🤖/video/encode](/docs/transcoding/video-encoding/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/).
73
+
74
+
### Required CORS settings for MPEG-Dash and HTTP Live Streaming
75
+
76
+
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:
77
+
78
+
\`\`\`
79
+
Access-Control-Allow-Origin: *
80
+
Access-Control-Allow-Methods: GET
81
+
Access-Control-Allow-Headers: *
82
+
\`\`\`
83
+
84
+
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:
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>.
107
+
108
+
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.
109
+
`),
69
110
result: z
70
111
.boolean()
71
112
.optional()
72
113
.describe(`Whether the results of this Step should be present in the Assembly Status JSON`),
**Warning:** All videos you concatenate must have the same dimensions (width and height) and the same streams (audio and video streams), otherwise you will run into errors. If your videos donʼt have the desired dimensions when passing them to [🤖/video/concat](/docs/transcoding/video-encoding/video-concat/), encode them first with [🤖/video/encode](/docs/transcoding/video-encoding/video-encode/). [{.alert .alert-warning}]
51
+
52
+
Itʼs possible to concatenate a virtually infinite number of video files using [🤖/video/concat](/docs/transcoding/video-encoding/video-concat/).
53
+
`),
49
54
result: z
50
55
.boolean()
51
56
.optional()
52
57
.describe(`Whether the results of this Step should be present in the Assembly Status JSON`),
Performs conversion using pre-configured settings.
58
62
59
63
If you specify your own FFmpeg parameters using the <dfn>Robot</dfn>'s \`ffmpeg\` parameter and you have not specified a preset, then the default \`"flash"\` preset is not applied. This is to prevent you from having to override each of the flash preset's values manually.
0 commit comments