paperclip-ffmpeg 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +4 -2
- data/lib/paperclip-ffmpeg.rb +7 -0
- data/lib/paperclip-ffmpeg/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -40,8 +40,10 @@ In your model:
|
|
40
40
|
|
41
41
|
This will produce:
|
42
42
|
|
43
|
-
1. A transcoded
|
44
|
-
2. A screenshot
|
43
|
+
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.
|
44
|
+
2. A screenshot `:thumb` with the requested dimensions regardless of the aspect ratio.
|
45
|
+
|
46
|
+
You may optionally add `<attachment>_meta` to your model and paperclip-ffmpeg will add information about the processed video.
|
45
47
|
|
46
48
|
|
47
49
|
License
|
data/lib/paperclip-ffmpeg.rb
CHANGED
@@ -30,6 +30,7 @@ module Paperclip
|
|
30
30
|
@current_format = File.extname(@file.path)
|
31
31
|
@basename = File.basename(@file.path, @current_format)
|
32
32
|
@meta = identify
|
33
|
+
attachment.instance_write(:meta, @meta)
|
33
34
|
end
|
34
35
|
# Performs the transcoding of the +file+ into a thumbnail/video. Returns the Tempfile
|
35
36
|
# that contains the new image/video.
|
@@ -112,4 +113,10 @@ module Paperclip
|
|
112
113
|
meta
|
113
114
|
end
|
114
115
|
end
|
116
|
+
|
117
|
+
class Attachment
|
118
|
+
def meta
|
119
|
+
instance_read(:meta)
|
120
|
+
end
|
121
|
+
end
|
115
122
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: paperclip-ffmpeg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.3.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Omar Abdel-Wahab
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-06-
|
13
|
+
date: 2011-06-09 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|