r7streamio_ffmpeg 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmEyNmEzNWE4MzEzNTIzNzU4NzBmOWZmOWRiNzNlOTc2YmMxMGY5ZQ==
4
+ MmVjNDJhZmQ4ZDliMDc1NGM1ZjJkYjhkYjg0N2Y3NjQyMjQ4MWNkMw==
5
5
  data.tar.gz: !binary |-
6
- MmUzYjVlMGY1Mzg5ZTNhMTliMjRjZjMzMDIxYTBiNWYzY2ViMDYzOQ==
6
+ M2ZjZjE2MTcyMzRmOGNiNmQzMDA1MGEzZDhjMDkyOTBlYWE3NjQxMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NWUxMjliZjIzNDNjNzdiOWE2MzRlZjk4NjJiNTFjMjhlNGFjM2RkMGYzZmJm
10
- YTRkM2ZlMTg4NzZhMzlmODUxNDc1OGRhZmQ2ZjM0OTFmMTY3ODA5ODEwNzI0
11
- ODE5NjVkZWM5NzFlNTczNDcxYzhlZjBiMmY4MjZkMWNhMzgzOTU=
9
+ OTZjZTRmNDg4YWIzZDA0Zjg2ZDEwMTYzMGEyZDI0Mzc1ZjI0YmZiYjcxYmVj
10
+ NDVjNmRmMWM4OWQ5NmYyOWM3MjY4NDRmYjQ4NjEyY2RhYTY4MDZmNjNkNjYz
11
+ OGFmNWVhNjZlZTJmY2YwZWQyZWQzMmIwOTZiZGJmOGI5YTMyNTA=
12
12
  data.tar.gz: !binary |-
13
- M2U0N2ZiYjFlNGUwMTRlODM0NWQwYmIyMWY5M2UyYWNlM2MwN2ZjMzI4ZTUw
14
- ZDIwNzE0NmJlZTM3NmMzZDU0NDg2NzE2ZmEzMDljZWQwNWIyYjU5Zjk2OTk5
15
- ODhlMGYxMmQ3YjdhN2I0ODgyMjRkNTA3Mzk2NjI5OWVlM2QwMGQ=
13
+ ZjAzMzNjNjU3NzQyNDU5OGNmZDc0YmFkZjllZDJjM2EyNzdjZGRlNDQ5ZTE2
14
+ YjAzMThiNmQ0ZWVhMDI1ZTIyOGMwYTQzMDMzZWJlNjA0ZmQ1OTg1NDdlYTM0
15
+ MTkxYTk2MGY0MjhhNjQ5YjI4OTdjYWE5ZDA1Y2U0ODNkZjVkNzM=
data/README.md CHANGED
@@ -48,6 +48,7 @@ movie.video_stream # "h264, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 371 kb/s, 16.75
48
48
  movie.video_codec # "h264"
49
49
  movie.colorspace # "yuv420p"
50
50
  movie.resolution # "640x480"
51
+ movie.sizep # 480 (value of size on progressive)
51
52
  movie.width # 640 (width of the movie in pixels)
52
53
  movie.height # 480 (height of the movie in pixels)
53
54
  movie.frame_rate # 16.72 (frames per second)
@@ -4,7 +4,7 @@ module FFMPEG
4
4
  class Movie
5
5
  attr_reader :path, :duration, :time, :bitrate, :rotation, :creation_time
6
6
  attr_reader :video_stream, :video_codec, :video_bitrate, :colorspace, :resolution, :sar, :dar
7
- attr_reader :audio_stream, :audio_codec, :audio_bitrate, :audio_sample_rate
7
+ attr_reader :audio_stream, :audio_codec, :audio_bitrate, :audio_sample_rate, :video_codec_short
8
8
  attr_reader :container, :sizep
9
9
 
10
10
  def initialize(path)
@@ -45,11 +45,12 @@ module FFMPEG
45
45
  if @video_stream
46
46
  commas_except_in_parenthesis = /(?:\([^()]*\)|[^,])+/ # regexp to handle "yuv420p(tv, bt709)" colorspace etc from http://goo.gl/6oi645
47
47
  @video_codec, @colorspace, resolution, video_bitrate = @video_stream.scan(commas_except_in_parenthesis).map(&:strip)
48
- @video_bitrate = video_bitrate =~ %r(\A(\d+) kb/s\Z) ? $1.to_i : nil
49
- @resolution = resolution.split(" ").first rescue nil # get rid of [PAR 1:1 DAR 16:9]
50
- @sizep = @resolution.split("x").last.to_i rescue nil
51
- @sar = $1 if @video_stream[/SAR (\d+:\d+)/]
52
- @dar = $1 if @video_stream[/DAR (\d+:\d+)/]
48
+ @video_codec_short = @video_codec.split.first
49
+ @video_bitrate = video_bitrate =~ %r(\A(\d+) kb/s\Z) ? $1.to_i : nil
50
+ @resolution = resolution.split(" ").first rescue nil # get rid of [PAR 1:1 DAR 16:9]
51
+ @sizep = @resolution.split("x").last.to_i rescue nil
52
+ @sar = $1 if @video_stream[/SAR (\d+:\d+)/]
53
+ @dar = $1 if @video_stream[/DAR (\d+:\d+)/]
53
54
  end
54
55
 
55
56
  if @audio_stream
@@ -1,3 +1,3 @@
1
1
  module FFMPEG
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r7streamio_ffmpeg
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Martins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-18 00:00:00.000000000 Z
11
+ date: 2014-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec