1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activestorage/test/analyzer
Ryuta Kamizono 88cbe13741 Fix activestorage CI failure due to ffprove version differece
Our CI environment is upgraded from stretch to buster then ffprove
version is also upgraded from 3.2.14 to 4.1.3.

https://packages.debian.org/stretch/ffmpeg
https://packages.debian.org/buster/ffmpeg

Somehow those ffprove returns different metadata for
`rotated_video.mp4`.

```
$ ffprobe -print_format json -show_streams -v error rotated_video.mp4 > ffprobe41.json
$ diff -ub ffprobe32.json ffprobe41.json
--- ffprobe32.json      2019-07-14 20:02:13.000000000 +0900
+++ ffprobe41.json      2019-07-14 19:59:08.000000000 +0900
@@ -27,8 +27,8 @@
             "time_base": "1/17594",
             "start_pts": 3976,
             "start_time": "0.225986",
-            "duration_ts": 91981,
-            "duration": "5.227975",
+            "duration_ts": 88000,
+            "duration": "5.001705",
             "bit_rate": "321546",
             "bits_per_raw_sample": "8",
             "nb_frames": "44",
@@ -78,8 +78,8 @@
             "time_base": "1/44100",
             "start_pts": 0,
             "start_time": "0.000000",
-            "duration_ts": 227865,
-            "duration": "5.167007",
+            "duration_ts": 227850,
+            "duration": "5.166667",
             "bit_rate": "109732",
             "max_bit_rate": "109732",
             "nb_frames": "223",
```

In the case on the `test "analyzing a rotated video"`, most important
part is `assert_equal 90, metadata[:angle]`, the accidental difference
of duration for ffprove version is out of scope for the test.
2019-07-14 20:06:41 +09:00
..
image_analyzer_test.rb Don't fail ImageAnalyzer on unsupported types 2019-04-24 07:59:12 -04:00
video_analyzer_test.rb Fix activestorage CI failure due to ffprove version differece 2019-07-14 20:06:41 +09:00