carrierwave_streamio_ffmpeg 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97cc0ad85836d232850f50724c42ce2bca0a7da1
4
- data.tar.gz: 5c08cba0ce01d926ef8716c9f8eecac3dc4ce6f1
3
+ metadata.gz: ee737c2a9c2cd247d4d875844130b4e6cccde3b7
4
+ data.tar.gz: 49bf242a10461cd515fe084f8f9e2fa6ef3ca179
5
5
  SHA512:
6
- metadata.gz: bd8c436587eff660c4e794aa75e65e06fc90dc395e243868eda010490877326a16696fe3cc577cb71cb8739cad9acd816bb1d7a1d3e394501c8f818390da7f7e
7
- data.tar.gz: d27153b4e6f4ec94d9e8cd62a3da976f8a24a4e364841bc01468ad2fac8c6894082d8df5dbb8910d1d98b5c81e23e6b4562f86394fb742f713ec36dabc553bfc
6
+ metadata.gz: df7b2b79b2469636bc3b2c92c6c3754c56cdf9f27a5da77acaaba0b43e4ffdf7e3c91dc227d8fe46c8cf1f2e25521ada7a2c7687cd253e070f60805dd1fdb5aa
7
+ data.tar.gz: 6141eccdc70c3eb497aa3dc6effa633a7df3fead2616332800cee42ae59b14b4a49dddf0f1077fb213bb68e21694f491250db81915afcfe1ac23bf88b8eb49b3
data/.gitignore CHANGED
@@ -16,3 +16,5 @@
16
16
  /.idea/modules.xml
17
17
  /.idea/workspace.xml
18
18
  /carrierwave_streamio_ffmpeg-0.0.1.gem
19
+ /.idea/inspectionProfiles/Project_Default.xml
20
+ /.idea/vcs.xml
data/README.md CHANGED
@@ -46,7 +46,7 @@ The options are passed as hash to this function, can be also empty.
46
46
  The options are:
47
47
  * format - format of the output video, possible options are mp4, webm and ogv
48
48
  * resolution - resolution if output file, possible values are p240, p360, p480, p720, p1080 and p2160
49
- * quality - Quality of the file to be saved, possible values are low, med, and high.
49
+ * quality - Quality of the file to be saved, possible values are very_low, low, med, high and very_high.
50
50
  * preserve_aspect_ratio - value to be preserved when correcting aspect ration, possible values :width and :height.
51
51
 
52
52
  ## Contributing
@@ -6,7 +6,7 @@ module CarrierwaveStreamioFfmpeg
6
6
  opts[:video_bitrate] = set_video_quality(opts, file)
7
7
  opts[:frame_rate] = set_video_frames(opts, file)
8
8
  opts[:audio_bitrate] = set_audio_quality(opts, file)
9
- opts[:threads] = 8
9
+ opts[:threads] = 1
10
10
  format = opts[:format]
11
11
  opts = opts.except(:quality, :preserve_aspect_ratio, :format)
12
12
  opts.merge!(codec(format))
@@ -14,11 +14,15 @@ module CarrierwaveStreamioFfmpeg
14
14
 
15
15
  def set_video_frames(opts, file)
16
16
  case opts[:quality]
17
+ when :very_low
18
+ 15
17
19
  when :low
18
- 25
20
+ 24
19
21
  when :med
20
- 30
22
+ 25
21
23
  when :high
24
+ 30
25
+ when :very_high
22
26
  60
23
27
  else
24
28
  file.frame_rate
@@ -27,12 +31,16 @@ module CarrierwaveStreamioFfmpeg
27
31
 
28
32
  def set_audio_quality(opts, file)
29
33
  case opts[:quality]
34
+ when :very_low
35
+ 64
30
36
  when :low
31
37
  96
32
38
  when :med
33
39
  128
34
40
  when :high
35
41
  256
42
+ when :very_high
43
+ 320
36
44
  else
37
45
  (file.audio_bitrate)/100
38
46
  end
@@ -40,11 +48,15 @@ module CarrierwaveStreamioFfmpeg
40
48
 
41
49
  def set_video_quality(opts, file)
42
50
  case opts[:quality]
51
+ when :very_low
52
+ 128
43
53
  when :low
44
- 1250
54
+ 384
45
55
  when :med
46
- 5000
56
+ 1250
47
57
  when :high
58
+ 5000
59
+ when :very_high
48
60
  15000
49
61
  else
50
62
  (file.video_bitrate)/100
@@ -1,3 +1,3 @@
1
1
  module CarrierwaveStreamioFfmpeg
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave_streamio_ffmpeg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ssooraj