Skip to content

[image_picker] Extremely slow video selection with MOV format on iOS devices and Simulator #176355

Closed
flutter/packages
#10559

Description

@Harunn33

Extremely slow video selection with MOV format on iOS devices and Simulator

Description

Video selection is extremely slow (10-30+ seconds) when picking MOV format videos on iOS (both physical devices and Simulator) using image_picker. The same videos load instantly with file_picker. This issue does not occur on Android devices.

Steps to Reproduce

  1. Use image_picker to pick a video from gallery on iOS (device or Simulator)
  2. Select a video in MOV format (typically recorded with iPhone camera)
  3. Observe the loading time

Code sample:

import 'package:image_picker/image_picker.dart';

final ImagePicker picker = ImagePicker();
final XFile? video = await picker.pickVideo(
  source: ImageSource.gallery,
);
// Takes 10-30+ seconds to return on iOS with MOV files

Expected results

  • Video selection should complete within 1-2 seconds
  • User should be able to select MOV format videos without noticeable delay
  • Performance should be consistent across platforms
  • The behavior should match file_picker package performance with the same MOV files

Actual results

  • Video selection takes 10-30+ seconds when picking MOV format videos on iOS
  • The app appears frozen/unresponsive during this time with no loading indicator
  • iOS Simulator: Same delay issue (10-30+ seconds)
  • Physical iOS devices: Same delay issue (10-30+ seconds)
  • Android devices: Works fine, no delay
  • Same MOV files with file_picker: Loads instantly (under 1 second)

Code sample

import 'package:image_picker/image_picker.dart';

final ImagePicker picker = ImagePicker();
final XFile? video = await picker.pickVideo(
  source: ImageSource.gallery,
);
// Takes 10-30+ seconds to return on iOS with MOV files

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.32.5, on macOS 15.5 24F74 darwin-arm64, locale en-TR)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2025.1)
[✓] VS Code (version 1.104.2)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!

Additional Information

  • Package versions:
    • image_picker: 1.2.0
    • image_picker_ios: 0.0.1
  • Tested on:
    • iPhone 16 Pro Max (Simulator) - iOS 18.5
    • iPhone 15 Pro Max (Physical device) - iOS 26

Comparison with file_picker

The same MOV files can be selected instantly (< 1 second) using the file_picker package, suggesting this might be related to how image_picker processes or validates video files on iOS.

