Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I am facing difficulty with serverless function to creating video and upload it to digital occan spaces. The ffmpeg gives me error while generating the video. here is my generating and uploading process:
const { PassThrough } = require("stream");
const passThroughStream = **new** PassThrough();
const buffers = [];
passThroughStream.on('data', (chunk) => buffers.push(chunk));
passThroughStream.on('end', async () => {
const buffer = Buffer.concat(buffers);
const contentLength = buffer.length;
try {
const url = await uploadFile(userId, buffer, videoPath, contentLength);
resolve({ url, duration });
} catch (uploadError) {
reject(uploadError);
}
});
ffmpeg()
.input(svgPaths[index][dim])
.loop(
index === audioMappings.length - 1 ? duration + 2.7 : duration
)
.input(audioFilePath)
.audioCodec("aac")
.videoCodec("libx264")
.videoBitrate(950)
.format("mp4")
.fps(25)
.size(dim)
.output(passThroughStream)
.on('start', (commandLine) => {
console.log('Spawned Ffmpeg with command:', commandLine);
})
.on('stderr', (stderrLine) => {
console.log('Stderr output:', stderrLine);
})
.on('error', (err, stdout, stderr) => {
const errorResponse = { error: "ffmpeg error", details: err.message, stdout, stderr };
reject(errorResponse);
})
.on('end', () => {
console.log(`ffmpeg processing complete for index ${index} and dimension ${dim}`);
})
.run();
});
});
outputVideoPaths.push(result.url);
danh23072004
4287c71658bd4ea39bef277d491b1c
4287c71658bd4ea39bef277d491b1c
mixbayes
Benjamin Listwon
Michael Campbell
Richard Leishman
mark lefler
542092c3dc874f6b86df2b510e7ee8
mark lefler
platestheapp