streamio-ffmpeg 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.7.1 2010-07-08
2
+
3
+ * Make sure preset parameters are always put last to avoid them ending up before any codec assignments
4
+ * Testing against a fresh ffmpeg build (r24069)
5
+
1
6
  == 0.7.0 2010-07-07
2
7
 
3
8
  * Support for ffpresets through video_preset, audio_preset and file_preset encoding options
data/README.rdoc CHANGED
@@ -6,7 +6,7 @@ Simple yet powerful wrapper around the ffmpeg command for reading metadata and t
6
6
 
7
7
  (sudo) gem install streamio-ffmpeg
8
8
 
9
- This version is written against an ffmpeg build from april 2010 (tested against r22811). So no guarantees with earlier (or much later) versions. Output and input standards have inconveniently changed rather a lot between versions of ffmpeg. My goal is to keep this library in sync with new versions of ffmpeg as they come along.
9
+ This version is written against an ffmpeg build from july 2010 (tested against r24069). So no guarantees with earlier (or much later) versions. Output and input standards have inconveniently changed rather a lot between versions of ffmpeg. My goal is to keep this library in sync with new versions of ffmpeg as they come along.
10
10
 
11
11
  == Usage
12
12
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.0
1
+ 0.7.1
@@ -5,11 +5,16 @@ module FFMPEG
5
5
  end
6
6
 
7
7
  def to_s
8
- parameters = collect do |key, value|
8
+ params = collect do |key, value|
9
9
  send("convert_#{key}", value) if value && supports_option?(key)
10
- end.join(" ")
11
- parameters << " #{convert_aspect(calculate_aspect)}" if calculate_aspect?
12
- parameters
10
+ end
11
+
12
+ # put the preset parameters last
13
+ params = params.reject { |p| p =~ /\-.pre/ } + params.select { |p| p =~ /\-.pre/ }
14
+
15
+ params_string = params.join(" ")
16
+ params_string << " #{convert_aspect(calculate_aspect)}" if calculate_aspect?
17
+ params_string
13
18
  end
14
19
 
15
20
  def width
@@ -102,6 +102,15 @@ module FFMPEG
102
102
  EncodingOptions.new(:file_preset => "max.ffpreset").to_s.should == "-fpre max.ffpreset"
103
103
  end
104
104
 
105
+ it "should put the preset parameters last" do
106
+ opts = Hash.new
107
+ opts[:video_codec] = "libx264"
108
+ opts[:video_preset] = "normal"
109
+
110
+ converted = EncodingOptions.new(opts).to_s
111
+ converted.should == "-vcodec libx264 -vpre normal"
112
+ end
113
+
105
114
  it "should convert a lot of them simultaneously" do
106
115
  converted = EncodingOptions.new(:video_codec => "libx264", :audio_codec => "aac", :video_bitrate => "1000k").to_s
107
116
  converted.should match(/-acodec aac/)
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{streamio-ffmpeg}
8
- s.version = "0.7.0"
8
+ s.version = "0.7.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David Backeus"]
12
- s.date = %q{2010-07-07}
12
+ s.date = %q{2010-07-08}
13
13
  s.description = %q{Simple wrapper around ffmpeg to get metadata from movies and do transcoding}
14
14
  s.email = %q{duztdruid@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: streamio-ffmpeg
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 0
10
- version: 0.7.0
9
+ - 1
10
+ version: 0.7.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Backeus
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-07 00:00:00 +02:00
18
+ date: 2010-07-08 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency