Skip to content
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

Change docs and comments to reflect default fps_source changing from 'tbr' to 'fps' #1327

Merged
merged 1 commit into from
Oct 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions moviepy/video/io/VideoFileClip.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class VideoFileClip(VideoClip):
https://ffmpeg.org/ffmpeg-scaler.html

fps_source:
The fps value to collect from the metadata. Set by default to 'tbr', but
can be set to 'fps', which may be helpful if importing slow-motion videos
that get messed up otherwise.
The fps value to collect from the metadata. Set by default to 'fps', but
can be set to 'tbr', which may be helpful if you are finding that it is reading
the incorrect fps from the file.

pix_fmt
Optional: Pixel format for the video to read. If is not specified
Expand Down
4 changes: 2 additions & 2 deletions moviepy/video/io/ffmpeg_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,8 @@ def ffmpeg_parse_infos(

# Get the frame rate. Sometimes it's 'tbr', sometimes 'fps', sometimes
# tbc, and sometimes tbc/2...
# Current policy: Trust tbr first, then fps unless fps_source is
# specified as 'fps' in which case try fps then tbr
# Current policy: Trust fps first, then tbr unless fps_source is
# specified as 'tbr' in which case try tbr then fps

# If result is near from x*1000/1001 where x is 23,24,25,50,
# replace by x*1000/1001 (very common case for the fps).
Expand Down