paperclip-ffmpeg 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/paperclip-ffmpeg/version.rb +1 -1
- data/lib/paperclip-ffmpeg.rb +5 -3
- metadata +2 -2
data/lib/paperclip-ffmpeg.rb
CHANGED
@@ -100,9 +100,11 @@ module Paperclip
|
|
100
100
|
end
|
101
101
|
# Matching lines like:
|
102
102
|
# Video: h264, yuvj420p, 640x480 [PAR 72:72 DAR 4:3], 10301 kb/s, 30 fps, 30 tbr, 600 tbn, 600 tbc
|
103
|
-
if line =~ /Video:(
|
104
|
-
|
105
|
-
|
103
|
+
if line =~ /Video:(.*)/
|
104
|
+
v = $1.to_s.split(',')
|
105
|
+
size = v[2].strip!.split(' ').first
|
106
|
+
meta[:size] = size.to_s
|
107
|
+
meta[:aspect] = size.split('x').first.to_f / size.split('x').last.to_f
|
106
108
|
end
|
107
109
|
# Matching Duration: 00:01:31.66, start: 0.000000, bitrate: 10404 kb/s
|
108
110
|
if line =~ /Duration:(\s.?(\d*):(\d*):(\d*\.\d*))/
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: paperclip-ffmpeg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.3.
|
5
|
+
version: 0.3.1
|
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-20 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|