Last active
August 25, 2018 17:03
-
-
Save castrors/855d8dc94c8f9b7dd5a77f0d7c26e782 to your computer and use it in GitHub Desktop.
Converter todos os arquivos de uma pasta para gif. Pre requisito: instalar ffmpeg. Pra linux e mac é só colocar esse arquivo em uma pasta que voce tem os vídeos e rodar por commandline. Qualquer dúvida pode me chamar que eu ajudo a usar.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
for filename in os.listdir('.'): | |
if filename.endswith(".webm") or filename.endswith(".mp4"): | |
os.system('ffmpeg -i %s -r 10 -vf scale=480:-1 %s.gif' % (filename, filename)) | |
continue | |
else: | |
continue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment