diff --git a/CHANGELOG.md b/CHANGELOG.md index 2154a4fb9..2ac2fb135 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added ### Changed +- `ffmpeg_parse_infos()` and `VideoFileClip` now detect the actual duration of the decoded video instead of the duration stored in its metadata [#1063] ### Deprecated @@ -22,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed + ## [v2.0.0.dev1](https://github.com/zulko/moviepy/tree/v2.0.0.dev1) (2020-06-04) [Full Changelog](https://github.com/zulko/moviepy/compare/v1.0.3...v2.0.0.dev1) diff --git a/moviepy/video/io/ffmpeg_reader.py b/moviepy/video/io/ffmpeg_reader.py index ca633ca93..c37371795 100644 --- a/moviepy/video/io/ffmpeg_reader.py +++ b/moviepy/video/io/ffmpeg_reader.py @@ -226,8 +226,8 @@ def ffmpeg_read_image(filename, with_mask=True): Wraps FFMPEG_Videoreader to read just one image. Returns an ImageClip. - This function is not meant to be used directly in MoviePy, - use ImageClip instead to make clips out of image files. + This function is not meant to be used directly in MoviePy. + Use ImageClip instead to make clips out of image files. Parameters ----------- @@ -263,7 +263,7 @@ def ffmpeg_parse_infos( # open the file in a pipe, provoke an error, read output is_GIF = filename.endswith(".gif") - cmd = [FFMPEG_BINARY, "-i", filename] + cmd = [FFMPEG_BINARY, "-i", filename, "-acodec", "copy", "-f", "null", "-"] if is_GIF: cmd += ["-f", "null", "/dev/null"]