Skip to content

🎥 Make videos programmatically with React

resolve convos

Jonny Burgere554658962ed
diff --git a/packages/cli/src/parse-command-line.ts b/packages/cli/src/parse-command-line.ts
index 0ae57eed6c..b1de471a4c 100644
--- a/packages/cli/src/parse-command-line.ts
+++ b/packages/cli/src/parse-command-line.ts
@@ -32,7 +32,7 @@ export type CommandLineOptions = {
log: string;
help: boolean;
port: number;
- ['frame']: string | number;
+ frame: string | number;
};
export const parsedCli = minimist<CommandLineOptions>(process.argv.slice(2), {
diff --git a/packages/core/src/validation/validate-quality.ts b/packages/core/src/validation/validate-quality.ts
index d72ad97e2a..60a14d794b 100644
--- a/packages/core/src/validation/validate-quality.ts
+++ b/packages/core/src/validation/validate-quality.ts
@@ -20,6 +20,6 @@ export const validateQuality = (q: number | undefined) => {
}
if (q > 100 || q < 0) {
- throw new RangeError('Quality option must be between 1 and 100.');
+ throw new RangeError('Quality option must be between 0 and 100.');
}
};
diff --git a/packages/docs/docs/render-still.md b/packages/docs/docs/render-still.md
index 8beab6af78..92736dd7c5 100644
--- a/packages/docs/docs/render-still.md
+++ b/packages/docs/docs/render-still.md
@@ -5,9 +5,9 @@ title: renderStill()
_Part of the `@remotion/renderer` package. Available from v2.3._
-Renders a single frame to an image.
+Renders a single frame to an image and writes it to the specified output location.
-If you want to render the full image sequence, use [renderFrames()](/docs/render-frames) instead.
+If you want to render a full image sequence and possibly encode it to a video later, use [renderFrames()](/docs/render-frames) instead.
## Example usage
diff --git a/packages/renderer/src/render-still.ts b/packages/renderer/src/render-still.ts
index 397920e144..205b6ad77e 100644
--- a/packages/renderer/src/render-still.ts
+++ b/packages/renderer/src/render-still.ts
@@ -61,6 +61,10 @@ export const renderStill = async ({
Internals.validateImageFormat(imageFormat);
Internals.validateFrame(frame, composition.durationInFrames);
+ if (typeof output !== 'string') {
+ throw new TypeError('`output` parameter was not passed or is not a string');
+ }
+
output = path.resolve(process.cwd(), output);
if (quality !== undefined && imageFormat !== 'jpeg') {