const bucket = storage.bucket('my-bucket.appspot.com');
const filePath = 'videos/video.mp4'; // Replace with the full path to your file
const videoFile = bucket.file(filePath);
const readStream = videoFile.createReadStream();
const ffmpegCommand = ffmpeg();
ffmpegCommand.input(readStream);
ffmpegCommand
.outputOptions([
'-preset ultrafast',
'-c:v libx264',
'-c:a aac',
'-vf scale=640:480',
])
.format('wav');
const outputStream = await ffmpegCommand.pipe();
(note: if the problem only happens with some inputs, include a link to such an input file)
Observed results
I am trying to read a video as a stream from firebase and compress it using ffmpeg an it is too much time for the job to complete such that my call breaks before its done and I am getting socket hangup error. I have tried to increase the timeout of the call to 540s but it is still not enought for the job to be done. The framework I am using is nestJs with react as front-end. This is a web-app and the feature I am working on is a video recording functionality.
Version information
Code to reproduce
(note: if the problem only happens with some inputs, include a link to such an input file)
Observed results
I am trying to read a video as a stream from firebase and compress it using ffmpeg an it is too much time for the job to complete such that my call breaks before its done and I am getting socket hangup error. I have tried to increase the timeout of the call to 540s but it is still not enought for the job to be done. The framework I am using is nestJs with react as front-end. This is a web-app and the feature I am working on is a video recording functionality.