seems that mencoder will sometimes fail when transcoding for a
authorgc <gc>
Wed, 10 Aug 2005 19:46:06 +0000 (19:46 +0000)
committergc <gc>
Wed, 10 Aug 2005 19:46:06 +0000 (19:46 +0000)
too low number of frames. make it one second of video.

lib/booh/booh-lib.rb

index 52141361544e921fcf203993613c64ae09503211..81fa37cdeab8c6f0be14b430902e74325d29c522 100644 (file)
@@ -329,7 +329,7 @@ module Booh
                         return false
                     elsif results =~ /V: import format.*unknown/ || !File.exists?(orig_image)
                         msg 2, _("* could not extract first image of video %s with transcode, will try first converting with mencoder") % orig
                         return false
                     elsif results =~ /V: import format.*unknown/ || !File.exists?(orig_image)
                         msg 2, _("* could not extract first image of video %s with transcode, will try first converting with mencoder") % orig
-                        cmd = "mencoder '#{orig}' -nosound -ovc lavc -lavcopts vcodec=mjpeg -o '#{dest_dir}/#{File.basename(orig)}.avi' -frames #{frame_offset+1} -fps 25 >/dev/null 2>/dev/null"
+                        cmd = "mencoder '#{orig}' -nosound -ovc lavc -lavcopts vcodec=mjpeg -o '#{dest_dir}/#{File.basename(orig)}.avi' -frames #{frame_offset+26} -fps 25 >/dev/null 2>/dev/null"
                         msg 2, cmd
                         system cmd
                         if File.exists?("#{dest_dir}/#{File.basename(orig)}.avi")
                         msg 2, cmd
                         system cmd
                         if File.exists?("#{dest_dir}/#{File.basename(orig)}.avi")