polotno-node 2.9.15 → 2.9.17
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/package.json +1 -1
- package/video-parallel.js +4 -3
package/package.json
CHANGED
package/video-parallel.js
CHANGED
|
@@ -180,6 +180,7 @@ module.exports.jsonToVideo = async function jsonToVideo(inst, json, attrs) {
|
|
|
180
180
|
const url = await store.toDataURL({
|
|
181
181
|
...attrs,
|
|
182
182
|
_skipTimeout: true,
|
|
183
|
+
mimeType: 'image/jpeg',
|
|
183
184
|
pageId: currentPage?.id,
|
|
184
185
|
});
|
|
185
186
|
return url;
|
|
@@ -189,7 +190,7 @@ module.exports.jsonToVideo = async function jsonToVideo(inst, json, attrs) {
|
|
|
189
190
|
currentTime
|
|
190
191
|
);
|
|
191
192
|
fs.writeFileSync(
|
|
192
|
-
`${tempFolder.name}/${frameIndex}.
|
|
193
|
+
`${tempFolder.name}/${frameIndex}.jpeg`,
|
|
193
194
|
dataURL.split(',')[1],
|
|
194
195
|
'base64'
|
|
195
196
|
);
|
|
@@ -234,7 +235,7 @@ module.exports.jsonToVideo = async function jsonToVideo(inst, json, attrs) {
|
|
|
234
235
|
|
|
235
236
|
await new Promise((resolve, reject) => {
|
|
236
237
|
const ffmpegCmd = ffmpeg()
|
|
237
|
-
.input(`${tempFolder.name}/%d.
|
|
238
|
+
.input(`${tempFolder.name}/%d.jpeg`)
|
|
238
239
|
.inputFPS(fps)
|
|
239
240
|
.videoCodec('libx264')
|
|
240
241
|
.outputOptions('-pix_fmt yuv420p');
|
|
@@ -260,7 +261,7 @@ module.exports.jsonToVideo = async function jsonToVideo(inst, json, attrs) {
|
|
|
260
261
|
|
|
261
262
|
// Map each audio stream
|
|
262
263
|
inputs.forEach((_, index) => {
|
|
263
|
-
ffmpegCmd.outputOptions([`-map ${index + 1}:a
|
|
264
|
+
ffmpegCmd.outputOptions([`-map ${index + 1}:a?`]);
|
|
264
265
|
});
|
|
265
266
|
|
|
266
267
|
ffmpegCmd
|