eugeneware / eugeneware/ffmpeg-static

`ffmpeg-static` does not seem to rebuild if the binary already exists at ./ffmpeg

Open
#136 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.4k
Forks
204
PR merge metrics
No merged PRs in 30d

Description

### ffmpeg-static version

5.2.0

### Node.js version

v18.20.3

### operating system and/or environment

MacOS 11.3.1
`@electron-forge`
`electron/universal`

### What happened?

We are using `ffmpeg-static` in a build process which creates a universal Mac build, and it passes `arch` values for both Intel and M1: x64 and arm64. In the finished app build we noticed there was only ever one arch of the ffmpeg binary created. Digging deeper we found that if a binary already exists at `ffmpeg-static/ffmpeg`, it will not be rebuilt:

```
npm rebuild --arch=x64 -f ffmpeg-static
file node_modules/ffmpeg-static/ffmpeg
```
displays correctly "Mach-O 64-bit executable x86_64"
rebuilding for another arch:
```
npm rebuild --arch=arm64 -f ffmpeg-static
file node_modules/ffmpeg-static/ffmpeg
```
still shows "Mach-O 64-bit executable x86_64"
but removing the binary and rebuilding
```
rm node_modules/ffmpeg-static/ffmpeg
npm rebuild --arch=arm64 -f ffmpeg-static
file node_modules/ffmpeg-static/ffmpeg
```
shows correctly "Mach-O 64-bit executable arm64"

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.