youngtsai commited on
Commit
a5c3e6a
·
1 Parent(s): ba2af2c

'format': "bestvideo[height<=720][ext=mp4]",

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -667,7 +667,7 @@ def download_youtube_video(youtube_id, output_path=OUTPUT_PATH):
667
  print(f"[Pytube] Video downloaded successfully: {output_path}/{youtube_id}.mp4")
668
  except Exception as e:
669
  ydl_opts = {
670
- 'format': 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best', # This ensures the best quality combining video and audio
671
  'outtmpl': os.path.join(output_path, f'{youtube_id}.mp4'), # Output filename template
672
  }
673
  with yt_dlp.YoutubeDL(ydl_opts) as ydl:
 
667
  print(f"[Pytube] Video downloaded successfully: {output_path}/{youtube_id}.mp4")
668
  except Exception as e:
669
  ydl_opts = {
670
+ 'format': "bestvideo[height<=720][ext=mp4]",
671
  'outtmpl': os.path.join(output_path, f'{youtube_id}.mp4'), # Output filename template
672
  }
673
  with yt_dlp.YoutubeDL(ydl_opts) as ydl: