Video editing with Python
Change docs and comments to reflect default fps_source changing from 'tbr' to 'fps' (#1327)
Tom Burrows3a6f0148a2c0
diff --git a/moviepy/video/io/VideoFileClip.py b/moviepy/video/io/VideoFileClip.pyindex aa99e0e7..fd7b38f9 100644--- a/moviepy/video/io/VideoFileClip.py+++ b/moviepy/video/io/VideoFileClip.py@@ -47,9 +47,9 @@ class VideoFileClip(VideoClip):https://ffmpeg.org/ffmpeg-scaler.htmlfps_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_fmtOptional: Pixel format for the video to read. If is not specifieddiff --git a/moviepy/video/io/ffmpeg_reader.py b/moviepy/video/io/ffmpeg_reader.pyindex d3566624..cbacc9bb 100644--- a/moviepy/video/io/ffmpeg_reader.py+++ b/moviepy/video/io/ffmpeg_reader.py@@ -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).