SPACERUNNER99 commited on
Commit
94d9021
·
verified ·
1 Parent(s): ee02ba9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -354,7 +354,7 @@ def time_to_seconds(time_obj):
354
  def create_subtitle_clips(subtitles, videosize, fontsize, font, color, debug):
355
  subtitle_clips = []
356
  for subtitle in subtitles:
357
- start_time = time_to_seconds(subtitle.start)
358
  end_time = time_to_seconds(subtitle.end)
359
  duration = end_time - start_time
360
  video_width, video_height = videosize
@@ -370,6 +370,7 @@ def create_subtitle_clips(subtitles, videosize, fontsize, font, color, debug):
370
  return subtitle_clips
371
 
372
 
 
373
  def process_video(url, type):
374
 
375
  if type=="insta":
 
354
  def create_subtitle_clips(subtitles, videosize, fontsize, font, color, debug):
355
  subtitle_clips = []
356
  for subtitle in subtitles:
357
+ start_time = time_to_seconds(subtitle.start) + 2 # Add 2 seconds offset
358
  end_time = time_to_seconds(subtitle.end)
359
  duration = end_time - start_time
360
  video_width, video_height = videosize
 
370
  return subtitle_clips
371
 
372
 
373
+
374
  def process_video(url, type):
375
 
376
  if type=="insta":