polotno-node 2.9.17 → 2.9.18
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 +8 -2
package/package.json
CHANGED
package/video-parallel.js
CHANGED
|
@@ -238,7 +238,8 @@ module.exports.jsonToVideo = async function jsonToVideo(inst, json, attrs) {
|
|
|
238
238
|
.input(`${tempFolder.name}/%d.jpeg`)
|
|
239
239
|
.inputFPS(fps)
|
|
240
240
|
.videoCodec('libx264')
|
|
241
|
-
.outputOptions('-pix_fmt yuv420p')
|
|
241
|
+
.outputOptions('-pix_fmt yuv420p')
|
|
242
|
+
.videoFilters('scale=trunc(iw/2)*2:trunc(ih/2)*2'); // Ensure dimensions are divisible by 2
|
|
242
243
|
|
|
243
244
|
// Add each audio segment as a separate input
|
|
244
245
|
inputs.forEach((input, index) => {
|
|
@@ -267,7 +268,12 @@ module.exports.jsonToVideo = async function jsonToVideo(inst, json, attrs) {
|
|
|
267
268
|
ffmpegCmd
|
|
268
269
|
.format(format)
|
|
269
270
|
.on('end', () => resolve())
|
|
270
|
-
.on('error', (err) =>
|
|
271
|
+
.on('error', (err, stdout, stderr) => {
|
|
272
|
+
console.log(err.message);
|
|
273
|
+
console.log('stdout:\n' + stdout);
|
|
274
|
+
console.log('stderr:\n' + stderr);
|
|
275
|
+
reject(err);
|
|
276
|
+
})
|
|
271
277
|
.save(attrs.out);
|
|
272
278
|
});
|
|
273
279
|
|