arthenica / ffmpeg-kit

FFmpeg Kit for applications. Supports Android, Flutter, iOS, Linux, macOS, React Native and tvOS. Supersedes MobileFFmpeg, flutter_ffmpeg and react-native-ffmpeg.
https://arthenica.github.io/ffmpeg-kit
GNU Lesser General Public License v3.0
4.29k stars 578 forks source link

ffmpeg is always rebuilt #1015

Open TLescoatTFX opened 1 month ago

TLescoatTFX commented 1 month ago

Description Using ./ios.sh, ffmpeg is always rebuilt. Scenario: run twice the exact same command. This adds at least 1 min per build

Expected behavior

> ./ios.sh --disable-armv7 --disable-armv7s --disable-arm64-simulator --disable-arm64-mac-catalyst --disable-arm64e --disable-i386 --disable-x86-64 --disable-x86-64-mac-catalyst --enable-openh264 -x

Building ffmpeg-kit shared library for iOS

Architectures: arm64
Libraries: openh264

Downloading sources: ok

Building arm64 platform targeting iOS SDK 12.1 and Mac Catalyst 14.0

openh264: already built

ffmpeg: ok

ffmpeg-kit: ok

Creating xcframeworks under prebuilt: ok

> ./ios.sh --disable-armv7 --disable-armv7s --disable-arm64-simulator --disable-arm64-mac-catalyst --disable-arm64e --disable-i386 --disable-x86-64 --disable-x86-64-mac-catalyst --enable-openh264 -x

Building ffmpeg-kit shared library for iOS

Architectures: arm64
Libraries: openh264

Downloading sources: ok

Building arm64 platform targeting iOS SDK 12.1 and Mac Catalyst 14.0

openh264: already built

ffmpeg: already built

ffmpeg-kit: already built

Creating xcframeworks under prebuilt: already built

Note the already built that I expect to see

Current behavior

> ./ios.sh --disable-armv7 --disable-armv7s --disable-arm64-simulator --disable-arm64-mac-catalyst --disable-arm64e --disable-i386 --disable-x86-64 --disable-x86-64-mac-catalyst --enable-openh264 -x

Building ffmpeg-kit shared library for iOS

Architectures: arm64
Libraries: openh264

Downloading sources: ok

Building arm64 platform targeting iOS SDK 12.1 and Mac Catalyst 14.0

openh264: already built

ffmpeg: ok

ffmpeg-kit: ok

Creating xcframeworks under prebuilt: ok

> ./ios.sh --disable-armv7 --disable-armv7s --disable-arm64-simulator --disable-arm64-mac-catalyst --disable-arm64e --disable-i386 --disable-x86-64 --disable-x86-64-mac-catalyst --enable-openh264 -x

Building ffmpeg-kit shared library for iOS

Architectures: arm64
Libraries: openh264

Downloading sources: ok

Building arm64 platform targeting iOS SDK 12.1 and Mac Catalyst 14.0

openh264: already built

ffmpeg: ok

ffmpeg-kit: ok

Creating xcframeworks under prebuilt: ok

Note the ok instead of already built

To Reproduce Run the same command twice

Screenshots N/A

Logs N/A

Environment

lxhlzyh commented 1 month ago

Shell behavior, see: https://github.com/arthenica/ffmpeg-kit/blob/e78b7956c7efd76e61930d9b3571773804c30565/scripts/main-ios.sh#L212

TLescoatTFX commented 1 week ago

I see, but I would actually prefer it to behave exactly like the custom libraries: build if not present, else do not rebuild. I do not want to set SKIP_ffmpeg manually (this is the job of the shell script, I do not want to replicate some logic outside of it)