-1

I am trying to compress the videos in android programmatically using this library https://github.com/jczmdeveloper/XCVideoCompressor It's working fine till android 9, but on android 10 it's giving error

Please help me with video compression in android

2 Answers2

0

Android Api 29 and above Removed execute permission for app home directory. Apps that target Android 10 cannot invoke exec() on files within the app's home directory

See on this link

Unfortunately I did not find a solution to the problem.

Moti
  • 462
  • 2
  • 6
  • 18
0

You can use this library

implementation 'com.arthenica:mobile-ffmpeg-full-gpl:4.2.2.LTS'

and 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