Pārlūkot izejas kodu

fix sound background

ming 3 gadi atpakaļ
vecāks
revīzija
1dbbf9c9fd
1 mainītis faili ar 3 papildinājumiem un 4 dzēšanām
  1. 3 4
      OpenshotService/openshot_video_generator.py

+ 3 - 4
OpenshotService/openshot_video_generator.py

@@ -391,7 +391,7 @@ def video_gen(name_hash,name,text_content, image_urls,multiLang,avatar):
         w.WriteFrame(f)
     t.Close()
     w.Close()
-    print(name+"RAW DONE : www.choozmo.com:8168/"+video_sub_folder+name_hash+"raw.mp4")
+    print(name+"RAW DONE : www.choozmo.com:8168/"+tmp_video_dir+name_hash+"raw.mp4")
     #start adding sub
     
     #add sub
@@ -420,9 +420,6 @@ def video_gen(name_hash,name,text_content, image_urls,multiLang,avatar):
         t.AddClip(sub_clip_list[idx])
         sub_img_list[idx].Close()
 
-
-    os.remove(tmp_video_dir+name_hash+"raw.mp4")
-    os.remove(tmp_video_dir+name_hash+"script.txt")
     anchor = openshot.FFmpegReader(dir_anchor+name_hash+"/0.mp4")
     anchor.Open()
     anchor_clip = video_photo_clip(vid=anchor,layer=4,scale_x=0.65,scale_y=0.65,
@@ -438,6 +435,8 @@ def video_gen(name_hash,name,text_content, image_urls,multiLang,avatar):
         w.WriteFrame(f)
     t.Close()
     w.Close()
+    os.remove(tmp_video_dir+name_hash+"raw.mp4")
+    #os.remove(tmp_video_dir+name_hash+"script.txt")
     print(name+"ALL DONE : www.choozmo.com:8168/"+video_sub_folder+name_hash+"raw.mp4")