-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
FFmpeg (5.0+) has updated the tag where rotation info is retrieved from #45837
FFmpeg (5.0+) has updated the tag where rotation info is retrieved from #45837
Conversation
@@ -26,7 +26,7 @@ class ActiveStorage::Analyzer::VideoAnalyzerTest < ActiveSupport::TestCase | |||
assert_equal 480, metadata[:width] | |||
assert_equal 640, metadata[:height] | |||
assert_equal [4, 3], metadata[:display_aspect_ratio] | |||
assert_equal 90, metadata[:angle] | |||
assert_includes [90, -90], metadata[:angle] |
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.
Easy way not to care about the version of ffmpeg? Version < 5 this is 90 and 5.0+ it's -90
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.
Let's add a changelog in case for someone -90 and -270 represents a behavior change.
114c4a3
to
78abc57
Compare
78abc57
to
ad68fec
Compare
The tests look unrelated, will see if I can take a look but let me know if there is anything else needed for this 🙂 EDIT: actually, I committed a file by accident, let me remove |
The original code which pulls the rotation from tags is still left for older ffmpeg versions whilst the newer ffmpeg version 5.0+ will use the side_data to retrieve the rotation info.
ad68fec
to
206a826
Compare
…tion-test-failing FFmpeg (5.0+) has updated the tag where rotation info is retrieved from
Merge pull request #45837 from hahmed/ha/active-storage-fix-rotation-…
…tion-test-failing FFmpeg (5.0+) has updated the tag where rotation info is retrieved from
Summary
When running the test locally
bin/test test/analyzer/video_analyzer_test.rb:22
(analyzing a rotated video).
I'm seeing it failing for FFmpeg in versions 5.0+ this is due to a change upstream.
The original code which pulls the rotation from tags is still left for
older ffmpeg versions whilst the newer ffmpeg version 5.0+ will use the
side_data to retrieve the rotation info.
Example output for side_data_list (when adding puts here https://github.com/rails/rails/pull/45837/files#diff-e69a5f7b5e4a55a776812dcc33b529c549984a5692048b0ec2683596abd999b4R107)
Run the command below to see the full output for the rotated_video file.
Other Information
It's unclear why on CI everything is green but this line https://github.com/rails/buildkite-config/blob/b44bcf075b8683283ee4ab06391c895e608f162e/Dockerfile#L91 looks like
we are using the latest version, I have no idea why upstream is not failing 🤷♂️
Commits where "rotate" was removed;
cc/ @eileencodes