spec/ffmpeg/encoding_options_spec.rb in streamio-ffmpeg-0.7.0 vs spec/ffmpeg/encoding_options_spec.rb in streamio-ffmpeg-0.7.1
- old
+ new
@@ -100,9 +100,18 @@
it "should convert file preset" do
EncodingOptions.new(:file_preset => "max.ffpreset").to_s.should == "-fpre max.ffpreset"
end
+ it "should put the preset parameters last" do
+ opts = Hash.new
+ opts[:video_codec] = "libx264"
+ opts[:video_preset] = "normal"
+
+ converted = EncodingOptions.new(opts).to_s
+ converted.should == "-vcodec libx264 -vpre normal"
+ end
+
it "should convert a lot of them simultaneously" do
converted = EncodingOptions.new(:video_codec => "libx264", :audio_codec => "aac", :video_bitrate => "1000k").to_s
converted.should match(/-acodec aac/)
end