itinance / itinance/react-native-fs

Size limit with copyAssetsVideoIOS

Open
#960 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Hi everyone,
I'm using this functions copyAssetsVideoIOS to import file from ios using ph Adress.
Overall it's working well as it's also managing icloud Video, thanks for that !
But i notice a problem on really big file, it directly send back the Promise with the url, and is not waiting for the copy past to be done.
I tried with a 1gb file it's working ok, but with a 7gb file it's not. It work on simulator though but not on real device.
I there a file limite to this function, that may has to do with the RAM of the device ?

The code i use :
```javascript
const url = await RNFS.copyAssetsVideoIOS(
`assets-library://asset/asset.${'mov'}?id=${appleVideoID}&ext=${'mov'}`,
savePath,
);
console.log(url)
```

For the 1gb file it take a bit of time (not long though) to log the path and the import work correctly, but for the 7gb file it directly log the path, but when i try to read the video i have an error that say file is invalid.

![image](https://user-images.githubusercontent.com/16646581/100088936-3583f080-2e51-11eb-9309-1dd2d1273906.png)

The error on the console here is because i'm trying to generate thumbnails from the videos but the file is corrupted.

Anyone would have an idea why i encounter this issue, and how to solve it ?

EDIT: logs from ios :
![image](https://user-images.githubusercontent.com/16646581/100120847-b4405400-2e78-11eb-8c24-bc934bf26772.png)

look like the main thread is overloaded from research on internet. Is there a way to do it using multiple thread in a simple manner ?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.