@@ -379,8 +379,9 @@ class FFMpegFileWriter(FileMovieWriter, FFMpegBase):
379379 def _args (self ):
380380 # Returns the command line parameters for subprocess to use
381381 # ffmpeg to create a movie using a collection of temp images
382- return [self .bin_path (), '-r' , str (self .fps ), '-i' ,
383- self ._base_temp_name ()] + self .output_args
382+ return [self .bin_path (), '-vframes' , str (self ._frame_counter ),
383+ '-r' , str (self .fps ), '-i' ,
384+ self ._base_temp_name ()] + self .output_args
384385
385386
386387# Base class of mencoder information. Contains configuration key information
@@ -435,7 +436,8 @@ def _args(self):
435436 # Returns the command line parameters for subprocess to use
436437 # mencoder to create a movie
437438 return [self .bin_path (),
438- 'mf://%s*.%s' % (self .temp_prefix , self .frame_format ), '-mf' ,
439+ 'mf://%s*.%s' % (self .temp_prefix , self .frame_format ),
440+ '-frames' , str (self ._frame_counter ), '-mf' ,
439441 'type=%s:fps=%d' % (self .frame_format , self .fps )] + self .output_args
440442
441443
0 commit comments