Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Youtube-DLG
- Download FFmpeg first & place the 3 .exe files in the same folder as yt-DLP.exe
- FFmpeg Download: https://github.com/GyanD/codexffmpeg/releases/tag/5.1.2
- Downlod:
- https://github.com/yt-dlp/yt-dlp#release-files
- Open command prompt in .exe location and run
- #This will show available file types for video and audio to merge and you select them both with "+" in the next command
- ./yt-DLP.exe -F https://www.youtube.com/playlist?list=PLhQjrBD2T3817j24-GogXmWqO5Q5vYy0V
- #This will merge the audio & video types selected from the "-F" option
- # Note 140+137 are the ones I wanted to download so choose your preferred combination.
- ./yt-DLP.exe -f 140+137 https://www.youtube.com/playlist?list=PLhQjrBD2T3817j24-GogXmWqO5Q5vYy0V
- # Download the best **stand-alone video file** and the best **stand-alone audio
- # file** and then **combine** them into one file
- youtube-dl -f 'bestvideo+bestaudio' 'https://www.youtube.com/watch?v=-FzqOdRpCGw'
- FORMAT OPTIONS
- Note that on Windows you need to use double quotes instead of single.
- $ yt-dlp --get-filename -o '%(title)s.%(ext)s' BaW_jenozKc
- youtube-dl test video ''_ä↭𝕐.mp4 # All kinds of weird characters
- $ yt-dlp --get-filename -o '%(title)s.%(ext)s' BaW_jenozKc --restrict-filenames
- youtube-dl_test_video_.mp4 # A simple file name
- # Download YouTube playlist videos in separate directory indexed by video order in a playlist
- $ yt-dlp -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re
- # Download YouTube playlist videos in seperate directories according to their uploaded year
- $ yt-dlp -o '%(upload_date>%Y)s/%(title)s.%(ext)s' https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re
- # Download all playlists of YouTube channel/user keeping each playlist in separate directory:
- $ yt-dlp -o '%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/user/TheLinuxFoundation/playlists
- # Download Udemy course keeping each chapter in separate directory under MyVideos directory in your home
- $ yt-dlp -u user -p password -P '~/MyVideos' -o '%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s' https://www.udemy.com/java-tutorial/
- # Download entire series season keeping each series and each season in separate directory under C:/MyVideos
- $ yt-dlp -P "C:/MyVideos" -o "%(series)s/%(season_number)s - %(season)s/%(episode_number)s - %(episode)s.%(ext)s" https://videomore.ru/kino_v_detalayah/5_sezon/367617
- # Stream the video being downloaded to stdout
- $ yt-dlp -o - BaW_jenozKc
- # Download and merge the best best video-only format and the best audio-only format,
- # or download the best combined format if video-only format is not available
- $ yt-dlp -f 'bv+ba/b'
- # Download best format that contains video,
- # and if it doesn't already have an audio stream, merge it with best audio-only format
- $ yt-dlp -f 'bv*+ba/b'
- # Same as above
- $ yt-dlp
- # Download the best video-only format and the best audio-only format without merging them
- # For this case, an output template should be used since
- # by default, bestvideo and bestaudio will have the same file name.
- $ yt-dlp -f 'bv,ba' -o '%(title)s.f%(format_id)s.%(ext)s'
- # The following examples show the old method (without -S) of format selection
- # and how to use -S to achieve a similar but better result
- # Download the worst video available (old method)
- $ yt-dlp -f 'wv*+wa/w'
- # Download the best video available but with the smallest resolution
- $ yt-dlp -S '+res'
- # Download the smallest video available
- $ yt-dlp -S '+size,+br'
- # Download the best mp4 video available, or the best video if no mp4 available
- $ yt-dlp -f 'bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4] / bv*+ba/b'
- # Download the best video with the best extension
- # (For video, mp4 > webm > flv. For audio, m4a > aac > mp3 ...)
- $ yt-dlp -S 'ext'
- # Download the best video available but no better than 480p,
- # or the worst video if there is no video under 480p
- $ yt-dlp -f 'bv*[height<=480]+ba/b[height<=480] / wv*+ba/w'
- # Download the best video available with the largest height but no better than 480p,
- # or the best video with the smallest resolution if there is no video under 480p
- $ yt-dlp -S 'height:480'
- # Download the best video available with the largest resolution but no better than 480p,
- # or the best video with the smallest resolution if there is no video under 480p
- # Resolution is determined by using the smallest dimension.
- # So this works correctly for vertical videos as well
- $ yt-dlp -S 'res:480'
- # Download the best video (that also has audio) but no bigger than 50 MB,
- # or the worst video (that also has audio) if there is no video under 50 MB
- $ yt-dlp -f 'b[filesize<50M] / w'
- # Download largest video (that also has audio) but no bigger than 50 MB,
- # or the smallest video (that also has audio) if there is no video under 50 MB
- $ yt-dlp -f 'b' -S 'filesize:50M'
- # Download best video (that also has audio) that is closest in size to 50 MB
- $ yt-dlp -f 'b' -S 'filesize~50M'
- # Download best video available via direct link over HTTP/HTTPS protocol,
- # or the best video available via any protocol if there is no such video
- $ yt-dlp -f '(bv*+ba/b)[protocol^=http][protocol!*=dash] / (bv*+ba/b)'
- # Download best video available via the best protocol
- # (https/ftps > http/ftp > m3u8_native > m3u8 > http_dash_segments ...)
- $ yt-dlp -S 'proto'
- # Download the best video with h264 codec, or the best video if there is no such video
- $ yt-dlp -f '(bv*+ba/b)[vcodec^=avc1] / (bv*+ba/b)'
- # Download the best video with best codec no better than h264,
- # or the best video with worst codec if there is no such video
- $ yt-dlp -S 'codec:h264'
- # Download the best video with worst codec no worse than h264,
- # or the best video with best codec if there is no such video
- $ yt-dlp -S '+codec:h264'
- # More complex examples
- # Download the best video no better than 720p prefering framerate greater than 30,
- # or the worst video (still prefering framerate greater than 30) if there is no such video
- $ yt-dlp -f '((bv*[fps>30]/bv*)[height<=720]/(wv*[fps>30]/wv*)) + ba / (b[fps>30]/b)[height<=720]/(w[fps>30]/w)'
- # Download the video with the largest resolution no better than 720p,
- # or the video with the smallest resolution available if there is no such video,
- # prefering larger framerate for formats with the same resolution
- $ yt-dlp -S 'res:720,fps'
- # Download the video with smallest resolution no worse than 480p,
- # or the video with the largest resolution available if there is no such video,
- # prefering better codec and then larger total bitrate for the same resolution
- $ yt-dlp -S '+res:480,codec,br'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement