Skip to content

Commit

Permalink
Merge pull request #44060 from soartec-lab/fix/doc-video_preview_argu…
Browse files Browse the repository at this point in the history
…ments-default-value

Fix document `config.active_storage.video_preview_arguments` description. [ci-skip]
  • Loading branch information
jonathanhefner committed Jan 5, 2022
2 parents e8db48f + daff381 commit 2e5ed2f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions guides/source/configuring.md
Original file line number Diff line number Diff line change
Expand Up @@ -1733,14 +1733,16 @@ The default is `:rails_storage_redirect`.

Can be used to alter the way ffmpeg generates video preview images.

By default, this is defined as:
With `config.load_defaults 7.0`, the default is:

```ruby
config.active_storage.video_preview_arguments = "-vf 'select=eq(n\\,0)+eq(key\\,1)+gt(scene\\,0.015),loop=loop=-1:size=2,trim=start_frame=1' -frames:v 1 -f image2"
```

Which has the following behavior:

1. `select=eq(n\,0)+eq(key\,1)+gt(scene\,0.015)`: Select the first video frame, plus keyframes, plus frames that meet the scene change threshold.
2. `loop=loop=-1:size=2,trim=start_frame=1`: To use the first video frame as a fallback when no other frames meet the criteria, loop the first (one or) two selected frames, then drop the first looped frame.
2. `loop=loop=-1:size=2,trim=start_frame=1`: Use the first video frame as a fallback when no other frames meet the criteria by looping the first (one or) two selected frames, then dropping the first looped frame.

#### `config.active_storage.multiple_file_field_include_hidden`

Expand Down

0 comments on commit 2e5ed2f

Please sign in to comment.