How to use my custom building?
Hi, sorry for being a noob.
I've managed to build my own "ios" FFmpeg Building by following the documentation.
What I couldn't find was how do I use the "prebuit" files and folders now? I'm using ffmpeg-kit in Flutter and couldn't find where to paste folders such as "apple-ios-arm64" etc that were generated by the building script.
Thanks for the help!
These steps should work:
- Clone
ffmpeg-kitproject repository - Go inside the
flutter/flutterfolder and edit the ffmpeg_kit_flutter.podspec file - What you must do in
ffmpeg_kit_flutter.podspecis to tell cocoapods not to downloadffmpeg-kit-iospackages and use your local copy. There are different ways to do that
- You can create a new subspec and change the default subspec to do that new one
- Or modify the entries in the default subspec, delete the
ffmpeg-kit-iosdependency and add your local dependency there - Or delete all subspecs and add your local dependency to the file
- Project Layout wiki lists the type of outputs we have under the
prebuiltdirectory. Files (frameworks) you need to use are under thebundle-apple-xcframework-iosfolder. You must give full paths of them when defining the dependency or put into a place wherecocoapodscan access them - I'm not exactly sure about the latest
Podspecsyntax to define a local dependency. There are posts like this on Stackoverflow. Try the suggestions given there please - Update your
pubspec.yamlto loadffmpeg_kit_flutterfrom the localffmpeg-kitrepository you just modified.
Thanks a lot, @tanersener
By the way, my main goal is to use the "rubberband" effect only. Is there an easy way to get it with the flutter package on pub etc with "rubberband" enabled (GPL) instead of making custom buildings?
I've tried using the full_gpl but still throws No such filter: 'rubberband'
No, none of the ffmpeg-kit packages include rubberband inside. See Packages.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
These steps should work:
- Clone
ffmpeg-kitproject repository- Go inside the
flutter/flutterfolder and edit the ffmpeg_kit_flutter.podspec file- What you must do in
ffmpeg_kit_flutter.podspecis to tell cocoapods not to downloadffmpeg-kit-iospackages and use your local copy. There are different ways to do that
- You can create a new subspec and change the default subspec to do that new one
- Or modify the entries in the default subspec, delete the
ffmpeg-kit-iosdependency and add your local dependency there- Or delete all subspecs and add your local dependency to the file
- Project Layout wiki lists the type of outputs we have under the
prebuiltdirectory. Files (frameworks) you need to use are under thebundle-apple-xcframework-iosfolder. You must give full paths of them when defining the dependency or put into a place wherecocoapodscan access them- I'm not exactly sure about the latest
Podspecsyntax to define a local dependency. There are posts like this on Stackoverflow. Try the suggestions given there please- Update your
pubspec.yamlto loadffmpeg_kit_flutterfrom the localffmpeg-kitrepository you just modified.
Can you please explain steps to do so for flutter android?
@tanersener have you gotten custom builds working with flutter or react-native before?
I am able to do the build but can't figure out how to add the local frameworks in bundle-apple-xcframework-ios as dependencies to ffmpeg-kit-react-native.podspec.
I tried the link in your step 5 above but couldn't get it to pick up the xcframework files.
I managed to get it to work using this:
s.subspec 'ffmpeg-kit-ios-custom' do |ss|
ss.source_files = '**/FFmpegKitReactNativeModule.m',
'**/FFmpegKitReactNativeModule.h', 'bundle-apple-xcframework-ios/**/*.{h,m,swift}'
ss.vendored_frameworks = 'bundle-apple-xcframework-ios/ffmpegkit.xcframework',
'bundle-apple-xcframework-ios/libavcodec.xcframework',
'bundle-apple-xcframework-ios/libavdevice.xcframework',
'bundle-apple-xcframework-ios/libavfilter.xcframework',
'bundle-apple-xcframework-ios/libavformat.xcframework',
'bundle-apple-xcframework-ios/libavutil.xcframework',
'bundle-apple-xcframework-ios/libswresample.xcframework',
'bundle-apple-xcframework-ios/libswscale.xcframework'
ss.ios.deployment_target = '12.1'
end
You must copy/symlink bundle-apple-xcframework-ios to the same dir as the podspec.
@superandrew213 Your vendored_frameworks solution is more local compared to what we do. We zip the frameworks and put them under a web server. Then reference them in a separate podspec file.