Skip to content

Commit

Permalink
Correcting errors and minor modifications
Browse files Browse the repository at this point in the history
With this parameters "-vcodec", "copy", "-acodec", "copy" the output video was wrong(starting time was wrong and the video freezed after a few seconds)
But when i remove those the output video was exaclty like I want to
  • Loading branch information
gpantelis committed Jun 3, 2017
1 parent 1c5c633 commit 1ddb7b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moviepy/video/io/ffmpeg_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ def ffmpeg_extract_subclip(filename, t1, t2, targetname=None):
name,ext = os.path.splitext(filename)
if not targetname:
T1, T2 = [int(1000*t) for t in [t1, t2]]
targetname = name+ "%sSUB%d_%d.%s"(name, T1, T2, ext)
targetname = "%sSUB%d_%d.%s"%(name, T1, T2, ext)

cmd = [get_setting("FFMPEG_BINARY"),"-y",
"-i", filename,
"-ss", "%0.2f"%t1,
"-t", "%0.2f"%(t2-t1),
"-vcodec", "copy", "-acodec", "copy", targetname]
targetname]

subprocess_call(cmd)

Expand Down

0 comments on commit 1ddb7b9

Please sign in to comment.