@remotion/renderer 4.0.0-newpathfunctions.13 → 4.0.0-newpaths.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.
package/dist/client.d.ts CHANGED
@@ -1,3 +1,10 @@
1
1
  export declare const BrowserSafeApis: {
2
- getFileExtensionFromCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif", type: "chunk" | "final") => "mp3" | "aac" | "wav" | "gif" | "mp4" | "mkv" | "mov" | "webm";
2
+ getFileExtensionFromCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => "mp3" | "aac" | "wav" | "gif" | "mp4" | "mkv" | "mov" | "webm";
3
+ validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
4
+ getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => number;
5
+ getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => [number, number];
6
+ isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
7
+ proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
8
+ validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
9
+ DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
3
10
  };
package/dist/client.js CHANGED
@@ -1,7 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BrowserSafeApis = void 0;
4
+ const codec_1 = require("./codec");
5
+ const crf_1 = require("./crf");
4
6
  const get_extension_from_codec_1 = require("./get-extension-from-codec");
7
+ const is_audio_codec_1 = require("./is-audio-codec");
8
+ const pixel_format_1 = require("./pixel-format");
9
+ const prores_profile_1 = require("./prores-profile");
5
10
  exports.BrowserSafeApis = {
6
11
  getFileExtensionFromCodec: get_extension_from_codec_1.getFileExtensionFromCodec,
12
+ validCodecs: codec_1.validCodecs,
13
+ getDefaultCrfForCodec: crf_1.getDefaultCrfForCodec,
14
+ getValidCrfRanges: crf_1.getValidCrfRanges,
15
+ isAudioCodec: is_audio_codec_1.isAudioCodec,
16
+ proResProfileOptions: prores_profile_1.proResProfileOptions,
17
+ validPixelFormats: pixel_format_1.validPixelFormats,
18
+ DEFAULT_PIXEL_FORMAT: pixel_format_1.DEFAULT_PIXEL_FORMAT,
7
19
  };
@@ -1,8 +1,5 @@
1
1
  import type { DownloadMap } from './assets/download-map';
2
2
  export declare const createFfmpegComplexFilter: (filters: number, downloadMap: DownloadMap) => Promise<{
3
- complexFilterFlag: [
4
- string,
5
- string
6
- ] | null;
3
+ complexFilterFlag: [string, string] | null;
7
4
  cleanup: () => void;
8
5
  }>;
@@ -1,4 +1 @@
1
- export declare const determineResizeParams: (needsResize: [
2
- number,
3
- number
4
- ] | null) => string[];
1
+ export declare const determineResizeParams: (needsResize: [number, number] | null) => string[];
@@ -0,0 +1,2 @@
1
+ import type { SpecialVCodecForTransparency } from './assets/download-map';
2
+ export declare const determineVcodecFfmepgFlags: (vcodecFlag: SpecialVCodecForTransparency) => string[];
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.determineVcodecFfmepgFlags = void 0;
4
+ const truthy_1 = require("./truthy");
5
+ const determineVcodecFfmepgFlags = (vcodecFlag) => {
6
+ return [
7
+ vcodecFlag === 'vp9' ? '-vcodec' : null,
8
+ vcodecFlag === 'vp9' ? 'libvpx-vp9' : null,
9
+ vcodecFlag === 'vp8' ? '-vcodec' : null,
10
+ vcodecFlag === 'vp8' ? 'libvpx' : null,
11
+ ].filter(truthy_1.truthy);
12
+ };
13
+ exports.determineVcodecFfmepgFlags = determineVcodecFfmepgFlags;
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { OffthreadVideoImageFormat } from 'remotion';
2
3
  import type { DownloadMap } from './assets/download-map';
3
4
  import type { FfmpegExecutable } from './ffmpeg-executable';
@@ -0,0 +1,3 @@
1
+ import type { ComponentType } from 'react';
2
+ import type { TCompMetadata } from 'remotion';
3
+ export declare const getCompositionsFromMarkup: (Comp: ComponentType) => TCompMetadata[];
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCompositionsFromMarkup = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const server_1 = require("react-dom/server");
6
+ const getCompositionsFromMarkup = (Comp) => {
7
+ process.env.REMOTION_SERVER_RENDERING = 'true';
8
+ const str = (0, server_1.renderToString)((0, jsx_runtime_1.jsx)(Comp, {}));
9
+ const matches = str.matchAll(/<div>(.*?)<\/div>/g);
10
+ const metadata = [];
11
+ for (const match of matches) {
12
+ const json = JSON.parse(match[1]);
13
+ metadata.push(json);
14
+ }
15
+ return metadata;
16
+ };
17
+ exports.getCompositionsFromMarkup = getCompositionsFromMarkup;
@@ -0,0 +1,3 @@
1
+ import type { ComponentType } from 'react';
2
+ import type { TCompMetadata } from 'remotion';
3
+ export declare const getCompositionsFromMarkup: (Comp: ComponentType) => TCompMetadata[];
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCompositionsFromMarkup = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const server_1 = require("react-dom/server");
6
+ const getCompositionsFromMarkup = (Comp) => {
7
+ process.env.REMOTION_SERVER_RENDERING = 'true';
8
+ const str = (0, server_1.renderToString)((0, jsx_runtime_1.jsx)(Comp, {}));
9
+ console.log({ str }, (0, jsx_runtime_1.jsx)(Comp, {}));
10
+ const matches = str.matchAll(/<div>(.*?)<\/div>/g);
11
+ const metadata = [];
12
+ for (const match of matches) {
13
+ const json = JSON.parse(match[1]);
14
+ metadata.push(json);
15
+ }
16
+ return metadata;
17
+ };
18
+ exports.getCompositionsFromMarkup = getCompositionsFromMarkup;
@@ -1,2 +1,2 @@
1
1
  import type { Codec } from './codec';
2
- export declare const getFileExtensionFromCodec: (codec: Codec) => "mp3" | "aac" | "wav" | "gif" | "mp4" | "mkv" | "mov" | "webm";
2
+ export declare const getFileExtensionFromCodec: (codec: Codec) => "mp3" | "aac" | "wav" | "gif" | "webm" | "mp4" | "mov" | "mkv";
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { OffthreadVideoImageFormat } from 'remotion';
2
3
  import type { SpecialVCodecForTransparency } from './assets/download-map';
3
4
  import type { FfmpegExecutable } from './ffmpeg-executable';
@@ -7,10 +8,7 @@ export declare const getFrameOfVideoSlow: ({ src, duration, ffmpegExecutable, im
7
8
  duration: number;
8
9
  imageFormat: OffthreadVideoImageFormat;
9
10
  specialVCodecForTransparency: SpecialVCodecForTransparency;
10
- needsResize: [
11
- number,
12
- number
13
- ] | null;
11
+ needsResize: [number, number] | null;
14
12
  offset: number;
15
13
  fps: number | null;
16
14
  remotionRoot: string;
@@ -2,4 +2,4 @@ export declare const guessExtensionForVideo: ({ src, remotionRoot, ffprobeBinary
2
2
  src: string;
3
3
  remotionRoot: string;
4
4
  ffprobeBinary: string | null;
5
- }) => Promise<"mp3" | "wav" | "mp4" | "webm">;
5
+ }) => Promise<"mp3" | "wav" | "webm" | "mp4">;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import execa from 'execa';
2
3
  import { SymbolicateableError } from './error-handling/symbolicateable-error';
3
4
  import { mimeContentType, mimeLookup } from './mime-types';
@@ -59,7 +60,7 @@ export declare const RenderInternals: {
59
60
  scale: number;
60
61
  codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
61
62
  }) => void;
62
- getFileExtensionFromCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => "mp3" | "aac" | "wav" | "gif" | "mp4" | "mkv" | "mov" | "webm";
63
+ getFileExtensionFromCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => "mp3" | "aac" | "wav" | "gif" | "webm" | "mp4" | "mov" | "mkv";
63
64
  tmpDir: (str: string) => string;
64
65
  deleteDirectory: (directory: string) => Promise<void>;
65
66
  isServeUrl: (potentialUrl: string) => boolean;
@@ -116,8 +117,8 @@ export declare const RenderInternals: {
116
117
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
117
118
  DEFAULT_BROWSER: import("./browser").Browser;
118
119
  validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
119
- DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | null;
120
- validateOpenGlRenderer: (option: "swangle" | "angle" | "egl" | "swiftshader" | null) => "swangle" | "angle" | "egl" | "swiftshader" | null;
120
+ DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | null;
121
+ validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | null) => "angle" | "swangle" | "egl" | "swiftshader" | null;
121
122
  validImageFormats: readonly ["png", "jpeg", "none"];
122
123
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
123
124
  DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
