-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
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.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -446,7 +446,7 @@ 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(), '-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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is now too long.