|
@@ -271,12 +271,12 @@ def anchor_video_v2(name_hash,name,text_content, image_urls,avatar):
|
|
|
|
|
|
main_timer = 0
|
|
|
|
|
|
- LOGO_OP = openshot.FFmpegReader(dir_video+"LOGO_OP.mp4")
|
|
|
+ LOGO_OP = openshot.FFmpegReader(dir_video+"LOGO_OP_4.mp4")
|
|
|
LOGO_OP.Open() # Open the reader
|
|
|
LOGO_OP_clip = video_photo_clip(vid=LOGO_OP,layer=4,position=0,end=LOGO_OP.info.duration
|
|
|
,location_y=-0.03,scale_x=0.8,scale_y=0.704)
|
|
|
t.AddClip(LOGO_OP_clip)
|
|
|
- bg_head = openshot.FFmpegReader(dir_video+"bg_head.avi")
|
|
|
+ bg_head = openshot.FFmpegReader(dir_video+"complete_head_aispokesgirl.mp4")
|
|
|
bg_head.Open()
|
|
|
bg_head_clip = video_photo_clip(vid=bg_head,layer=2,position=0,end=LOGO_OP.info.duration,ck=ck)
|
|
|
t.AddClip(bg_head_clip)
|
|
@@ -349,7 +349,7 @@ def anchor_video_v2(name_hash,name,text_content, image_urls,avatar):
|
|
|
LOGO_ED.Close()
|
|
|
|
|
|
|
|
|
- bg = openshot.FFmpegReader(dir_video+"bg.mp4")
|
|
|
+ bg = openshot.FFmpegReader(dir_video+"complete_double_aispokesgirl.mp4")
|
|
|
bg.Open()
|
|
|
bg_times = math.floor(main_timer+ED_duration/bg.info.duration)
|
|
|
left_time = (main_timer+ED_duration) % bg.info.duration
|
|
@@ -358,14 +358,14 @@ def anchor_video_v2(name_hash,name,text_content, image_urls,avatar):
|
|
|
bg.Close()
|
|
|
bg_timer = head_duration
|
|
|
for idx in range(bg_times):
|
|
|
- bg_list[idx] = openshot.FFmpegReader(dir_video+"bg.mp4")
|
|
|
+ bg_list[idx] = openshot.FFmpegReader(dir_video+"complete_double_aispokesgirl.mp4")
|
|
|
bg_list[idx].Open()
|
|
|
bg_clip_list[idx] = video_photo_clip(bg_list[idx],layer=2,position=bg_timer
|
|
|
,end=bg_list[idx].info.duration,ck=ck)
|
|
|
t.AddClip(bg_clip_list[idx])
|
|
|
bg_timer += bg_list[idx].info.duration
|
|
|
bg_list[idx].Close()
|
|
|
- bg_left = openshot.FFmpegReader(dir_video+"bg.mp4")
|
|
|
+ bg_left = openshot.FFmpegReader(dir_video+"complete_double_aispokesgirl.mp4")
|
|
|
bg_left.Open()
|
|
|
bg_left_clip = video_photo_clip(bg_left,layer=2,position=bg_timer,end=left_time,ck=ck)
|
|
|
t.AddClip(bg_left_clip)
|
|
@@ -389,7 +389,7 @@ def anchor_video_v2(name_hash,name,text_content, image_urls,avatar):
|
|
|
f=t.GetFrame(n)
|
|
|
w.WriteFrame(f)
|
|
|
|
|
|
- #notify_group(name+"的影片已經產生完成囉! www.choozmo.com:8168/"+video_sub_folder+name_hash+".mp4")
|
|
|
+ notify_group(name+"的影片已經產生完成囉! www.choozmo.com:8168/"+video_sub_folder+name_hash+".mp4")
|
|
|
t.Close()
|
|
|
w.Close()
|
|
|
print("video at : www.choozmo.com:8168/"+video_sub_folder+name_hash+".mp4")
|
|
@@ -413,13 +413,13 @@ def anchor_video_eng(name_hash,name,text_content, image_urls,sub_titles,avatar):
|
|
|
|
|
|
main_timer = 0
|
|
|
#add logo
|
|
|
- LOGO_OP = openshot.FFmpegReader(dir_video+"LOGO_OP.mp4")
|
|
|
+ LOGO_OP = openshot.FFmpegReader(dir_video+"LOGO_OP_4.mp4")
|
|
|
LOGO_OP.Open() # Open the reader
|
|
|
LOGO_OP_clip = video_photo_clip(vid=LOGO_OP,layer=4,position=0,end=LOGO_OP.info.duration
|
|
|
,location_y=-0.03,scale_x=0.8,scale_y=0.704)
|
|
|
t.AddClip(LOGO_OP_clip)
|
|
|
#add background video (head is different)
|
|
|
- bg_head = openshot.FFmpegReader(dir_video+"bg_head_eng.mp4")
|
|
|
+ bg_head = openshot.FFmpegReader(dir_video+"complete_head_aispokesgirl.mp4")
|
|
|
bg_head.Open()
|
|
|
bg_head_clip = video_photo_clip(vid=bg_head,layer=2,position=0,end=LOGO_OP.info.duration,ck=ck)
|
|
|
t.AddClip(bg_head_clip)
|
|
@@ -488,7 +488,7 @@ def anchor_video_eng(name_hash,name,text_content, image_urls,sub_titles,avatar):
|
|
|
LOGO_ED.Close()
|
|
|
|
|
|
|
|
|
- bg = openshot.FFmpegReader(dir_video+"bg_eng.mp4")
|
|
|
+ bg = openshot.FFmpegReader(dir_video+"complete_double_aispokesgirl.mp4")
|
|
|
bg.Open()
|
|
|
bg_times = math.floor(main_timer+ED_duration/bg.info.duration)
|
|
|
left_time = (main_timer+ED_duration) % bg.info.duration
|
|
@@ -497,14 +497,14 @@ def anchor_video_eng(name_hash,name,text_content, image_urls,sub_titles,avatar):
|
|
|
bg.Close()
|
|
|
bg_timer = head_duration
|
|
|
for idx in range(bg_times):
|
|
|
- bg_list[idx] = openshot.FFmpegReader(dir_video+"bg_eng.mp4")
|
|
|
+ bg_list[idx] = openshot.FFmpegReader(dir_video+"complete_double_aispokesgirl.mp4")
|
|
|
bg_list[idx].Open()
|
|
|
bg_clip_list[idx] = video_photo_clip(bg_list[idx],layer=2,position=bg_timer
|
|
|
,end=bg_list[idx].info.duration,ck=ck)
|
|
|
t.AddClip(bg_clip_list[idx])
|
|
|
bg_timer += bg_list[idx].info.duration
|
|
|
bg_list[idx].Close()
|
|
|
- bg_left = openshot.FFmpegReader(dir_video+"bg_eng.mp4")
|
|
|
+ bg_left = openshot.FFmpegReader(dir_video+"complete_double_aispokesgirl.mp4")
|
|
|
bg_left.Open()
|
|
|
bg_left_clip = video_photo_clip(bg_left,layer=2,position=bg_timer,end=left_time,ck=ck)
|
|
|
t.AddClip(bg_left_clip)
|
|
@@ -528,7 +528,7 @@ def anchor_video_eng(name_hash,name,text_content, image_urls,sub_titles,avatar):
|
|
|
f=t.GetFrame(n)
|
|
|
w.WriteFrame(f)
|
|
|
|
|
|
-
|
|
|
+ notify_group(name+"(ENG)的影片已經產生完成囉! www.choozmo.com:8168/"+video_sub_folder+name_hash+".mp4")
|
|
|
t.Close()
|
|
|
w.Close()
|
|
|
print("video at : www.choozmo.com:8168/"+video_sub_folder+name_hash+".mp4")
|
|
@@ -544,7 +544,7 @@ class video_service(rpyc.Service):
|
|
|
|
|
|
|
|
|
from rpyc.utils.server import ThreadedServer
|
|
|
-t = ThreadedServer(video_service, port=8858)
|
|
|
+t = ThreadedServer(video_service, port=8878)
|
|
|
print('service started')
|
|
|
t.start()
|
|
|
|