1) ffmpeg -i video.mpg image%d.jpg
2) python jpg-bgucore.py SRC DEST
3) ffmpeg -f image2 -i transfor%d.jpg video.mpg
import Image import random import sys k = 0 for k in range(8750): listedelist = [] for j in range(20): liste = [] nomimage = sys.argv[1] + "/image"+ str(j+k) + ".jpg" im = Image.open(nomimage) for i in range(im.size[1]): box = (0,i, im.size[0],i+1) liste.append(im.crop(box)) listedelist.append(liste) new_im = Image.new('RGB', (im.size[0],im.size[1])) for i in range(im.size[1]): new_im.paste(listedelist[random.randint(0,19)][i],(0,i)) nomimagetr = sys.argv[2] + "/transfor" + str(k) + ".jpg" new_im.save(nomimagetr) k += 1
Hors ligne
Pages: 1