Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

86
Views
Saving videos directly to storage with ffmpeg

So I'm creating an app that will have video upload. In there I plan to create thumbnails from videos with fluent-ffmpeg library. My question is, is there a way I could do this without saving the files on the local machine and then deleting them, how can I directly upload the files to storage? I tried finding a buffer solution, but I'm not sure I understand it completely.

So far I created the transcoder for the videos, currently it will save videos to a directory called transcoded:

const transcodeVideo = async (fileName, filePath) => {
      return new Promise((resolve, reject) => {
        ffmpeg(filePath)
          .videoCodec('libx264')
          .audioCodec('libmp3lame')
          .format('mp4')
          .size('720x?')
          .on('error', function (err) {
            reject(err);
          })
          .on('end', function () {
            ffmpeg(filePath)
              .screenshots({
                timestamps: ['10%'], 
                folder: './transcoded',
                filename: `${fileName}.mp4.png`,
                size: '720x?',
              })
              .on('error', function (err) {
                reject(err);
              })
              .on('end', function () {
                resolve();
              });
          })
          .save(`./transcoded/${fileName}.mp4`);
      });
    };

The thing is I would like to store it separately in the storage, so that I can consume it on the frontend. Any ideas?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!