how to set up default download location in youtube-dl [closed]

You need to use the -o switch with the Configuration file Output on youtube-dl is handled with the –output or -o switch; pass it as an option, followed by the destination you want to save your downloads to: youtube-dl -o “%USERPROFILE%\Desktop\%(title)s-%(id)s.%(ext)s” www.youtube.com/link/to/video Note that -o has a dual function in that it also sets a … Read more

Error: Unable to extract uploader id – Youtube, Discord.py

This is a known issue, fixed in Master. For a temporary fix, python3 -m pip install –force-reinstall https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz This installs tha master version. Run it through the command-line yt-dlp URL where URL is the URL of the video you want. See yt-dlp –help for all options. It should just work without errors. If you’re using … Read more

How to use youtube-dl script to download starting from some index in a playlist?

youtube-dl –help, contains: Video Selection: –playlist-start NUMBER Playlist video to start at (default is 1) –playlist-end NUMBER Playlist video to end at (default is last) –playlist-items ITEM_SPEC Playlist video items to download. Specify indices of the videos in the playlist separated by commas like: “–playlist-items 1,2,5,8” if you want to download videos indexed 1, 2, … Read more

youtube-dl, how do I resume a download after error?

It’s good to use a combination of -ciw when downloading playlists. -i, –ignore-errors Continue on download errors, for example to skip unavailable videos in a playlist -w, –no-overwrites Do not overwrite files -c, –continue Force resume of partially downloaded files. By default, youtube-dl will resume downloads if possible. The following example downloads top 100 songs … Read more

Download the best quality audio file with youtube-dl [closed]

If you want mp3, just tell youtube-dl that: youtube-dl -x –audio-format mp3 https://www.youtube.com/watch?v=uWusmdmc0to will get you an audio version (-x, short for –extract-audio) in or converted to mp3 (that’s the –audio-format option). youtube-dl will automatically pick the best quality and most appropriate format. Note that the listed qualities are just guesses. In practice, opus is … Read more

Download only audio from youtube video using youtube-dl in python script

Read on in the developer instructions for an amended example: from __future__ import unicode_literals import youtube_dl ydl_opts = { ‘format’: ‘bestaudio/best’, ‘postprocessors’: [{ ‘key’: ‘FFmpegExtractAudio’, ‘preferredcodec’: ‘mp3’, ‘preferredquality’: ‘192’, }], } with youtube_dl.YoutubeDL(ydl_opts) as ydl: ydl.download([‘http://www.youtube.com/watch?v=BaW_jenozKc’]) This will download an audio file if possible/supported. If the file is not mp3 already, the downloaded file be … Read more

How do you use youtube-dl to download live streams (that are live)?

I’ll be using this Live Event from NASA TV as an example: First, list the formats for the video: youtube-dl –list-formats https://www.youtube.com/watch\?v\=21X5lGlDOfg [youtube] 21X5lGlDOfg: Downloading webpage [youtube] 21X5lGlDOfg: Downloading m3u8 information [youtube] 21X5lGlDOfg: Downloading MPD manifest [info] Available formats for 21X5lGlDOfg: format code extension resolution note 91 mp4 256×144 HLS 197k , avc1.42c00b, 30.0fps, mp4a.40.5@ … Read more