mzltest commited on
Commit
1d581f8
·
1 Parent(s): ac1411c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -127,11 +127,10 @@ def downloadTubeUpload(query):
127
  # 计算需要截取的时间区间
128
  start_time = max(0, (duration - 60) / 2)
129
  end_time = start_time + 60
130
- start_time = int(start_time * 1000)
131
- end_time = int(end_time * 1000)
132
 
133
  # 使用ffmpeg进行截取
134
- os.system(f'ffmpeg -i temp.mp4 -ss {start_time} -t {end_time - start_time} -c copy output.mp4')
135
 
136
  command= f'curl --url https://www.lalal.ai/api/upload/ --data-binary @output.mp4 --header "Content-Disposition: attachment; filename=output.mp4" -s'
137
  moutput=getoutput(command)
 
127
  # 计算需要截取的时间区间
128
  start_time = max(0, (duration - 60) / 2)
129
  end_time = start_time + 60
130
+
 
131
 
132
  # 使用ffmpeg进行截取
133
+ os.system(f'ffmpeg -i temp.mp4 -ss {start_time} -t 60 -c copy output.mp4')
134
 
135
  command= f'curl --url https://www.lalal.ai/api/upload/ --data-binary @output.mp4 --header "Content-Disposition: attachment; filename=output.mp4" -s'
136
  moutput=getoutput(command)