Skip to content

Commit

Permalink
fixes for video duration
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikvirendrar committed Jan 29, 2025
1 parent 3eb5a5d commit 2930e1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/video/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ def get_video_func(request):
upload_task_eta = request.GET.get("ETA")
speaker_info = request.GET.get("speaker_info")
multiple_speaker = request.GET.get("multiple_speaker", "false")
vid_duration = request.GET.get("duration", "00:00:00")
url = url.strip()

create = create.lower() == "true"
Expand Down Expand Up @@ -557,7 +558,7 @@ def get_video_func(request):
video = VideoFileClip(url)
duration = timedelta(seconds=floor(video.duration))
except:
duration = timedelta(seconds=0)
duration = vid_duration
direct_video_url = url
normalized_url = url
else:
Expand Down

0 comments on commit 2930e1c

Please sign in to comment.