Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Force frame rate of FFMpegFileWriter input #5453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 11, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Conform to PEP8
Ensure line length is <80.
  • Loading branch information
auneri committed Nov 10, 2015
commit 018f0e4576e6c87639631be4605da82ce16db0eb
3 changes: 2 additions & 1 deletion lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ class FFMpegFileWriter(FileMovieWriter, FFMpegBase):
def _args(self):
# Returns the command line parameters for subprocess to use
# ffmpeg to create a movie using a collection of temp images
return [self.bin_path(), '-r', str(self.fps), '-i', self._base_temp_name(),
return [self.bin_path(), '-r', str(self.fps),
'-i', self._base_temp_name(),
'-vframes', str(self._frame_counter),
'-r', str(self.fps)] + self.output_args
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait-a-minute... this argument is already in the list. Maybe the issue is where it is positioned?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you closely read the link in the original post, you'll see that the first -r controls the rate for the raw input, while the second -r controls the rate for the output. Blame the ffmpeg guys for their command-line syntax.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes. And I looked back at the man-page on my CentOS6 system, and I can confirm that it describes that very behavior.


Expand Down