<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -33,7 +33,7 @@ module RVideo # :nodoc:
           end
         end
     
-        abstract_attribute_formatter :resolution, :fps,
+        abstract_attribute_formatter :resolution, :deinterlace, :fps,
           :video_bit_rate, :video_bit_rate_tolerance,
           :video_bit_rate_min, :video_bit_rate_max,
           :audio_channels, :audio_bit_rate, :audio_sample_rate
@@ -118,11 +118,19 @@ module RVideo # :nodoc:
     
         ###
         # Resolution
-    
+
+        def deinterlace
+          format_deinterlace(get_deinterlace)
+        end
+
+        def get_deinterlace
+          { :deinterlace =&gt; @options['deinterlace'] ? true : false }
+        end
+
         def resolution
           format_resolution(get_resolution)
         end
-    
+
         def get_resolution
           inspect_original if @original.nil?
       
@@ -143,7 +151,7 @@ module RVideo # :nodoc:
             end
           end
         end
-    
+
         def get_fit_to_width_resolution
           w = @options['width']
       </diff>
      <filename>lib/rvideo/tools/abstract_tool.rb</filename>
    </modified>
    <modified>
      <diff>@@ -51,6 +51,10 @@ module RVideo
         'ffmpeg'
       end
       
+      def format_deinterlace(params={})
+        params[:deinterlace] ? &quot;-deinterlace&quot; : &quot;&quot;
+      end
+
       def format_fps(params={})
         &quot;-r #{params[:fps]}&quot;
       end</diff>
      <filename>lib/rvideo/tools/ffmpeg.rb</filename>
    </modified>
    <modified>
      <diff>@@ -81,13 +81,13 @@ module RVideo
         }.should raise_error(TranscoderError::ParameterError)
       end
       
-      it &quot;the should raise an error when a recipe includes a variable not supplied (2)&quot; do
+      it &quot;should raise an error when a recipe includes a variable not supplied (2)&quot; do
         lambda {
           ffmpeg = Ffmpeg.new(@simple_avi + &quot; $novar$&quot;, @options)
         }.should raise_error(TranscoderError::ParameterError)
       end
       
-      it &quot;the should not raise an error when a variable is supplied but nil&quot; do
+      it &quot;should not raise an error when a variable is supplied but nil&quot; do
         ffmpeg = Ffmpeg.new(@simple_avi, @options.merge(:resolution =&gt; nil))
         ffmpeg.command.should == &quot;ffmpeg -i '#{@options[:input_file]}' -ar 44100 -ab 64 -vcodec xvid -acodec mp3 -r 29.97 -y '#{@options[:output_file]}'&quot;
       end</diff>
      <filename>spec/units/abstract_tool_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -111,6 +111,18 @@ module RVideo
         ffmpeg = Ffmpeg.new(&quot;ffmpeg -i $input_file$ $video_bit_rate$ $video_bit_rate_min$ $video_bit_rate_max$ -y $output_file$&quot;, @options)
         ffmpeg.command.should == &quot;ffmpeg -i '#{@options[:input_file]}' -b 666k -minrate 666k -maxrate 666k -y '#{@options[:output_file]}'&quot;
       end
+
+      it &quot;supports :deinterlace =&gt; true&quot; do
+        @options.merge! :deinterlace =&gt; true
+        ffmpeg = Ffmpeg.new(&quot;ffmpeg -i $input_file$ $deinterlace$ -y $output_file$&quot;, @options)
+        ffmpeg.command.should == &quot;ffmpeg -i '#{@options[:input_file]}' -deinterlace -y '#{@options[:output_file]}'&quot;
+      end
+
+      it &quot;handles :deinterlace =&gt; false correct&quot; do
+        @options.merge! :deinterlace =&gt; false
+        ffmpeg = Ffmpeg.new(&quot;ffmpeg -i $input_file$ $deinterlace$ -y $output_file$&quot;, @options)
+        ffmpeg.command.should == &quot;ffmpeg -i '#{@options[:input_file]}'  -y '#{@options[:output_file]}'&quot;
+      end
       
       ###
       </diff>
      <filename>spec/units/ffmpeg_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f8e12f528c6fa1c995f90ad3fcfce1e94da5908f</id>
    </parent>
  </parents>
  <author>
    <name>Kai Krakow</name>
    <email>kai@kaishome.de</email>
  </author>
  <url>http://github.com/twinge/rvideo/commit/ffc32f136d0a402a16af8466474348c6031ca4ca</url>
  <id>ffc32f136d0a402a16af8466474348c6031ca4ca</id>
  <committed-date>2009-04-13T14:13:16-07:00</committed-date>
  <authored-date>2009-04-09T03:02:50-07:00</authored-date>
  <message>Add deinterlace option to ffmpeg tool

This new option is also covered by the spec tests. I did implement this
for ffmpeg only because my software only uses ffmpeg. You are free to
change this. ;-)</message>
  <tree>88b757e6cd3669ba4d27d8a2536fe4437b8e3837</tree>
  <committer>
    <name>Seth Thomas Rasmussen</name>
    <email>sethrasmussen@gmail.com</email>
  </committer>
</commit>
