permission is denied using Android Q ffmpeg": error=13, Permission denied

后端 未结 5 2337
逝去的感伤
逝去的感伤 2020-12-28 15:24

I want to get the frames from the RTSP video using ffmpeg. But for android 10 above I am getting error as below.

 E/FFmpeg: Exception while trying to run: [L         


        
5条回答
  •  不知归路
    2020-12-28 16:13

    Based on the answer by @Saurabh Thorat, I made a pull request which fixes the problem. You can find it here.

    Quick summary:

    Moved ffmpeg binary to the libs folder and added android:extractNativeLibs = "true" to the manifest so it can copy itself into /data/app/{package_name}/lib/{arch}/ and then execute it from there (which is supported on Android 10).

    EDIT (for general use): In order for the executable files to be copied into /data/app/{package_name}/lib/{arch}/, the file names have to be lib(something).so. If the names don't start with lib and end with .so, they won't be copied.

提交回复
热议问题