|
@@ -124,7 +124,7 @@ async def make_anchor_video_v2(req:request):
|
|
|
time_stamp = datetime.fromtimestamp(time.time())
|
|
|
time_stamp = time_stamp.strftime("%Y-%m-%d %H:%M:%S")
|
|
|
pk = log_table.insert({'name':req.name,'text_content':txt_content_seperate_by_dot,'image_urls':img_urls_seperate_by_dot,'timestamp':time_stamp})
|
|
|
- x = threading.Thread(target=anchor_video_v2, args=(req.name, req.text_content, req.image_urls))
|
|
|
+ x = threading.Thread(target=anchor_video_v2, args=(req.name, req.text_content, req.image_urls,req.avatar))
|
|
|
x.start()
|
|
|
return {"msg":"製作影片需要時間,請您耐心等候 稍後可以在www.choozmo.com:8168/"+req.name+".mp4 中觀看"}
|
|
|
|
|
@@ -464,7 +464,7 @@ def generate_subtitle_image(name_hash,text_content):
|
|
|
|
|
|
|
|
|
|
|
|
-def anchor_video_v2(name,text_content, image_urls):
|
|
|
+def anchor_video_v2(name,text_content, image_urls,avatar):
|
|
|
#ws = create_connection("ws://www.choozmo.com:8888/progress")
|
|
|
progress = 0
|
|
|
name_hash = str(time.time()).replace('.','')
|
|
@@ -479,7 +479,7 @@ def anchor_video_v2(name,text_content, image_urls):
|
|
|
|
|
|
progress_per_video = int(40/len(text_content))
|
|
|
for fname in range(len(text_content)):
|
|
|
- call_achor_video_v2(name_hash+"/"+str(fname))
|
|
|
+ call_achor_video_v2(name_hash+"/"+str(fname),avatar)
|
|
|
progress += progress_per_video
|
|
|
#ws.send(str(progress))
|
|
|
print('step finish')
|
|
@@ -631,7 +631,7 @@ def anchor_video_v2(name,text_content, image_urls):
|
|
|
|
|
|
|
|
|
|
|
|
-def anchor_video_v3333(name,text_content, image_urls):
|
|
|
+def anchor_video_v3333(name,text_content, image_urls,avatar):
|
|
|
ws = create_connection("ws://www.choozmo.com:8888/progress")
|
|
|
progress = 0
|
|
|
|