eugeneware / ffmpeg-static

ffmpeg static binaries for Mac OSX and Linux and Windows
GNU General Public License v3.0
1.07k stars 175 forks source link

error EACCES #109

Closed luokunman closed 2 years ago

luokunman commented 2 years ago

macOS 12.3.1 Apple M1

Error: spawn /Users/study/xxx/node_modules/_ffmpeg-static@4.4.1@ffmpeg-static/ffmpeg EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -13,
  code: 'EACCES',
  syscall: 'spawn /Users/study/xxx/node_modules/_ffmpeg-static@4.4.1@ffmpeg-static/ffmpeg',
  path: '/Users/study/xxx/node_modules/_ffmpeg-static@4.4.1@ffmpeg-static/ffmpeg',
  spawnargs: [
    '-i',
    '/private/var/folders/zw/ttfrttk54bv0kgyrgmszjm6c0000gn/T/78845768ddb59ffd7250f0f3bf16a053.mp4',
    '-r',
    '30',
    '-s',
    '598x336',
    '-ss',
    '0',
    '-to',
    '12.233333',
    '/private/var/folders/zw/ttfrttk54bv0kgyrgmszjm6c0000gn/T/46b74f3028d2cc52b1775bf13cae2ce6/2022-07-27 at 18.22.26 - Silver Felidae.mp4'
  ]
}
derhuerst commented 2 years ago

Can you try running the ffmpeg binary manually from the terminal?

/Users/study/xxx/node_modules/_ffmpeg-static@4.4.1@ffmpeg-static/ffmpeg --help
luokunman commented 2 years ago

This is not valid。 response:command not found

luokunman commented 2 years ago

This is not valid。 response:command not found

image

This file is not an exec program file

luokunman commented 2 years ago

@derhuerst I studied for a day and never found the reason. It is only observed that ffmpeg cannot be called.
I hope you can help me see it as soon as possible. Thank you.🌹

luokunman commented 2 years ago

I downloaded @ffmpeg-installer/ffmpeg. replace ffmpeg file

derhuerst commented 2 years ago

For some reason, on your machine, the ffmpeg file was not marked as executable. I can't reproduce this problem unfortunately.

Glad that using @ffmpeg-installer/ffmpeg worked for you.

darrenmothersele commented 1 year ago

Hey, I'm just dropping a note here because this was the first issue I found when trying to solve this issue.

For me the solution was to use this webpack plugin: https://github.com/GeKorm/webpack-permissions-plugin

I was using electron forge, and CopyWebpackPlugin to get the ffmpeg binary into the correct location. but CopyWebpackPlugin doesn't preserve permissions on copied files.