@@ -127,7 +128,7 @@ export declare const RenderInternals: {
127
128
  DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
128
129
  isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
129
130
  logLevels: readonly ["verbose", "info", "warn", "error"];
130
- isEqualOrBelowLogLevel: (currentLevel: "verbose" | "error" | "info" | "warn", level: "verbose" | "error" | "info" | "warn") => boolean;
131
+ isEqualOrBelowLogLevel: (currentLevel: "error" | "verbose" | "info" | "warn", level: "error" | "verbose" | "info" | "warn") => boolean;
131
132
  isValidLogLevel: (level: string) => boolean;
132
133
  perf: typeof perf;
133
134
  makeDownloadMap: () => import("./assets/download-map").DownloadMap;
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { OffthreadVideoImageFormat } from 'remotion';
2
3
  import type { DownloadMap, SpecialVCodecForTransparency } from './assets/download-map';
3
4
  import type { FfmpegExecutable } from './ffmpeg-executable';
@@ -0,0 +1,2 @@
1
+ export declare const lockPortSelection: () => void;
2
+ export declare const unlockPortSelection: () => void;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.unlockPortSelection = exports.lockPortSelection = void 0;
4
+ const locks = [];
5
+ const waitForPortSelection = () => { };
6
+ const lockPortSelection = () => {
7
+ locks.push();
8
+ };
9
+ exports.lockPortSelection = lockPortSelection;
10
+ const unlockPortSelection = () => { };
11
+ exports.unlockPortSelection = unlockPortSelection;
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { ClipRegion } from 'remotion';
2
3
  import type { Page } from './browser/BrowserPage';
3
4
  import type { ImageFormat } from './image-format';
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { ClipRegion } from 'remotion';
2
3
  import type { Page } from './browser/BrowserPage';
3
4
  export declare const screenshot: (options: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { SmallTCompMetadata } from 'remotion';
2
3
  import type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
3
4
  import type { DownloadMap } from './assets/download-map';
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { SmallTCompMetadata, TAsset } from 'remotion';
2
3
  import type { DownloadMap } from './assets/download-map';
3
4
  import type { BrowserExecutable } from './browser-executable';
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { ClipRegion } from 'remotion';
2
3
  import type { Page } from './browser/BrowserPage';
3
4
  import type { ImageFormat } from './image-format';
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { ClipRegion } from 'remotion';
2
3
  import type { Page } from './browser/BrowserPage';
3
4
  import type { StillImageFormat } from './image-format';
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { TAsset } from 'remotion';
2
3
  import type { DownloadMap } from './assets/download-map';
3
4
  import type { Page } from './browser/BrowserPage';
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { OffthreadVideoImageFormat } from 'remotion';
2
3
  import type { NeedsResize, SpecialVCodecForTransparency } from './assets/download-map';
3
4
  import type { FfmpegExecutable } from './ffmpeg-executable';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "4.0.0-newpathfunctions.13+40cc970bd",
3
+ "version": "4.0.0-newpaths.1+2111c6d63",
4
4
  "description": "Renderer for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "dependencies": {
25
25
  "execa": "5.1.1",
26
26
  "extract-zip": "2.0.1",
27
- "remotion": "4.0.0-newpathfunctions.13+40cc970bd",
27
+ "remotion": "4.0.0-newpaths.1+2111c6d63",
28
28
  "source-map": "^0.8.0-beta.0",
29
29
  "ws": "8.7.0"
30
30
  },
@@ -49,13 +49,13 @@
49
49
  "vitest": "0.24.3"
50
50
  },
51
51
  "optionalDependencies": {
52
- "@remotion/compositor-darwin-arm64": "4.0.0-newpathfunctions.13+40cc970bd",
53
- "@remotion/compositor-darwin-x64": "4.0.0-newpathfunctions.13+40cc970bd",
54
- "@remotion/compositor-linux-arm64-gnu": "4.0.0-newpathfunctions.13+40cc970bd",
55
- "@remotion/compositor-linux-arm64-musl": "4.0.0-newpathfunctions.13+40cc970bd",
56
- "@remotion/compositor-linux-x64-gnu": "4.0.0-newpathfunctions.13+40cc970bd",
57
- "@remotion/compositor-linux-x64-musl": "4.0.0-newpathfunctions.13+40cc970bd",
58
- "@remotion/compositor-win32-x64-msvc": "4.0.0-newpathfunctions.13+40cc970bd"
52
+ "@remotion/compositor-darwin-arm64": "4.0.0-newpaths.1+2111c6d63",
53
+ "@remotion/compositor-darwin-x64": "4.0.0-newpaths.1+2111c6d63",
54
+ "@remotion/compositor-linux-arm64-gnu": "4.0.0-newpaths.1+2111c6d63",
55
+ "@remotion/compositor-linux-arm64-musl": "4.0.0-newpaths.1+2111c6d63",
56
+ "@remotion/compositor-linux-x64-gnu": "4.0.0-newpaths.1+2111c6d63",
57
+ "@remotion/compositor-linux-x64-musl": "4.0.0-newpaths.1+2111c6d63",
58
+ "@remotion/compositor-win32-x64-msvc": "4.0.0-newpaths.1+2111c6d63"
59
59
  },
60
60
  "keywords": [
61
61
  "remotion",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "40cc970bd20f2c9fde0c1644f1c9f33cd47f3dc7"
70
+ "gitHead": "2111c6d63fe0c6b7d858b595775f090e88616aac"
71
71
  }