[Question] How to know which library to include
arbile26 opened this issue · 2 comments
arbile26 commented
My APK size is so big, I want to reduce its size but to be honest I don't know which libraries to include and which libraries to exclude.
These are my FFMPEG commands:
String encoding = "-q:v 0 -vcodec mpeg4 -r 20 -y";
String drawText = "-vf \"subtitles=${subs.path}:force_style='Fontsize=35\"";
_flutterFFmpeg
.execute(
"-ss $startDuration -i $videoStreamUrl -t $endDuration $drawText $encoding ${dir.path}/$outputFileName");
String firstVideo =
"-i ${videoURL}";
String secondVideo =
"-i ${videoURL}";
String scale = "h";
String mainVideoPosition = "[a][d]overlay=${o.dx}:${o.dy}";
String encoding = "-map \"[dd]\" -q:v 0 -vcodec mpeg4 -r 20 -y";
String firstVideoLooping = controller.loopCounts[0] >= 2
? "-stream_loop ${controller.loopCounts[0] - 1} "
: "";
String secondVideoLooping = controller.loopCounts[1] >= 2
? "-stream_loop ${controller.loopCounts[1] - 1} "
: "";
String videoConcat = "[b][1:a][c][2:a]concat=n=2:v=1:a=1[d][dd]";
String outputFile = "${renderedVideosDir.path}/$outputFileName";
_flutterFFmpeg
.execute(
"$backgroudImage $firstVideoLooping$firstVideo $secondVideoLooping$secondVideo -filter_complex \"$backgroundScale;[1]$scale[b];[2]$scale[c];$videoConcat;$mainVideoPosition\" $encoding $outputFile");
I hope to know the libraries I need to include and how to include them in order to reduce APK size.
gOzaru commented
Read 2.1.1 Android
You need to use the LTS package and choose it from below.
The library packages are in 2.1 Packages
Example:
ext {
flutterFFmpegPackage = "<https-lts>"
}
tanersener commented
We are retiring the project. Please consider switching to FFmpegKit.