Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. import numpy as np
  2. from moviepy.editor import *
  3. clip_list = []
  4. class_ = 'Merge with Gore on Left'
  5. items = [('Approaching'+ ' '+class_,2.89), ('Entering '+ class_,2.89), ('Passing '+ class_,3.89)]
  6. for text,time in items:
  7. #font="Amiri-Bold",
  8.  
  9. txtclip = TextClip(text,color='white', font = 'Courier',
  10. fontsize=40, transparent = True).set_duration(time)
  11.  
  12. clip_list.append(txtclip)
  13. #5,100kerning = None,
  14.  
  15. h,w = txtsize = txtclip.size
  16. txtclip = concatenate(clip_list, method = 'compose').on_color(size= (h+120,w+10), color = (0,0,0), col_opacity = 0.6).set_position(("center","bottom"))#set_pos((0.25, 0.85),relative = True)
  17. print (txtsize)
  18. #txtclip_c = txtclip.on_color(size = (h,w),color = (0,0,0),col_opacity = 0.6)
  19. #print (txtclip)
  20. clip = VideoFileClip('0_unmarked.mp4')
  21. final_clip = CompositeVideoClip([clip, txtclip])
  22. final_clip.write_videofile('out.mp4')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement