-
-
Notifications
You must be signed in to change notification settings - Fork 33
Description
❗ FFmpeg library conflict between react-native-audio-api (FFmpeg 7) and ffmpeg-kit-react-native (FFmpeg 6)
Hi,
First of all, thank you for the work on react-native-audio-api — this issue appears when I use your library together with ffmpeg-kit-react-native.
I'm trying to use react-native-audio-api alongside ffmpeg-kit-react-native, but since 2025 the official ffmpeg-kit binaries are no longer available, I downloaded alternative binaries from another repository, following these resources:
- https://medium.com/@nooruddinlakhani/resolved-ffmpegkit-retirement-issue-in-react-native-a-complete-guide-0f54b113b390
- https://gist.github.com/tobobo/c251ddefcba8b97ec8f44fca57fb281e
I created a minimal repo that reproduces the behavior:
👉 https://github.com/RemyNtshaykolo/react-native-audo-api-ffmpeg
🧪 How to reproduce
On branch ffmpeg-lib-conflict, run:
yarn
yarn pc # prebuild
yarn i-17 # install on iPhone 17 simulator💥 Error during prebuild (pod install)
I get the following CocoaPods conflict:
The 'Pods-reactnativeaudioapiffmpeg' target has frameworks with conflicting names:
libavcodec.xcframework, libavformat.xcframework, libavutil.xcframework, libswresample.xcframework
This happens because:
- react-native-audio-api includes FFmpeg 7 xcframeworks
- ffmpeg-kit-react-native includes FFmpeg 6 xcframeworks with the same names
Both libraries try to provide identically named FFmpeg frameworks → CocoaPods detects conflicting frameworks.
🛠️ Attempted fix
I did not modify anything inside react-native-audio-api itself.
Instead, on another branch (ffmpeg-lib-update), I edited the ffmpeg-kit-plugin.js script used by ffmpeg-kit-react-native, which patches the ffmpeg-kit podspec, and removed the overlapping FFmpeg 6 frameworks there:
s.vendored_frameworks = [
'ffmpeg-kit-ios-full-gpl-latest/.../libswscale.xcframework',
- 'ffmpeg-kit-ios-full-gpl-latest/.../libswresample.xcframework',
- 'ffmpeg-kit-ios-full-gpl-latest/.../libavutil.xcframework',
- 'ffmpeg-kit-ios-full-gpl-latest/.../libavformat.xcframework',
'ffmpeg-kit-ios-full-gpl-latest/.../libavfilter.xcframework',
'ffmpeg-kit-ios-full-gpl-latest/.../libavdevice.xcframework',
- 'ffmpeg-kit-ios-full-gpl-latest/.../libavcodec.xcframework',
'ffmpeg-kit-ios-full-gpl-latest/.../ffmpegkit.xcframework'
]Then:
yarn
yarn pc
yarn i-17→ Pod install succeeds and the project builds.
❌ But the app crashes on launch
When I open the app on iOS, it immediately crashes:
Symbol not found: _av_opt_set_chlayout
Referenced from: .../reactnativeaudioapiffmpeg.debug.dylib
Expected in: .../Frameworks/libavfilter.framework/libavfilter
🔍 Root cause (as far as I understand)
react-native-audio-apibundles FFmpeg 7.xffmpeg-kit-react-nativeis built on FFmpeg 6.0
By removing some of the FFmpeg 6 libraries from the ffmpeg-kit podspec:
ffmpeg-kit-react-nativeends up being linked at runtime against the FFmpeg 7 frameworks provided byreact-native-audio-api- FFmpeg 7 introduces breaking API changes (e.g.
_av_opt_set_chlayout) compared to FFmpeg 6
→ some symbols expected by ffmpeg-kit are missing in the FFmpeg 7 libs
→ runtime crash at app startup
❓ Question
Since react-native-audio-api uses FFmpeg under the hood, I’d like to know if you have already run into this kind of situation when:
- using
react-native-audio-apitogether withffmpeg-kit-react-native, or - combining
react-native-audio-apiwith another library that also ships its own FFmpeg frameworks.
More specifically:
- Have you ever seen this FFmpeg version conflict before with
react-native-audio-api+ffmpeg-kit-react-native?- If yes, how did you (or other users) resolve it?
- If not, do you have any idea or recommendation on how this could be solved?
Any guidance or suggestions would be greatly appreciated