-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Active Storage test_analyzing_a_video_without_a_video_stream
fails using Ubuntu 23.10
#49650
Comments
Here is the
|
I can say this is likely due to ffmpeg/ffprobe behavior difference between 5.1 and 6.0. This issue started to reproduce once upgrading Ubuntu 23.04 to 23.10
ffprobe shows different duration between 5.1 and 6.0 for the same file
|
I could reproduce this on my machine with ffprobe 6.0, I think this is a change upstream and we could report it to their bug tracker -- but also that test could be more conservative? |
I've sent a email to https://ffmpeg.org/pipermail/ffmpeg-user/ mailing list to see if this is an expected behavior change between ffprobe 5.1 and 6.0. |
Here is the link https://ffmpeg.org/pipermail/ffmpeg-user/2023-October/057067.html |
Informed this is an expected behavior change. http://ffmpeg.org/pipermail/ffmpeg-user/2023-October/057083.html
|
What do you think of this, or something like it to just round the result? --- a/activestorage/test/analyzer/video_analyzer_test.rb
+++ b/activestorage/test/analyzer/video_analyzer_test.rb
@@ -64,7 +64,7 @@ class ActiveStorage::Analyzer::VideoAnalyzerTest < ActiveSupport::TestCase
assert_not_includes metadata, :width
assert_not_includes metadata, :height
- assert_equal 1.022000, metadata[:duration]
+ assert_equal 1.0.to_fs, metadata[:duration].to_fs Do we really care about the accuracy or just trust upstream to do the right thing 🤔 |
I'd like to hear from @jonathanhefner as the author of a197d39e13e |
FFmpeg 6.0 now reports the duration of `video_without_video_stream.mp4` as 1.000000 instead of 1.022000. This discrepancy was [reported][] to the FFmpeg mailing list, and the [reply][] indicated that the change is intentional. For this test, the exact duration isn't significant. We merely want to assert that the metadata includes the duration reported by FFmpeg. Therefore, this commit changes the assertion to accomodate the duration reported by FFmpeg 6.0 as well as previous versions. Fixes rails#49650. [reported]: https://ffmpeg.org/pipermail/ffmpeg-user/2023-October/057067.html [reply]: http://ffmpeg.org/pipermail/ffmpeg-user/2023-October/057083.html Co-authored-by: Yasuo Honda <yasuo.honda@gmail.com>
The purpose of a197d39 was to support duration metadata for video formats such as WebM, which store duration in the container rather than the video stream. The test for that still appears to be correct. That change also happened to provide duration metadata for video files that didn't have a video stream (i.e. audio only), which is why a197d39 had to modify So I have submitted #49869 to support the duration reported by FFmpeg 6.0 as well as previous versions. @yahonda, I have added you as a co-author since you spent time investigating this. Thank you! ❤️ |
Steps to reproduce
Install Ubuntu 23.10
Expected behavior
It should pass.
Actual behavior
System configuration
Rails version: main branch
Ruby version: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
The text was updated successfully, but these errors were encountered: