瀏覽代碼

fixing websocket

ming 3 年之前
父節點
當前提交
f6cdd9025c
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. 7 2
      main.py

+ 7 - 2
main.py

@@ -629,16 +629,21 @@ def anchor_video_v2(name,text_content, image_urls,avatar,client_id):
     w.Open()
     w.Open()
     
     
     #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)):
+    frames = int(t.info.fps)*int(head_duration+main_timer+ED_duration)
+    for n in range(frames):
         f=t.GetFrame(n)
         f=t.GetFrame(n)
         w.WriteFrame(f)
         w.WriteFrame(f)
+        if n== frames/5:
+            
     progress = 100
     progress = 100
     sendProgress(progress,client_id)
     sendProgress(progress,client_id)
     notify_group(name+"的影片已經產生完成囉! www.choozmo.com:8168/"+name_hash+".mp4")
     notify_group(name+"的影片已經產生完成囉! www.choozmo.com:8168/"+name_hash+".mp4")
     t.Close()
     t.Close()
     w.Close()
     w.Close()
 
 
-    
+
+    progress = 100
+    sendProgress(progress,client_id)
     print("Raw Video done")
     print("Raw Video done")
     print("video at : www.choozmo.com:8168/"+name_hash+".mp4")
     print("video at : www.choozmo.com:8168/"+name_hash+".mp4")