We can compress video using ffmpeg in android.
To integrate FFmpeg into android, we can use pre-compiled libraries like ffmpeg-android .
You can use the command below to compress the video
String[] command = {"-y", "-i", inputFileAbsolutePath, "-s", "160x120", "-r", "25", "-vcodec", "mpeg4", "-b:v", "150k", "-b:a", "48000", "-ac", "2", "-ar", "22050", outputFileAbsolutePath};
Here
-y
Overwrite output files without request.
-i
ffmpeg "", -i
-s
-r
-vcodec
.
-b: v
-b:
-ac
.
-ar
,
ffmpeg android , ffmpeg video editor tutorial , ffmpeg -
https://androidlearnersite.wordpress.com/2017/03/17/ffmpeg-video-editor/