Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f0fbadb

Browse filesBrowse files
committed
Force frame rate of FFMpegFileWriter input
The output video file was observed to skip frames, when input frame rate does not match output (e.g., when fps=1, or interval=1000). See https://www.ffmpeg.org/ffmpeg.html#Description for a description of the solution.
1 parent 838502e commit f0fbadb
Copy full SHA for f0fbadb

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎lib/matplotlib/animation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/animation.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ class FFMpegFileWriter(FileMovieWriter, FFMpegBase):
446446
def _args(self):
447447
# Returns the command line parameters for subprocess to use
448448
# ffmpeg to create a movie using a collection of temp images
449-
return [self.bin_path(), '-i', self._base_temp_name(),
449+
return [self.bin_path(), '-r', str(self.fps), '-i', self._base_temp_name(),
450450
'-vframes', str(self._frame_counter),
451451
'-r', str(self.fps)] + self.output_args
452452

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.