Activity

  1. danagbemava-nc commented on Oct 2, 2025

    @danagbemava-nc
    Member

    Hi @Harunn33, does this happen with every file regardless of the size of the video?

    Also,

    • What version of image_picker & image_picker_ios are you using?
    • What version of iOS is the device you're using running? & What device are you using?
  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 2, 2025
  3. Harunn33 commented on Oct 2, 2025

    @Harunn33
    Author

    Hi @danagbemava-nc , Yes, it happens with MOV format regardless of the video size.

    Versions:
    image_picker: 1.2.0
    image_picker_ios: 0.0.1

    Tested on:
    iPhone 16 Pro Max (Simulator) - iOS 18.5
    iPhone 15 Pro Max (Physical device) - iOS 26

    The issue occurs on both simulator and physical device.

  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 2, 2025
  5. danagbemava-nc commented on Oct 3, 2025

    @danagbemava-nc
    Member

    Hi @Harunn33, kindly update your issue description. In your comment above you state that the issue is on physical devices and simulators but in the issue description, you state that it is only physical devices. It's not exactly clear which is correct

  6. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 3, 2025
  7. Harunn33 commented on Oct 3, 2025

    @Harunn33
    Author

    Hi @danagbemava-nc , thank you for feedback. I updated my issue description.

  8. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 3, 2025
  9. changed the title [-]Extremely slow video selection for MOV files on physical devices (10-30s delay)[/-] [+]Extremely slow video selection with MOV format on iOS devices and Simulator[/+] on Oct 3, 2025
  10. danagbemava-nc commented on Oct 6, 2025

    @danagbemava-nc
    Member

    Reproducible on the latest stable/master with the latest version of the plugins. I used the code sample below which allows picking an image with either file/image picker and the processing times for both were very different. I tested on an iPhone 16 Pro Max and the results were the same on that device too. File picker usually took a few seconds while image_picker took 10s sometimes 100s of seconds.

    Simulator.Screen.Recording.-.iPhone.17.Pro.-.2025-10-06.at.08.18.15.mov
    code sample
    import 'dart:io';
    import 'package:flutter/material.dart';
    import 'package:file_picker/file_picker.dart';
    import 'package:image_picker/image_picker.dart';
    import 'package:video_player/video_player.dart';
    
    void main() {
      runApp(const MyApp());
    }
    
    class MyApp extends StatelessWidget {
      const MyApp({super.key});
    
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: 'Video Picker Demo',
          theme: ThemeData(primarySwatch: Colors.blue),
          home: const VideoPickerScreen(),
        );
      }
    }
    
    class VideoPickerScreen extends StatefulWidget {
      const VideoPickerScreen({super.key});
    
      @override
      _VideoPickerScreenState createState() => _VideoPickerScreenState();
    }
    
    class _VideoPickerScreenState extends State<VideoPickerScreen> {
      File? _videoFile;
      VideoPlayerController? _videoPlayerController;
      final ImagePicker _imagePicker = ImagePicker();
      String _processingTime = '';
    
      @override
      void dispose() {
        _videoPlayerController?.dispose();
        super.dispose();
      }
    
      /// Clears the currently selected video and its player controller.
      void _clearVideo() {
        setState(() {
          _videoFile = null;
          _videoPlayerController?.dispose();
          _videoPlayerController = null;
          _processingTime = '';
        });
      }
    
      /// Picks a video using the image_picker package.
      Future<void> _pickVideoWithImagePicker() async {
        _clearVideo();
        final stopwatch = Stopwatch()..start();
    
        final XFile? pickedFile = await _imagePicker.pickVideo(source: ImageSource.gallery);
    
        if (pickedFile != null) {
          final File file = File(pickedFile.path);
          _videoFile = file;
    
          _videoPlayerController = VideoPlayerController.file(_videoFile!)
            ..initialize().then((_) {
              stopwatch.stop();
              setState(() {
                _videoPlayerController!.play();
                _processingTime =
                    'ImagePicker processing time: ${(stopwatch.elapsedMilliseconds / 1000).toStringAsFixed(2)} seconds';
              });
            });
        }
      }
    
      /// Picks a video using the file_picker package.
      Future<void> _pickVideoWithFilePicker() async {
        _clearVideo();
        final stopwatch = Stopwatch()..start();
    
        FilePickerResult? result = await FilePicker.platform.pickFiles(type: FileType.video, allowMultiple: false);
    
        if (result != null && result.files.isNotEmpty) {
          final File file = File(result.files.single.path!);
          _videoFile = file;
    
          _videoPlayerController = VideoPlayerController.file(_videoFile!)
            ..initialize().then((_) {
              stopwatch.stop();
              setState(() {
                _videoPlayerController!.play();
                _processingTime =
                    'FilePicker processing time: ${(stopwatch.elapsedMilliseconds / 1000).toStringAsFixed(2)} seconds';
              });
            });
        }
      }
    
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          appBar: AppBar(title: const Text('Video Picker Demo')),
          body: Center(
            child: Padding(
              padding: const EdgeInsets.all(16.0),
              child: SingleChildScrollView(
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                    if (_videoFile != null && _videoPlayerController != null && _videoPlayerController!.value.isInitialized)
                      AspectRatio(
                        aspectRatio: _videoPlayerController!.value.aspectRatio,
                        child: VideoPlayer(_videoPlayerController!),
                      )
                    else if (_videoFile != null)
                      const CircularProgressIndicator()
                    else
                      const Text('No video selected.', style: TextStyle(fontSize: 18)),
                    const SizedBox(height: 20),
                    Text(_processingTime, style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
                    const SizedBox(height: 20),
                    ElevatedButton.icon(
                      onPressed: _pickVideoWithImagePicker,
                      icon: const Icon(Icons.video_library),
                      label: const Text('Pick Video with ImagePicker'),
                    ),
                    const SizedBox(height: 10),
                    ElevatedButton.icon(
                      onPressed: _pickVideoWithFilePicker,
                      icon: const Icon(Icons.folder_open),
                      label: const Text('Pick Video with FilePicker'),
                    ),
                    const SizedBox(height: 10),
                    if (_videoFile != null)
                      ElevatedButton.icon(
                        onPressed: _clearVideo,
                        icon: const Icon(Icons.clear),
                        label: const Text('Clear Video'),
                        style: ElevatedButton.styleFrom(backgroundColor: Colors.red),
                      ),
                  ],
                ),
              ),
            ),
          ),
        );
      }
    }
    flutter doctor -v
    [✓] Flutter (Channel stable, 3.35.5, on macOS 26.1 25B5042k darwin-arm64, locale en-US) [1,743ms]
        • Flutter version 3.35.5 on channel stable at /Users/deanli/dev/stable
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision ac4e799d23 (10 days ago), 2025-09-26 12:05:09 -0700
        • Engine revision d3d45dcf25
        • Dart version 3.9.2
        • DevTools version 2.48.0
        • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-lldb-debugging
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [8.4s]
        • Android SDK at /Users/deanli/Library/Android/sdk
        • Emulator version 36.2.10.0 (build_id 14110321) (CL:N/A)
        • Platform android-36.1, build-tools 36.1.0
        • Java binary at: /Users/deanli/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
          This is the JDK bundled with the latest Android Studio installation on this machine.
          To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
        • Java version OpenJDK Runtime Environment (build 21.0.8+-14018985-b1038.68)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 26.1) [2.9s]
        • Xcode at /Applications/Xcode-26.1.0-beta.app/Contents/Developer
        • Build 17B5025f
        • CocoaPods version 1.16.2
    
    [✓] Chrome - develop for the web [17ms]
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2025.1) [17ms]
        • Android Studio at /Users/deanli/Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 21.0.8+-14018985-b1038.68)
    
    [✓] VS Code (version 1.103.2) [15ms]
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.120.0
    
    [✓] Connected device (5 available) [16.9s]
        • iPhone 16 Pro Max (wireless) (mobile) • 00008140-00194CC23A68801C            • ios            • iOS 26.1 23B5044l
        • iPhone 17 Pro (mobile)                • FF49B712-6704-404D-8921-EB1B61238656 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-26-1 (simulator)
        • iPhone 16 Pro (mobile)                • B984F716-61F2-4909-BDBD-76F088D0BEDC • ios            • com.apple.CoreSimulator.SimRuntime.iOS-18-6 (simulator)
        • macOS (desktop)                       • macos                                • darwin-arm64   • macOS 26.1 25B5042k darwin-arm64
        • Chrome (web)                          • chrome                               • web-javascript • Google Chrome 141.0.7390.54
    
    [✓] Network resources [2.2s]
        • All expected network resources are available.
    
    • No issues found!
    
    [!] Flutter (Channel master, 3.37.0-1.0.pre-419, on macOS 26.1 25B5042k darwin-arm64, locale en-US) [4.0s]
        • Flutter version 3.37.0-1.0.pre-419 on channel master at /Users/deanli/dev/master
        ! Warning: `flutter` on your path resolves to /Users/deanli/dev/stable/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/deanli/dev/master. Consider adding /Users/deanli/dev/master/bin to the front of your path.
        ! Warning: `dart` on your path resolves to /Users/deanli/dev/stable/bin/dart, which is not inside your current Flutter SDK checkout at /Users/deanli/dev/master. Consider adding /Users/deanli/dev/master/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 5fcb8025b0 (10 hours ago), 2025-10-05 18:31:27 -0400
        • Engine revision 5fcb8025b0
        • Dart version 3.10.0 (build 3.10.0-285.0.dev)
        • DevTools version 2.50.0
        • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, omit-legacy-version-file, enable-lldb-debugging
        • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [2.3s]
        • Android SDK at /Users/deanli/Library/Android/sdk
        • Emulator version 36.2.10.0 (build_id 14110321) (CL:N/A)
        • Platform android-36.1, build-tools 36.1.0
        • Java binary at: /Users/deanli/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
          This is the JDK bundled with the latest Android Studio installation on this machine.
          To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
        • Java version OpenJDK Runtime Environment (build 21.0.8+-14018985-b1038.68)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 26.1) [1,863ms]
        • Xcode at /Applications/Xcode-26.1.0-beta.app/Contents/Developer
        • Build 17B5025f
        • CocoaPods version 1.16.2
    
    [✓] Chrome - develop for the web [15ms]
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Connected device (5 available) [9.1s]
        • iPhone 16 Pro Max (wireless) (mobile) • 00008140-00194CC23A68801C            • ios            • iOS 26.1 23B5044l
        • iPhone 17 Pro (mobile)                • FF49B712-6704-404D-8921-EB1B61238656 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-26-1 (simulator)
        • iPhone 16 Pro (mobile)                • B984F716-61F2-4909-BDBD-76F088D0BEDC • ios            • com.apple.CoreSimulator.SimRuntime.iOS-18-6 (simulator)
        • macOS (desktop)                       • macos                                • darwin-arm64   • macOS 26.1 25B5042k darwin-arm64
        • Chrome (web)                          • chrome                               • web-javascript • Google Chrome 141.0.7390.54
    
    [✓] Network resources [1,549ms]
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
    
  11. added
    platform-iosiOS applications specifically
    c: performanceRelates to speed or footprint issues (see "perf:" labels)
    and removed
    in triagePresently being triaged by the triage team
    on Oct 6, 2025
  12. 12 remaining items

  13. added
    P1High-priority issues at the top of the work list
    triaged-iosTriaged by iOS platform team
    on Oct 9, 2025
  14. changed the title [-]Extremely slow video selection with MOV format on iOS devices and Simulator[/-] [+][image_picker] Extremely slow video selection with MOV format on iOS devices and Simulator[/+] on Oct 13, 2025
  15. NavidFarahmandian commented on Oct 17, 2025

    @NavidFarahmandian
  16. mehmetemregokberk commented on Oct 21, 2025

    @mehmetemregokberk
  17. rokarnus commented on Oct 29, 2025

    @rokarnus

    I'm experiencing the same issue when picking longer high resolution GIFs on iOS. Have to wait 20-40s to get the returned path. Seem like videos and animated images are getting reencoded.

    On Android this is almost an instant operation.

  18. added a commit that references this issue on Dec 4, 2025
    1905069
  19. added
    r: fixedIssue is closed as already fixed in a newer version
    on Dec 4, 2025
  20. github-actions commented on Dec 18, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  21. locked as resolved and limited conversation to collaborators on Dec 18, 2025
  22. added a commit that references this issue on Jan 26, 2026
    e4938dc
  23. added a commit that references this issue on Jun 10, 2026
    1534648
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)found in release: 3.36Found to occur in 3.36found in release: 3.37Found to occur in 3.37has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: image_pickerThe Image Picker plugin.packageflutter/packages repository. See also p: labels.perf: speedPerformance issues related to (mostly rendering) speedplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions