|
@@ -449,7 +449,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):
|
|
- ws = create_connection("ws://www.choozmo.com:8888/progress")
|
|
|
|
|
|
+ #ws = create_connection("ws://www.choozmo.com:8888/progress")
|
|
progress = 0
|
|
progress = 0
|
|
m = hashlib.md5()
|
|
m = hashlib.md5()
|
|
m.update(name.encode("utf-8"))
|
|
m.update(name.encode("utf-8"))
|
|
@@ -458,16 +458,16 @@ def anchor_video_v2(name,text_content, image_urls):
|
|
print('sub image made')
|
|
print('sub image made')
|
|
file_prepare_v2(name, name_hash, text_content,image_urls)
|
|
file_prepare_v2(name, name_hash, text_content,image_urls)
|
|
progress = 10
|
|
progress = 10
|
|
- ws.send(str(progress))
|
|
|
|
|
|
+ #ws.send(str(progress))
|
|
sub_list=generate_subtitle_image(name_hash,text_content)
|
|
sub_list=generate_subtitle_image(name_hash,text_content)
|
|
progress = 20
|
|
progress = 20
|
|
- ws.send(str(progress))
|
|
|
|
|
|
+ #ws.send(str(progress))
|
|
|
|
|
|
progress_per_video = int(40/len(text_content))
|
|
progress_per_video = int(40/len(text_content))
|
|
for fname in range(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))
|
|
progress += progress_per_video
|
|
progress += progress_per_video
|
|
- ws.send(str(progress))
|
|
|
|
|
|
+ #ws.send(str(progress))
|
|
print('step finish')
|
|
print('step finish')
|
|
print('called............................................')
|
|
print('called............................................')
|
|
|
|
|
|
@@ -553,7 +553,7 @@ def anchor_video_v2(name,text_content, image_urls):
|
|
idx+=1
|
|
idx+=1
|
|
|
|
|
|
progress+=10
|
|
progress+=10
|
|
- ws.send(str(progress))
|
|
|
|
|
|
+ #ws.send(str(progress))
|
|
|
|
|
|
LOGO_ED = openshot.FFmpegReader(dir_video+"LOGO_ED.avi")
|
|
LOGO_ED = openshot.FFmpegReader(dir_video+"LOGO_ED.avi")
|
|
LOGO_ED.Open()
|
|
LOGO_ED.Open()
|
|
@@ -599,7 +599,7 @@ def anchor_video_v2(name,text_content, image_urls):
|
|
openshot.Fraction(1, 1), False, False, 3000000)
|
|
openshot.Fraction(1, 1), False, False, 3000000)
|
|
w.Open()
|
|
w.Open()
|
|
progress = 100
|
|
progress = 100
|
|
- ws.send(str(progress))
|
|
|
|
|
|
+ #ws.send(str(progress))
|
|
#may change duration into t.info.duration
|
|
#may change duration into t.info.duration
|
|
for n in range(int(t.info.fps)*int(head_duration+main_timer+ED_duration)):
|
|
for n in range(int(t.info.fps)*int(head_duration+main_timer+ED_duration)):
|
|
f=t.GetFrame(n)
|
|
f=t.GetFrame(n)
|