This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[video_player] Fixed orientation and position issue for some videos metadata. #1451
Closed
quentinleguennec
wants to merge
1
commit into
flutter:master
from
Tengio:tengio_improved_video_player
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: video_player | |
description: Flutter plugin for displaying inline video with other Flutter | ||
widgets on Android and iOS. | ||
author: Flutter Team <[email protected]> | ||
version: 0.10.0+4 | ||
version: 0.10.0+5 | ||
homepage: https://github.com/flutter/plugins/tree/master/packages/video_player | ||
|
||
flutter: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@quentinleguennec Thanks for your PR. I just tested your fix and unfortunately this line is not rendering videos taken at 180°. tx and ty must be 0 for videos in landscape and reverse landscape mode. Furthermore, some videos metadata include incorrect tx, ty values when in portrait mode. In https://github.com/flutter/plugins/pull/1307/files I've added a fix to properly display these videos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be because I was using the fixed rotation metadata from this PR: #1452
On my side with both those PRs the videos display properly. (even when the video is recorded with a rotation).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried recording your videos with the native Camera app? That's the one I used to record a video in 180° that displays a black screen with tx and ty set to non 0.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@recastrodiaz Good point, I didn't think about checking with the native camera app.
I just did and it is working with the current code when you record a video on your iPhone and play it with the video_player. But it is not working (black screen) if you record the video from the native camera app of an Android an play it with the video_player on an iPhone.
That's because the native iPhone camera app add the translation metadata to the video file (which can be seen with ffprobe). But Android doesn't add it (and VLC doesn't need it either, just iOS).
With the fix I added it displays the video recorded on Android properly when played on an iPhone. And it also works with a video recorded from an iPhone and played on an iPhone from the video_player.