paperclip-av-transcoder 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/README.md +28 -4
- data/lib/paperclip/av/transcoder/version.rb +1 -1
- data/paperclip-av-transcoder.gemspec +1 -0
- data/spec/spec_helper.rb +4 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 433c06e0961326b0e9567a95d80b4f873ca005b6
|
4
|
+
data.tar.gz: 8a2ffb774e893e9dd1228a36f0055492d0e2d056
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d71cbd417c1b572b492deddf43bfcb207455080fee9e036a256c112f0a0228a4df88beebf9dbaef41cca08ad0cc7faf3d4cfb54c011b8e494c93490f3954d70
|
7
|
+
data.tar.gz: e5fd3fb58f3fa0df7973403b3759f421f26ca75ffe3b777f930111ede5f4b84830d39ed46e8c42971a9c29a415fad54902bb15fbbf97f856ea46f53f1539e5bc
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
|
-
# Paperclip
|
1
|
+
# Paperclip Transcoder
|
2
2
|
|
3
|
-
|
3
|
+
Audio/Video Transcoder for Paperclip using FFMPEG/Avconv.
|
4
|
+
|
5
|
+
This is a replacement for ( https://github.com/owahab/paperclip-ffmpeg ).
|
6
|
+
|
7
|
+
## Status
|
8
|
+
|
9
|
+
[![Build Status](https://travis-ci.org/ruby-av/paperclip-av-transcoder.svg?branch=master)](https://travis-ci.org/ruby-av/paperclip-av-transcoder)
|
10
|
+
[![Coverage Status](https://coveralls.io/repos/ruby-av/paperclip-av-transcoder/badge.png?branch=master)](https://coveralls.io/r/ruby-av/paperclip-av-transcoder?branch=master)
|
11
|
+
[![Code Climate](https://codeclimate.com/github/ruby-av/paperclip-av-transcoder/badges/gpa.svg)](https://codeclimate.com/github/ruby-av/paperclip-av-transcoder)
|
12
|
+
[![Dependency Status](https://gemnasium.com/ruby-av/paperclip-av-transcoder.svg)](https://gemnasium.com/ruby-av/paperclip-av-transcoder)
|
4
13
|
|
5
14
|
## Installation
|
6
15
|
|
@@ -18,11 +27,26 @@ Or install it yourself as:
|
|
18
27
|
|
19
28
|
## Usage
|
20
29
|
|
21
|
-
|
30
|
+
In your model:
|
31
|
+
|
32
|
+
# app/models/user.rb
|
33
|
+
class User < ActiveRecord::Base
|
34
|
+
has_attached_file :avatar, :styles => {
|
35
|
+
:medium => { :geometry => "640x480", :format => 'flv' },
|
36
|
+
:thumb => { :geometry => "100x100#", :format => 'jpg', :time => 10 }
|
37
|
+
}, :processors => [:ffmpeg]
|
38
|
+
end
|
39
|
+
|
40
|
+
This will produce:
|
41
|
+
|
42
|
+
1. A transcoded `:medium` FLV file with the requested dimensions if they will match the aspect ratio of the original file, otherwise, width will be maintained and height will be recalculated to keep the original aspect ration.
|
43
|
+
2. A screenshot `:thumb` with the requested dimensions regardless of the aspect ratio.
|
44
|
+
|
45
|
+
You may optionally add `<attachment>_meta` to your model and it will get populated with information about the processed video.
|
22
46
|
|
23
47
|
## Contributing
|
24
48
|
|
25
|
-
1. Fork it ( https://github.com/
|
49
|
+
1. Fork it ( https://github.com/ruby-av/paperclip-av-transcoder/fork )
|
26
50
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
51
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
52
|
4. Push to the branch (`git push origin my-new-feature`)
|
@@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_development_dependency "rspec", "~> 3.0.0"
|
24
24
|
spec.add_development_dependency "rails", ">= 4.0.0"
|
25
25
|
spec.add_development_dependency "sqlite3"
|
26
|
+
spec.add_development_dependency "coveralls"
|
26
27
|
|
27
28
|
spec.add_dependency "paperclip", ">=2.5.2"
|
28
29
|
spec.add_dependency "av", ">= 0.4.0"
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip-av-transcoder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Omar Abdel-Wahab
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: coveralls
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: paperclip
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|