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
The earlier answer correctly explains the problem you are hitting. This is also an open issue raised last September, discussed on the forum of the library you are using (from what I can see in the stack trace).
The solution to compile for SDK 29 would be to stop putting binaries in the /data/ directory, and ensure they are in the native libs directory. That can't be achieved after the APK is installed and unpacked on non-rooted devices, and so should be done correctly when preparing the Android project (e.g. through gradle settings), and to make sure that upon installation the contents get properly unpacked: android:extractNativeLibs=true
.
In your case, this code moves binaries that are packaged as 'assets' into the users data directory:
https://github.com/WritingMinds/ffmpeg-android-java/blob/master/FFmpegAndroid/src/main/java/com/github/hiteshsondhi88/libffmpeg/FileUtils.java
That's a security concern running any executables in a location that is read/writeable. That source code I linked to above would need to be removed, instead, the native binaries packaged in /libs. The change is more secure as the /libs location inside your apps install directory is executable but not writable.
In summary, the 3rd party lib needs to address it, or you could do it and contribute a pull request. Or fork your own and recompile it for yourself.
There's still a problem, if your app actually downloads content after it is installed, and expects to execute any downloads. That's now impossible as far as I can tell in Android 10.
The future-proof solution is to stop using external binaries, and to compile the dependencies as NDK projects. They will need jni wrappers around native code (a bit of work). There is a related project I know of you could look into.