Skip to content

Commit

Permalink
update youtube to force mp4 as the video format
Browse files Browse the repository at this point in the history
Idk why it would download webp, hope this helps...
  • Loading branch information
kytpbs committed Aug 11, 2024
1 parent 6437b40 commit a3a4693
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def download_video_from_link(url: str, path: str | None = None) -> VIDEO_RETURN_
os.makedirs(path, exist_ok=True)

costum_options = {
'format': f'bestvideo[filesize<{MAX_VIDEO_DOWNLOAD_SIZE}M]+bestaudio',
'format': f'bestvideo[filesize<{MAX_VIDEO_DOWNLOAD_SIZE}M,ext=mp4]+bestaudio/best[filesize<{MAX_VIDEO_DOWNLOAD_SIZE}M,ext=mp4]]',
"outtmpl": os.path.join(path, "%(id)s.mp4"),
'noplaylist': True,
'default_search': 'auto',
Expand Down

0 comments on commit a3a4693

Please sign in to comment.