i am using FFMPEG library to compress video and able to achieve a normal quality also. But if i try improving the resolution, compression time increases. The output should be such where a standard video output is achieved, along with very high quality video, maintaining the aspect ratio as well. Below is the code i am using, please suggest me ways to improvise this. Help is appreciated. Thanks
MediaModifierTypes.VIDEO_COMPRESS -> return arrayOf(
"-y",
"-i",
videoPath,
"-vf",
"scale=1280:-1",
"-vcodec",
"mpeg4",
"-b:v",
"2M",
"-b:a",
"48000",
outputFilePath
)