oceansweep
commited on
Commit
•
1ae3242
1
Parent(s):
4834aaf
Update app.py
Browse files
app.py
CHANGED
@@ -1319,6 +1319,7 @@ def download_video(video_url, download_path, info_dict, download_video_flag):
|
|
1319 |
elif sys.platform.startswith('darwin'):
|
1320 |
ffmpeg_path = 'ffmpeg'
|
1321 |
|
|
|
1322 |
if download_video_flag:
|
1323 |
video_file_path = os.path.join(download_path, f"{normalized_video_title}.mp4")
|
1324 |
|
@@ -4469,6 +4470,7 @@ def process_url(
|
|
4469 |
info_dict = get_youtube(url) # Extract video information using yt_dlp
|
4470 |
media_title = info_dict['title'] if 'title' in info_dict else 'Untitled'
|
4471 |
|
|
|
4472 |
results = main(url, api_name=api_name, api_key=api_key,
|
4473 |
num_speakers=num_speakers,
|
4474 |
whisper_model=whisper_model,
|
@@ -4720,6 +4722,7 @@ def main(input_path, api_name=None, api_key=None,
|
|
4720 |
logging.debug("MAIN: Creating path for video file...")
|
4721 |
download_path = create_download_directory(info_dict['title'])
|
4722 |
logging.debug("MAIN: Path created successfully\n MAIN: Now Downloading video from yt_dlp...")
|
|
|
4723 |
try:
|
4724 |
video_path = download_video(path, download_path, info_dict, download_video_flag)
|
4725 |
if video_path is None:
|
|
|
1319 |
elif sys.platform.startswith('darwin'):
|
1320 |
ffmpeg_path = 'ffmpeg'
|
1321 |
|
1322 |
+
download_video_flag = True
|
1323 |
if download_video_flag:
|
1324 |
video_file_path = os.path.join(download_path, f"{normalized_video_title}.mp4")
|
1325 |
|
|
|
4470 |
info_dict = get_youtube(url) # Extract video information using yt_dlp
|
4471 |
media_title = info_dict['title'] if 'title' in info_dict else 'Untitled'
|
4472 |
|
4473 |
+
download_video_flag = True
|
4474 |
results = main(url, api_name=api_name, api_key=api_key,
|
4475 |
num_speakers=num_speakers,
|
4476 |
whisper_model=whisper_model,
|
|
|
4722 |
logging.debug("MAIN: Creating path for video file...")
|
4723 |
download_path = create_download_directory(info_dict['title'])
|
4724 |
logging.debug("MAIN: Path created successfully\n MAIN: Now Downloading video from yt_dlp...")
|
4725 |
+
download_video_flag = True
|
4726 |
try:
|
4727 |
video_path = download_video(path, download_path, info_dict, download_video_flag)
|
4728 |
if video_path is None:
|