0

I am recording video using camera intent and getting displaying it in a videiview. Now i want to upload it, But it is very big in size. I want to compress it using FFMPEG as I found the many article and in SO also, but i didn't find any clear article with codes.

Can anyone help me with ffmpeg code ? Is there any other way to do it in android ? Thanks in advance.

2 Answers2

0

You can use this command:

-b:v 5000k -minrate 5000k -maxrate 5000k -pix_fmt yuv420p -ab 48000 -ac 2 -ar 22050 -preset superfast
Ivan Aracki
  • 4,861
  • 11
  • 59
  • 73
Ashish Virani
  • 182
  • 1
  • 15
0

Use this command

String cmd = "-y -i " + oldPath + " -c:a copy -r 30 -vcodec libx264 -crf 28 -preset ultrafast " + newFile.getPath();
Priyanka Singhal
  • 243
  • 1
  • 4
  • 20