LTS difference
pubspec.yaml
LTS is compatible with lower Android and iOS versions,
details: https://github.com/arthenica/ffmpeg-kit/wiki/LTS-Releases
ffmpeg_kit_flutter: 5.1.0-LTS
或者
ffmpeg_kit_flutter: 5.1.0
Note: Android SDK24 means that if Android 7
uses a non-LTS version, it may prompt that the minimum sdk version
android\app\build.gradle needs to be modified.
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.dict"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
minSdkVersion 20
}
Just change the last line 20 to 24
path
The official example uses a relative path. It is not sure which path the relative path is relative to on the mobile terminal.
The test can directly use the absolute path.
FFmpegKit.execute('-i /storage/emulated/0/Android/data/com.example.dict/files/95635.spx -y /storage/emulated/0/Android/data/com.example.dict/files/95635.mp3');
Print log, prompting that there is no decoder
(1) This plug-in is officially divided into 8 versions.
Details:
https://github.com/arthenica/ffmpeg-kit/wiki/Packages
Different versions have different codecs.
(2) When using "full- gpl", please change
the pubspec.yaml
to note that the horizontal lines in "full-gpl" should be changed to underlines.
ffmpeg_kit_flutter_full_gpl: 5.1.0
Imported files also need to be modified
import 'package:ffmpeg_kit_flutter_full_gpl/ffmpeg_kit.dart';
For specific command line usage, you can search ffmpeg command line
The basic use of this extension is basically the same as the command line method of the PC version.