Exemple #1
0
def make_video():

    clips=[]

    for video in mergeSequence:
        #print mergeSequence
    #print each video of the sequence and tagsself.and colors

    #filename = "./videos/" + video['id']
        filename = video["path"]
    #print video
    #print filename
        clip = Clip(filename, start=video['start'], end= video['end'])
        if "abstract" in video["tags"]:
            clip.fadein(1)
            clip.fadeout(1.5)
        for video in beginning:
            clip.fadein(3)
        for video in ending:
            clip.fadeout(1.5)
        for video in randomSounds:
            clip.fadein(1)
            clip.fadeout(1.5)


        clip.glow()
        clips.append(clip)
        print (mergeSequence[0]["id"])

    composition = Composition(clips,singletrack=True, width=800, height=800)
    videoName = "render/videoMergeClassic" + datetime.datetime.now().strftime("%Y%m%d%H%M%S") +".mp4"
    composition.save(videoName)
Exemple #2
0
def make_video():

    clips = []

    for video in mergeSequence:
        #print mergeSequence
        #print each video of the sequence and tagsself.and colors

        #filename = "./videos/" + video['id']
        filename = video["path"]
        #print video
        #print filename
        clip = Clip(filename, start=video['start'], end=video['end'])
        if "abstract" in video["tags"]:
            clip.fadein(1)
            clip.fadeout(1.5)
        for video in beginning:
            clip.fadein(3)
        for video in ending:
            clip.fadeout(1.5)
        for video in randomSounds:
            clip.fadein(1)
            clip.fadeout(1.5)

        clip.glow()
        clips.append(clip)
        print mergeSequence[0]["id"]

    composition = Composition(clips, singletrack=True, width=800, height=800)
    composition.save('mergeVideo3_nature4.mp4')
Exemple #3
0
def make_video():

    clips = []
    blankclip = Clip('black.mp4')
    clips.append(blankclip)

    for video in mergeSequence:
        #print mergeSequence
        #print each video of the sequence and tagsself.and colors

        #filename = "./videos/" + video['id']
        filename = video["path"]
        #print video
        print(filename)
        # if filename.endswith('mp3'):
        #    continue
        clip = Clip(filename, start=video['start'], end=video['end'])
        # clip.position(x=0, y=0, w='100%', h='100%', distort=True)
        # clip.fx('crop', {
        #     'center': 1
        # })
        # clip.fx('affine', {
        #     'transition.geometry': '0/0:640x640',
        #     'transition.fill': 1,
        #     'transition.distort': 1,
        #     'transition.scale': 1,
        #     'scale': 1
        # })

        if "abstract" in video["tags"]:
            clip.fadein(1)
            clip.fadeout(1.5)
        if video in beginning:
            clip.fadein(3)
        if video in ending:
            clip.fadeout(1.5)
        if video in randomSounds:
            clip.fadein(1)
            clip.fadeout(1.5)

        clip.glow()
        clips.append(clip)
        print(mergeSequence[0]["id"])
    # clips = clips[0:3]
    composition = Composition(clips, singletrack=True)
    videoName = "render/videoMergeClassic" + datetime.datetime.now().strftime(
        "%Y%m%d%H%M%S") + ".mp4"
    #composition.save(videoName)
    composition.preview()
def make_video(tag):

    clips = []

    for video in mergeSequence:
        #print mergeSequence
        #print each video of the sequence and tagsself.and colors

        #filename = "./videos/" + video['id']
        filename = video["path"]
        #print video
        #print filename
        clip = Clip(filename, start=video['start'], end=video['end'])
        if "abstract" in video["tags"]:
            clip.fadein(1)
            clip.fadeout(1.5)
        if video in beginning:
            clip.fadein(3)
        if video in ending:
            clip.fadeout(1.5)
        if video in randomSounds:
            clip.fadein(1)
            clip.fadeout(1.5)

        clip.glow()
        clips.append(clip)
        #print (mergeSequence[0]["id"])

    composition = Composition(clips, singletrack=True, width=800, height=800)
    #videoName = "render/videoConnected10" + datetime.datetime.now().strftime("%Y%m%d%H%M%S") +".mp4"
    # videoName = "render/video_" + tag +  datetime.datetime.now().strftime("%Y%m%d%H%M%S") +".mp4"
    videoName = "render/video_" + tag + datetime.datetime.now().strftime(
        "%Y%m%d%H%M%S") + ".mov"
    composition.save(videoName)
    #composition.save(videoName)
    #datetime.datetime.now().strftime("%Y%m%d%H%M&S")

    #setup a client (api adress, localhost)
    client = udp_client.UDPClient("127.0.0.1", 8000)
    print("testing message")

    #composition.preview()

    #now built the messagingSenderId
    msg = osc_message_builder.OscMessageBuilder(address="/video")
    msg.add_arg("nature")
    msg = msg.build()
    client.send(msg)
Exemple #5
0
from vidpy import Clip, Composition

background_clip = Clip('videos/hand1.mp4')
clip = Clip('videos/hand2.mp4')

# create a clip to use a as a mask
# you can use use a video,text clip or an image
mask = Clip('videos/mask.png')

# you can also add effects to the mask
mask.glow('0=0;200=.9')

# make sure that the duration of the mask is the same as the clip
# (or don't, if you only want the mask to affect part of the clip)
mask.set_duration(clip.duration)

# set the mask on the clip
clip.set_mask(mask)

comp = Composition([background_clip, clip])
comp.preview()