Skip to content

Commit 4708172

Browse files
committed
Show convert_options in README
1 parent a07e210 commit 4708172

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,35 @@ This will produce:
4545

4646
You may optionally add `<attachment>_meta` to your model and it will get populated with information about the processed video.
4747

48-
The geometry parameters are:
48+
### `geometry`
49+
50+
The `geometry` option has the following available modifiers:
4951

5052
1. '!' - Keep the same aspect of the image/video, but with the passed dimesion.
5153
2. '#' - Pad the image/video.
5254
3. '<' - Enlarge the image/video.
5355
4. '>' - Shrink the image/video.
5456

57+
### `convert_options`
58+
59+
The `convert_options` option lets you specify custom command line options to be sent to the `ffmpeg` command. The options are split into `output` and `input`, which define where in the pipeline they will be applied. Read more about which flags go where on the [official documentation](https://ffmpeg.org/ffmpeg.html).
60+
61+
For example, sending in the `-an` flag would look like this:
62+
63+
```ruby
64+
has_attached_file :video, styles: {
65+
mobile: {
66+
format: "mp4",
67+
convert_options: {
68+
output: {
69+
an: nil # Remove audio track resulting in a silent movie, passing in nil results in `-an`,
70+
name: "value" # Results in `-name value` in the command line
71+
}
72+
}
73+
},
74+
}
75+
```
76+
5577
## Contributing
5678

5779
1. Fork it ( https://github.com/ruby-av/paperclip-av-transcoder/fork )

0 commit comments

Comments
 (0)