@remotion/renderer 3.2.12-crf.7 → 3.2.14
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.
|
@@ -29,6 +29,7 @@ const downloadFile = ({ onProgress, url, to: toFn, }) => {
|
|
|
29
29
|
return resolve({ sizeInBytes: downloaded, to });
|
|
30
30
|
});
|
|
31
31
|
writeStream.on('error', (err) => reject(err));
|
|
32
|
+
res.on('error', (err) => reject(err));
|
|
32
33
|
res.pipe(writeStream).on('error', (err) => reject(err));
|
|
33
34
|
res.on('data', (d) => {
|
|
34
35
|
downloaded += d.length;
|
package/dist/combine-videos.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Codec } from './codec';
|
|
2
|
-
export declare const combineVideos: ({ files, filelistDir, output, onProgress, numberOfFrames, codec, fps, numberOfGifLoops,
|
|
2
|
+
export declare const combineVideos: ({ files, filelistDir, output, onProgress, numberOfFrames, codec, fps, numberOfGifLoops, }: {
|
|
3
3
|
files: string[];
|
|
4
4
|
filelistDir: string;
|
|
5
5
|
output: string;
|
|
@@ -8,5 +8,4 @@ export declare const combineVideos: ({ files, filelistDir, output, onProgress, n
|
|
|
8
8
|
codec: Codec;
|
|
9
9
|
fps: number;
|
|
10
10
|
numberOfGifLoops: number | null;
|
|
11
|
-
crf: number | null;
|
|
12
11
|
}) => Promise<void>;
|
package/dist/combine-videos.js
CHANGED
|
@@ -8,17 +8,15 @@ exports.combineVideos = void 0;
|
|
|
8
8
|
const execa_1 = __importDefault(require("execa"));
|
|
9
9
|
const fs_1 = require("fs");
|
|
10
10
|
const path_1 = require("path");
|
|
11
|
-
const codec_supports_media_1 = require("./codec-supports-media");
|
|
12
11
|
const get_audio_codec_name_1 = require("./get-audio-codec-name");
|
|
13
12
|
const is_audio_codec_1 = require("./is-audio-codec");
|
|
14
13
|
const parse_ffmpeg_progress_1 = require("./parse-ffmpeg-progress");
|
|
15
14
|
const truthy_1 = require("./truthy");
|
|
16
|
-
const combineVideos = async ({ files, filelistDir, output, onProgress, numberOfFrames, codec, fps, numberOfGifLoops,
|
|
15
|
+
const combineVideos = async ({ files, filelistDir, output, onProgress, numberOfFrames, codec, fps, numberOfGifLoops, }) => {
|
|
17
16
|
var _a;
|
|
18
17
|
const fileList = files.map((p) => `file '${p}'`).join('\n');
|
|
19
18
|
const fileListTxt = (0, path_1.join)(filelistDir, 'files.txt');
|
|
20
19
|
(0, fs_1.writeFileSync)(fileListTxt, fileList);
|
|
21
|
-
const supportsCrf = (0, codec_supports_media_1.codecSupportsCrf)(codec);
|
|
22
20
|
try {
|
|
23
21
|
const task = (0, execa_1.default)('ffmpeg', [
|
|
24
22
|
(0, is_audio_codec_1.isAudioCodec)(codec) ? null : '-r',
|
|
@@ -42,8 +40,6 @@ const combineVideos = async ({ files, filelistDir, output, onProgress, numberOfF
|
|
|
42
40
|
// Set max bitrate up to 1024kbps, will choose lower if that's too much
|
|
43
41
|
'-b:a',
|
|
44
42
|
'512K',
|
|
45
|
-
supportsCrf ? '-crf' : null,
|
|
46
|
-
supportsCrf ? String(crf) : null,
|
|
47
43
|
codec === 'h264' ? '-movflags' : null,
|
|
48
44
|
codec === 'h264' ? 'faststart' : null,
|
|
49
45
|
'-shortest',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.14",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"execa": "5.1.1",
|
|
24
24
|
"extract-zip": "2.0.1",
|
|
25
|
-
"remotion": "3.2.
|
|
25
|
+
"remotion": "3.2.14",
|
|
26
26
|
"source-map": "^0.8.0-beta.0",
|
|
27
27
|
"ws": "8.7.0"
|
|
28
28
|
},
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "544ef952c9df79b015496d68202776787f15cd93"
|
|
61
61
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { TCaption } from 'remotion';
|
|
2
|
-
interface CaptionFfmpegInputs {
|
|
3
|
-
captionFilters: string[];
|
|
4
|
-
captionInputs: [string, string][];
|
|
5
|
-
}
|
|
6
|
-
export declare const captionsToFfmpegInputs: ({ assetsCount, captions, }: {
|
|
7
|
-
assetsCount: number;
|
|
8
|
-
captions: TCaption[][];
|
|
9
|
-
}) => CaptionFfmpegInputs;
|
|
10
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.captionsToFfmpegInputs = void 0;
|
|
4
|
-
const captionsToFfmpegInputs = ({ assetsCount, captions, }) => {
|
|
5
|
-
const uniqueCaptions = Object.values(captions.flat(1).reduce((acc, caption) => {
|
|
6
|
-
acc[caption.id] = caption;
|
|
7
|
-
return acc;
|
|
8
|
-
}, {}));
|
|
9
|
-
/**
|
|
10
|
-
* TODO: Support more formats.
|
|
11
|
-
* `mov_text` works for SRT.
|
|
12
|
-
*/
|
|
13
|
-
const getFilter = ({ language, title }, index) => {
|
|
14
|
-
return ['-map', `${assetsCount + 1 + index}:s`, '-c:s', 'mov_text'].concat(language ? [`-metadata:s:s:${index}`, `language=${language}`] : '', title ? [`-metadata:s:s:${index}`, `title=${title}`] : '');
|
|
15
|
-
};
|
|
16
|
-
return {
|
|
17
|
-
captionInputs: uniqueCaptions.map((caption) => ['-i', caption.src]),
|
|
18
|
-
captionFilters: uniqueCaptions.reduce((acc, caption, i) => acc.concat(getFilter(caption, i)), []),
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
exports.captionsToFfmpegInputs = captionsToFfmpegInputs;
|