Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command from ffprobe-static Error #19

Open
PortugalNeto opened this issue Sep 27, 2022 · 1 comment
Open

Command from ffprobe-static Error #19

PortugalNeto opened this issue Sep 27, 2022 · 1 comment

Comments

@PortugalNeto
Copy link

PortugalNeto commented Sep 27, 2022

Hello, everyone! I really hope you can help me with this issue:

I have an app that was built with microservices. One of them use ffprobe and ffprobe-static, just as follows:

 const getMediaS3 = async (event) => {
  const s3 = new S3();
  const params = {
    Bucket: event.Records[0].s3.bucket.name,
    Key: event.Records[0].s3.object.key
  };
  logger(`# getVideoInfo() - Getting video information`)
  await ffprobe(`https://${getEnv('CLOUDFRONT')}.cloudfront.net/${params.Key}`, { path: ffprobeStatic.path }, function (err, info) {
  if (err) {
    throw err;
  };
  const video = info.streams.find(s => s.codec_type === "video");
    const rotate = video.tags.rotate;
    if (rotate && (rotate === "90" || rotate === "270")) {
      width = video.height; 
      height = video.width;
    } else {
      width = video.width; 
      height = video.height;
    };
  }).catch(logger('It wasn't possible to catch video dimensions!'))

Locally it works just fine but when I deploy it I'm having this issue when the lambda function is called:

2022-09-27T20:21:03.463Z c4a0c5f5-ff06-4d00-861d-f61769b3f43b INFO # getVideoInfo() - Getting video information

2022-09-27T20:21:04.104Z c4a0c5f5-ff06-4d00-861d-f61769b3f43b ERROR Invoke Error
{
"errorType": "Error",
"errorMessage": "Command failed: /var/task/node_modules/ffprobe-static/bin/linux/x64/ffprobe -v quiet -print_format json -show_format -show_streams https://########.cloudfront.net/media/videos/temp/1664310055808.mp4\n",
"code": 1,
"killed": false,
"signal": null,
"cmd": "/var/task/node_modules/ffprobe-static/bin/linux/x64/ffprobe -v quiet -print_format json -show_format -show_streams https://########.cloudfront.net/media/videos/temp/1664310055808.mp4",
"stack": [
"Error: Command failed: /var/task/node_modules/ffprobe-static/bin/linux/x64/ffprobe -v quiet -print_format json -show_format -show_streams https://########.cloudfront.net/media/videos/temp/1664310055808.mp4",
"",
" at ChildProcess.exithandler (child_process.js:308:12)",
" at ChildProcess.emit (events.js:314:20)",
" at ChildProcess.EventEmitter.emit (domain.js:483:12)",
" at maybeClose (internal/child_process.js:1022:16)",
" at Socket. (internal/child_process.js:444:11)",
" at Socket.emit (events.js:314:20)",
" at Socket.EventEmitter.emit (domain.js:483:12)",
" at Pipe. (net.js:675:12)"
]
}
PS. I've omitted my cloudfront distribution id;
Node version of the Lamda is 12.x.
ffprobe-static: 3.1.0
Do you need any further informations?

@willbattel
Copy link

This looks to possibly be a similar or the same issue as reported here: SavageCore/node-ffprobe-installer#121

No solution found yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants