eugeneware / ffprobe

Use ffprobe to get info from media files and return as JSON
Other
96 stars 21 forks source link

Use in Google Cloud function #13

Open alextouze20 opened 3 years ago

alextouze20 commented 3 years ago

I'm trying to use ffprobe in a Google Cloud Function. But all I get is an empty Promise no matter what my input is:

Input: https://ucarecdn.com/1ba97d0a-e709-4915-bb35-5ad9e1b42975/test2.mp3

Output {"domain":{"domain":null,"_events":{},"_eventsCount":3,"members":[]}}

What I'm I missing?

exports.helloWorld = (req, res) => {
  const ffprobe = require('ffprobe'),
  ffprobeStatic = require('ffprobe-static');
  let message = req.query.message || req.body.message || 'Error';
  let result = ffprobe(message, { path: ffprobeStatic.path }) || 'Error ffprobe';
  res.status(200).send(result);
};
PortugalNeto commented 1 year ago

Hey, @alextouze20 , have you solved this problem? I'm getting a similar error in a AWS Lambda..

ollyde commented 1 year ago

Also have the same issue but with Docker on CloudRun. Looks like no one can run this in Prod.