Update app.py
Browse files
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 |
-
|
| 131 |
-
end_time = int(end_time * 1000)
|
| 132 |
|
| 133 |
# 使用ffmpeg进行截取
|
| 134 |
-
os.system(f'ffmpeg -i temp.mp4 -ss {start_time} -t
|
| 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)
|