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

Video duration fix #1063

Merged
merged 5 commits into from
Jun 6, 2020
Merged
Changes from 2 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
7 changes: 4 additions & 3 deletions moviepy/video/io/ffmpeg_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,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
-----------
Expand Down Expand Up @@ -246,7 +246,8 @@ def ffmpeg_parse_infos(filename, print_infos=False, check_duration=True,

# open the file in a pipe, provoke an error, read output
is_GIF = filename.endswith('.gif')
cmd = [get_setting("FFMPEG_BINARY"), "-i", filename]
cmd = [get_setting("FFMPEG_BINARY"), "-i", filename, "-acodec", "copy",
"-f", "null", "-"]
if is_GIF:
cmd += ["-f", "null", "/dev/null"]

Expand Down