You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,13 +45,35 @@ This will produce:
45
45
46
46
You may optionally add `<attachment>_meta` to your model and it will get populated with information about the processed video.
47
47
48
-
The geometry parameters are:
48
+
### `geometry`
49
+
50
+
The `geometry` option has the following available modifiers:
49
51
50
52
1. '!' - Keep the same aspect of the image/video, but with the passed dimesion.
51
53
2. '#' - Pad the image/video.
52
54
3. '<' - Enlarge the image/video.
53
55
4. '>' - Shrink the image/video.
54
56
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
+
55
77
## Contributing
56
78
57
79
1. Fork it ( https://github.com/ruby-av/paperclip-av-transcoder/fork )
0 commit comments