paperclip-ffmpeg 0.3.0 → 0.3.1

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.
@@ -1,5 +1,5 @@
1
1
  module Paperclip
2
2
  module Ffmpeg
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
@@ -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:(\s.?(\w*),\s.?(\w*),\s(\d*x\d*)\s.?PAR\s.?(\d*):(\d*)\s.?DAR\s(\d*):(\d*))/
104
- meta[:size] = $4
105
- meta[:aspect] = $7.to_f / $8.to_f
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.0
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-09 00:00:00 +02:00
13
+ date: 2011-06-20 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency