diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-05-23 16:10:09 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-05-23 16:12:33 +0530 |
commit | d9473db78ad4c002de53f4cc7c9b045399f8ab72 (patch) | |
tree | 6a5a2d73f9157fc39a9e710c7cc3cb8b25a59320 /yt_dlp/postprocessor/ffmpeg.py | |
parent | 11233f2afdfc55d3672a7c17ad919a3f70005c19 (diff) | |
download | hypervideo-pre-d9473db78ad4c002de53f4cc7c9b045399f8ab72.tar.lz hypervideo-pre-d9473db78ad4c002de53f4cc7c9b045399f8ab72.tar.xz hypervideo-pre-d9473db78ad4c002de53f4cc7c9b045399f8ab72.zip |
[ModifyChapters] Fix repeated removal of small segments
Closes #3846
Diffstat (limited to 'yt_dlp/postprocessor/ffmpeg.py')
-rw-r--r-- | yt_dlp/postprocessor/ffmpeg.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py index cb33c3582..5a1d8561f 100644 --- a/yt_dlp/postprocessor/ffmpeg.py +++ b/yt_dlp/postprocessor/ffmpeg.py @@ -284,12 +284,12 @@ class FFmpegPostProcessor(PostProcessor): if fatal: raise PostProcessingError(f'Unable to determine video duration: {e.msg}') - def _duration_mismatch(self, d1, d2): + def _duration_mismatch(self, d1, d2, tolerance=2): if not d1 or not d2: return None # The duration is often only known to nearest second. So there can be <1sec disparity natually. # Further excuse an additional <1sec difference. - return abs(d1 - d2) > 2 + return abs(d1 - d2) > tolerance def run_ffmpeg_multiple_files(self, input_paths, out_path, opts, **kwargs): return self.real_run_ffmpeg( |