Skip to content

Commit

Permalink
Merge pull request #38 from erkie/master
Browse files Browse the repository at this point in the history
Show convert_options in README
  • Loading branch information
owahab committed Apr 21, 2016
2 parents a07e210 + 4708172 commit c50d782
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Expand Up @@ -45,13 +45,35 @@ This will produce:

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

The geometry parameters are:
### `geometry`

The `geometry` option has the following available modifiers:

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

### `convert_options`

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).

For example, sending in the `-an` flag would look like this:

```ruby
has_attached_file :video, styles: {
mobile: {
format: "mp4",
convert_options: {
output: {
an: nil # Remove audio track resulting in a silent movie, passing in nil results in `-an`,
name: "value" # Results in `-name value` in the command line
}
}
},
}
```

## Contributing

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

0 comments on commit c50d782

Please sign in to comment.