Skip to content

Instantly share code, notes, and snippets.

@aravindpai
Last active September 4, 2019 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aravindpai/02140c23f8e0ca9c0baba1bb348fde42 to your computer and use it in GitHub Desktop.
Save aravindpai/02140c23f8e0ca9c0baba1bb348fde42 to your computer and use it in GitHub Desktop.
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
start=np.array(df['start'])
end=np.array(df['end'])
for i in range(len(df)):
if(i!=0):
start_lim = start[i] - 5
else:
 start_lim = start[i] 
end_lim   = end[i]   
filename="highlight" + str(i+1) + ".mp4"
 ffmpeg_extract_subclip("powerplay.mp4",start_lim,end_lim,targetname=filename)
@MrNiebit
Copy link

MrNiebit commented Sep 4, 2019

what is it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment