SPACERUNNER99 commited on
Commit
ea41cec
·
verified ·
1 Parent(s): 5961717

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -366,6 +366,12 @@ def process_video(url, type):
366
  elif type=="youtube":
367
  input_video, input_audio = one_youtube(url, api_key)
368
  input_video_name = input_video.replace(".mp4", "")
 
 
 
 
 
 
369
  segments = transcribe(audio=input_audio)
370
  language = "fa"
371
  subtitle_file = generate_subtitle_file(language=language, segments=segments, input_video_name=input_video_name)
@@ -384,6 +390,12 @@ def process_video(url, type):
384
  final_video = CompositeVideoClip([video] + subtitle_clips)
385
  final_video.write_videofile(output_video_file, codec="libx264", audio_codec="aac", logger=None)
386
  print('final')
 
 
 
 
 
 
387
  return output_video_file
388
 
389
  #def download_file(file_path):
 
366
  elif type=="youtube":
367
  input_video, input_audio = one_youtube(url, api_key)
368
  input_video_name = input_video.replace(".mp4", "")
369
+ # Get the current local time
370
+ t = time.localtime()
371
+
372
+ # Format the time as a string
373
+ current_time = time.strftime("%H:%M:%S", t)
374
+ print("Current Time =", current_time)
375
  segments = transcribe(audio=input_audio)
376
  language = "fa"
377
  subtitle_file = generate_subtitle_file(language=language, segments=segments, input_video_name=input_video_name)
 
390
  final_video = CompositeVideoClip([video] + subtitle_clips)
391
  final_video.write_videofile(output_video_file, codec="libx264", audio_codec="aac", logger=None)
392
  print('final')
393
+ # Get the current local time
394
+ t = time.localtime()
395
+
396
+ # Format the time as a string
397
+ current_time = time.strftime("%H:%M:%S", t)
398
+ print("Current Time =", current_time)
399
  return output_video_file
400
 
401
  #def download_file(file_path):