-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[馃悰] launchImageLibrary promise takes too long to return video result on iOS. #2117
Comments
Picking Large Videos results in app crash also in android, and takes a lot of time on iOS (feels like app is stuck) > what's the best way to handle considering memory issues @Johan-dutoit @marcshilling @ravirajn22 Picker version > 5.3.1 So what I see is after picking the video from device, it gets copied to app storage (temp storage) which increases the size of the app also and might lead to uncertain crashes once device is close to full memory.. Any suggestions how to handle these ? Youtube's size doesn't increase after picking, wonder how they do it.. |
I have also faced this issue for the past few months. The function launchImageLibrary() works relatively quick for any video < 500mb, but for larger file sizes, it can take upwards of 15min to get the function to finish running! Has anyone found a workaround for getting large video URI's in react native? |
I'm trying to use UIimagepickercontroller in swift directly and it plays the recording in a second screen after picking .. and once it's picked , in the second screen there is a progress loader of the video being processed/compressed .. I see a fn mapVideoToAsset being called here > https://github1s.com/react-native-image-picker/react-native-image-picker/blob/HEAD/ios/ImagePickerManager.mm#L230 Assuming the video file is first being ready from phone storage and been copied to App's temp storage which also increases the app size also and brings in a delay to process the Video so we don't the callback response until then .. Any suggestions ? ps: I get app crashes on android when video size is above 400-500 MB .. with memory exceptions.. How does youtube handle picking of such huge size video's so smoothly ? |
found out a config which helped .. my swift module >
|
Seems like a good idea! |
Any workaround for picking and playing large videos on android ? Image Picker becomes very slow making the app unresponsive and crashes sometime or if i get result after the wait, React native video on exoPlayer throws outOfMemory issues for large videos.. Let me know if you have any experience in this @Johan-dutoit @marcshilling @cobarx @c-moyer @freeboub |
Can you post an example of your react native code please? |
@Johan-dutoit @ratz6 would #2083 be what's needed here? |
@dwosk yes it solved the long wait time while picking videos for iOS. thanks, to point out the PR :) |
Changes merged. Closing for now. |
What value of |
@ratz6 solution worked in my case. Thanks man, you saved my day. |
@viniciusaugutisps what is the file type and file size ? So the time comes in 2 cases :
You can also try out with a custom swift module pasted above, that should do the work |
@ratz6 the file I'm trying to upload is a 54mb hevc video and it takes about 20 seconds for the image picker callback to return and for me to be able to include a loading for the user. |
I think this issue isn't completely solved. When user picks a video which is in iCloud, it will still take a long time for the picker promise to respond. |
I had trouble uploading a MOV video, which took a long time to convert to MP4. |
No description provided.
The text was updated successfully, but these errors were encountered: