Search code examples
node.jsvideovideo-streamingmulter

Node.js Get video duration on upload


I'm uploading a video through an express call and using multer for resumable uploads. I forward the buffer directly to GoogleCloud Storage and don't want to save the file at all on my server.

Is there a server-side way to check for the duration (length) of the video file using only req.file.buffer ?

My code looks very similar to this example.


Solution

  • $ npm install --save get-video-duration I really don't need to explain any further. and look up the npm doc for get video durration