-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
I have an application that uses the camera and video_player for taking pictures/record videos and upload to firebase storage. Then, I download from firebase and reproduce by using Image.file or VideoPlayer, depending on the file. My application have screen orientation locked by the setting SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]). But, I have some issues:
- Recording a video from Iphone in portrait or landscape, generates a mp4 file that follows the lock orientation config, playing in Android and Iphone correctly.
- Recording a video from Android in portrait mode, generates a mp4 file that plays in the correctly orientation on Android. But, rotates 90 CCW on Iphone.
- Recording a video from Android in landscape mode, generates a mp4 file that plays 90 CCW in both Android and Iphone.
I've researched in many issues of GitHub and many of this relate some EXIF issue. Then, I use this site https://www.get-metadata.com to extract the metadata of each mp4 file and I've gotten this results:
- Video from Iphone in portrait:
- Video from Iphone in landscape:
- Video from Android portrait:
- Video from Android landscape:
I noticed that Iphone's video files contains Rotation 0 and the same width and height (height > width) in both modes. In Android's video files, landscape mode contains Rotation 0 but width and height different of the portrait mode being width > height. In portrait mode the result contains Rotation 90. This mode is the only one that have TAGS and SIDE DATA LIST sessions having Rotate 90 and Rotation -90, respectively.
Taking pictures with the camera and showing with Image.file using both devices, in portrait mode, the picture always comes with the correct orientation. However, in landscape mode the picture comes rotated in 90 CCW.
This is my flutter doctor -v
[✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.13.6 17G4015, locale pt-US)
• Flutter version 1.0.0 at /Users/workeduc/flutter
• Framework revision 5391447fae (9 weeks ago), 2018-11-29 19:41:26 -0800
• Engine revision 7375a0f414
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /Users/workeduc/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/workeduc/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
• All Android licenses accepted.
[!] iOS toolchain - develop for iOS devices (Xcode 10.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
✗ Verify that all connected devices have been paired with this computer in Xcode.
If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
To update with Brew, run:
brew update
brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies usbmuxd
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
• ios-deploy 1.9.2
✗ ios-deploy out of date (1.9.4 is required). To upgrade with Brew:
brew upgrade ios-deploy
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 32.0.1
• Dart plugin version 182.5124
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[✓] Connected device (2 available)
• Moto G • 0423012922 • android-arm • Android 7.1.2 (API 25)
• iPhone de Desenvolvedor • 4346ae62097024ea99d0bfbee86b849efdc5fdab • ios • iOS 12.1.3
I'm using the camera plugin 0.3.0 and video_player 0.8.0, any ideas for solving this issue?




