-
Notifications
You must be signed in to change notification settings - Fork 32
Added setting rotation metadata #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,8 @@ def filter_rotate degrees | |
when 270 | ||
add_output_param vf: 'cclock' | ||
end | ||
|
||
self | ||
end | ||
|
||
end | ||
|
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
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.
Can we make this clockwise instead of counterclockwise?
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.
I've been doing some experiments with this and whilst I can see why the suggestion is to set the rotation information clockwise, this doesn't actually have the expected effect. I wonder if the rotation metadata is actually intended to convey how to play the video instead of conveying how it was rotated.
If I take a landscape video with no rotate metadata, then rotate it 90 degrees clockwise, and also set the metadata to 90 to show its been rotated 90 degrees - quicktime, vlc, ffplay all show the video upside down - ie 90 degrees rotation + another 90 for (the wrong) correction
Conversely if I take that video and set the metadata to 270, it plays correctly in Quicktime, VLC, ffplay?
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.
I guess we won't set the metadata as long as players will rotate the video.
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.
The desktop video players need the metadata in order to decide how much to rotate by. Conversely web based players ignore the metadata (I believe).
I think the rotate metadata describes the 'device (phone) rotation' which is the opposite of the video contents 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.
Understood. What about the CW rotation (as opposed to the current CCW) implementation?
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.
AFAIU, the way rotation works right now is by rotating minus given degrees (CCW), no?
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.
I've not changed the rotation method (besides fixing the input/output params issue).
My understanding is that filter_rotate rotates clockwise.
Metadata_rotate sets the metadata to whatever you tell it.
Filter_metadata_rotate rotates the image by the desired amount, then corrects the meta data. If the image is rotated 90 CW, then the metadata should show the recording device as having been rotate 90 CCW, ie 270
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.
I got this all wrong. Merging right now.
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.
AFAICT the metadata shows device rotation not image 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.
Thx