video_thumbnail icon indicating copy to clipboard operation
video_thumbnail copied to clipboard

[Bug] No thumbnail data for video url with 1280x720 resolution in iOS device

Open jcblancomartinez opened this issue 3 years ago • 6 comments

Steps to reproduce:

  1. Run example from https://pub.dev/packages/video_thumbnail/example.
  2. Generate thumbnail data on any video with 1280x720 resolution (i.e. https://user-images.githubusercontent.com/1192455/137946599-3fbcd8fd-ff71-44d4-a19a-beac029f9b7a.mp4)
  3. The actual behaviour:
  • For iOS, thumbnail data is null.
  • For Android, thumbnail data is generated correctly.

flutter doctor -v

  • iOS:

[✓] Flutter (Channel master, 2.6.0-12.0.pre.382, on Mac OS X 10.15.7 19H524 darwin-x64, locale en-ES) • Flutter version 2.6.0-12.0.pre.382 at /Users/juancarlos/Library/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 34ec94a16d (7 hours ago), 2021-10-19 01:33:08 -0700 • Engine revision faa45f497f • Dart version 2.15.0 (build 2.15.0-226.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/juancarlos/Library/Android/sdk • Platform android-31, build-tools 31.0.0 • Java binary at: /Applications/Android Studio Preview.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822) • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 12.4) • Xcode at /Applications/Xcode.app/Contents/Developer ! Flutter recommends a minimum Xcode version of 13.0.0. Download the latest version or update via the Mac App Store. • CocoaPods version 1.11.2

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio • Android Studio at /Applications/Android Studio Preview.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 11.0.11+0-b60-7590822)

[✓] Connected device (2 available) • iPhone 12 Pro Max (mobile) • 62EAA909-B18C-426F-AE70-89592050365E • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator) • Chrome (web) • chrome • web-javascript • Google Chrome 94.0.4606.81

! Doctor found issues in 1 category.

-Android:

[✓] Flutter (Channel master, 2.6.0-12.0.pre.382, on Ubuntu 20.04.3 LTS 5.11.0-37-generic, locale en_US.UTF-8) • Flutter version 2.6.0-12.0.pre.382 at /home/juancarlos/snap/flutter/common/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 34ec94a16d (7 hours ago), 2021-10-19 01:33:08 -0700 • Engine revision faa45f497f • Dart version 2.15.0 (build 2.15.0-226.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /home/juancarlos/Android/Sdk • Platform android-31, build-tools 30.0.2 • Java binary at: /home/juancarlos/android-studio/jre/bin/java • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822) • All Android licenses accepted.

[✓] Chrome - develop for the web • Chrome at google-chrome

[✓] Android Studio (version 2021.1) • Android Studio at /home/juancarlos/android-studio • Flutter plugin version 61.2.3 • Dart plugin version 211.7792 • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] Connected device (2 available) • Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator) • Chrome (web) • chrome • web-javascript • Google Chrome 94.0.4606.81

• No issues found!

flutter pub deps | grep video_thumbnail

|-- video_thumbnail 0.4.3

Regards

.

jcblancomartinez avatar Oct 19 '21 15:10 jcblancomartinez

facing this issues too, any solution or workaround ?

ahkela21 avatar Oct 27 '21 05:10 ahkela21

Same issue here error:

error:Error Domain=AVFoundationErrorDomain Code=-11832 “Cannot Open” UserInfo={NSLocalizedFailureReason=This media cannot be used., NSLocalizedDescription=Cannot Open, NSUnderlyingError=0x2823dcab0 {Error Domain=NSOSStatusErrorDomain Code=-12431 “(null)“}}

I can send an .mp4 video that is causing this issue every time

rafalplonka avatar Oct 27 '21 19:10 rafalplonka

I met the same error, solved it by stack Overflow: https://stackoverflow.com/questions/43548529/get-last-frame-from-video, open iOS code, 'remove requestedTimeTolerance',then is ok。

wangfeng211 avatar Nov 04 '21 10:11 wangfeng211

Any solution? same issue here

loic-hamdi avatar Dec 06 '21 18:12 loic-hamdi

The same problem when creating thumbnail from video MOV shortly ( around 2 -5 seconds)

couldn't generate thumbnail, error:Error Domain=AVFoundationErrorDomain Code=-11821 "Cannot Decode" UserInfo={NSLocalizedFailureReason=The media data could not be decoded. It may be damaged., NSLocalizedDescription=Cannot Decode, NSUnderlyingError=0x280fed950 {Error Domain=NSOSStatusErrorDomain Code=-12911 "(null)"}}

ProFive avatar Dec 23 '21 07:12 ProFive

I met the same error, solved it by stack Overflow: https://stackoverflow.com/questions/43548529/get-last-frame-from-video, open iOS code, 'remove requestedTimeTolerance',then is ok。

This does remove the error but at the same time some of the thumbnails come out to be black.

waqadArshad avatar Nov 02 '22 23:11 waqadArshad