Permalink
Browse files

Add -ss to encoding options

Adds seek_time method to encoding options hash, which enables selecting
a seek time.
  • Loading branch information...
1 parent 025a935 commit 49c12219590c66a901ba920912f7643140324ed5 @mistydemeo mistydemeo committed Oct 3, 2011
Showing with 8 additions and 0 deletions.
  1. +4 −0 lib/ffmpeg/encoding_options.rb
  2. +4 −0 spec/ffmpeg/encoding_options_spec.rb
@@ -135,6 +135,10 @@ def convert_file_preset(value)
def convert_keyframe_interval(value)
"-g #{value}"
end
+
+ def convert_seek_time(value)
+ "-ss #{value}"
+ end
def convert_custom(value)
value
@@ -110,6 +110,10 @@ module FFMPEG
it "should convert file preset" do
EncodingOptions.new(:file_preset => "max.ffpreset").to_s.should == "-fpre max.ffpreset"
end
+
+ it "should specify seek time" do
+ EncodingOptions.new(:seek_time => 1).to_s.should == "-ss 1"
+ end
it "should put the parameters in order of codecs, presets, others" do
opts = Hash.new

0 comments on commit 49c1221

Please sign in to comment.