I write this little app, in order for me to create funny gifs that I can send to my friends.I used the sys module to be able to pass 2 arguments inside the console, first one would be the actual file's name, and the second one what I would want to name the GIF.I decided to use sys module to have the ability to name files right in the console because otherwise I should've open the app in a text editor and edit the file name everytime.
#I used moviepy to be able to convert the file to gif
#I used sys to be able to pass 2 arguments in the console
from moviepy.editor import VideoFileClip
import sys
import os
clip = sys.argv[1] #This is the first argument and is the mp4 file's name
name = sys.argv[2] + '.gif' #This is the second argument, what you want to name the file and the extension
gifClip = VideoFileClip(clip)
gifClip.write_gif(name)