Closed JeanPSF closed 3 months ago
This issue is stale because it has been open for 7 days with no activity.
Some more context, the delay to load the file is due to compression, but even setting allowCompression to false, it still compres when we allow multiple files, right now i am only allowing a single file to be picked at time, but it would be nice to allow multiple files without compressions, at least when the noData flag is set, since the noData flag doesn't return the byte array copy of the video anyway.
Some more context of my use case, i am trying to select multiple videos with the noData flag (it would be nice to NOT compress, but right now for multiple selection it always compress), so i can upload to a server from the directory reference.
This issue is stale because it has been open for 7 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Before creating an issue, make sure that you are on the latest
file_picker
version and that there aren't already any similar opened inssues. Also, check if it isn't described on the Wiki, specially on Troubleshooting page.Also, sometimes a simple
flutter clean
andflutter build
again with latest file_picker version, may end up by fixing cached issues, so I encourage you to first do so.Describe the bug FilePicker is extremely slow when selecting a HEVC file from iPhone Gallery (Photos app).
Platform
Platform OS version What version did it happen? 17.5.1 How are you picking?
Details to reproduce the issue 1 - IPhone camera configuration: 1.1 - Settings > Camera > Formats > Select 'High Efficiency' 1.2 - Record a video from native Camera app with following config 1.2.1 - 60 fps 1.2.2 - 4k 1.2.3 - make sure HDR is disabled 1.3 - expected result should be a video on gallery with the HEVC codec. 1.4 - from the app, select that video, it will take longer to cache the video compared with other codecs.
Error Log No error.
Flutter Version details Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.19.1, on macOS 14.5 23F79 darwin-arm64, locale en-BR) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.4) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] VS Code (version 1.90.2) [✓] Connected device (3 available) ! Error: Browsing on the local area network for Jean Paulo’s Apple Watch. Ensure the device is unlocked and discoverable via Bluetooth. (code -27) [✓] Network resources
• No issues found! Additional context
It is not a 'bug', it is just a not expected behavior that stands out, here is the full context:
I work for a company which has an app that receives lots of image,pdf and video uploads, we constantly use FilePicker to receive 5GB+ videos and FilePicker almost instantly load them in memory from the iPhone library, but, when the user select a HEVC video, videos with around 200MB is enough for the await to take almost an entire minute. Users are usually okay waiting a while as the amount in GB's grows when the pick files, but they find it weird that 200-500MB videos takes way longer than 5GB videos and usually assume something went wrong before we receive the file.
Just to make sure i am being clear, selecting a HEVC file on the file picker, makes it slow compared with when no HEVC files are picked. Even if the amount of bytes from a non HEVC batch of picked files is higher, the HEVC will take longer.
One observation from my tests: If we download the HEVC video from the gallery into the iPhone Files, change video format to .any and try to select the same video from the FIles, is has no delay, it will instant load the video in memory like expected, which makes me think that the problem is picking files from the Photos app.
Also, downloading the file from iCloud and making sure that it is available locally, do not solve the slowlyness.
Appreciate the attention and any help understanding the problem, even if it is not fixable.