tanersener / react-native-ffmpeg

FFmpeg for react-native. Not maintained anymore. Superseded by FFmpegKit.
GNU General Public License v3.0
400 stars 51 forks source link

Android Permission denied #240

Closed Richi2293 closed 2 years ago

Richi2293 commented 3 years ago

Description I am trying to start the function "getMediaInformation" but it keeps giving me this error: "Permission denied".

Expected behavior It should give me the result of the informations given the path of the input video.

Current behavior It goes in error telling me "Permission denied"

Logs https://ghostbin.co/paste/77qo

Environment

Other

tanersener commented 3 years ago

Try setting requestLegacyExternalStorage to true as explained in Android storage use cases and best practices.

Richi2293 commented 3 years ago

Okok I'll try to put that setting, but from what I understand it is a temporary solution because then on devices running Android 11 the problem will recur, right? Do you have a library update in mind or will I have to do something myself? Just to get an idea, thank you so much for the super fast response :)

tanersener commented 3 years ago

Yes, there is an update in the parent native library about scoped storage. I plan to use that feature for API Level 30 (Android 11).

Richi2293 commented 3 years ago

I confirm that it now works correctly! Thanks so much! Okok sounds great to me, thank you very much for your effort :)

qburst-subins commented 3 years ago

Yes, there is an update in the parent native library about scoped storage. I plan to use that feature for API Level 30 (Android 11).

Any updates on this?

eliottguillaumin commented 3 years ago

Yes, there is an update in the parent native library about scoped storage. I plan to use that feature for API Level 30 (Android 11).

bump Still no way to use the SAF with RNFFmpeg on Android 11, would there be an easy way to implement a function like the one on this page ?

tanersener commented 3 years ago

@eliottguillaumin I'm working on it but I couldn't find a stable widget for react-native to open files from Photos/Gallery yet. Tried react-native-image-picker but it has issues for videos.

eliottguillaumin commented 3 years ago

Thanks for getting back, I'll submit a small bounty for this issue because you are doing God's work man! Our app is a video editing app that needs to be able to run FFMpeg and FFprobe commands on files stored on OTG storage without copying them to internal storage so currently Android 11 support is not really possible as it stands but thanks to your library we're able to do all sorts of things with video.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.