Browse Source

shorten sub duration

ming 3 years ago
parent
commit
72c162706f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      OpenshotService/openshot_video_generator.py

+ 2 - 2
OpenshotService/openshot_video_generator.py

@@ -374,12 +374,12 @@ def parse_script(file_path,gt_list):
             new_dic = {}
             new_dic = {}
             new_dic['index'] = new_idx
             new_dic['index'] = new_idx
             new_idx+=1
             new_idx+=1
-            ind_duration = duration * sub_dic['time_ratio']*0.6
+            ind_duration = duration * sub_dic['time_ratio']
             new_dic['start'] = dic['start'] + accumulated_duration
             new_dic['start'] = dic['start'] + accumulated_duration
             accumulated_duration += ind_duration
             accumulated_duration += ind_duration
             
             
             new_dic['content'] = sub_dic['content']
             new_dic['content'] = sub_dic['content']
-            new_dic['duration'] = ind_duration
+            new_dic['duration'] = ind_duration*0.7
             splitted_dict.append(new_dic)
             splitted_dict.append(new_dic)
     
     
     return splitted_dict
     return splitted_dict