5
votes

I am using the FFMPEG library to get a watermark stamp on video. It is working like charm in all versions when my project's target SDK version is 28 but when i set target sdk version 29, It gives me below exception.

E/FFmpeg: Exception while trying to run: [Ljava.lang.java.io.IOException: Cannot "/data/user/0/com.videowatermark.addtextandtimestampongalleryvideos/files/ffmpeg": error=13, Permission denied

Caused by: java.io.IOException: error=13, Permission denied at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(UNIXProcess.java:133) at java.lang.ProcessImpl.start(ProcessImpl.java:141) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) at java.lang.Runtime.exec(Runtime.java:698) at java.lang.Runtime.exec(Runtime.java:563) at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10) at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38) at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10) at android.os.AsyncTask$3.call(AsyncTask.java:378) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919)

//show this error

1
When this error is coming? i mean on which operation?iDroid
when I select video for stamping process & than FFMPEG command passed it gives exception.SAVALIYA REENA
Have you checked that you are getting video uri ? Possible problem is of FileProvider. Have you defined File Provider in manifest?iDroid
Yes i checked,I am getting Video URI, I am facing issue with only Android Q.SAVALIYA REENA
There is no Official Document for it.Vinesh Chauhan

1 Answers

0
votes

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

Details in the following link

Unfortunately I did not find a solution to the problem.