Download Video From The Command Line With Youtube-dl - LinuxConfig.org


#1
People have wanted to download videos from YouTube since the very beginning. Several methods have worked over the years, but youtube-dl provides the most direct and reliable approach.
This is a companion discussion topic for the original entry at https://linuxconfig.org/download-video-from-the-command-line-with-youtube-dl

#2

quonsar

If a URL has two or more videos on the page, and it’s not youtube itself and not a playlist, yt-dl will only extract the first video it encounters. How to make it look for/dl a different video from the same url?


#3

Kevin Burton

The part about using FFMPEG to convert YouTube videos is a useless waste of time. FFMPEG is required to use youtube-dl, but not for converting videos to another format. By default, youtube-dl will pick the best quality video and best quality audio stream for each video chosen. Often, it’s the AVC video stream and AAC audio stream and then use FFMPEG to mux the streams into the MP4 format. Name me one device or player nowadays that doesn’t support those codecs and that file format. Conversion is not needed 98% of the time. It’s bad practice to compress and already compressed video if the codecs and format are supported by the playback platform.


#4

Kan hända -> Kevin Burton

Well, use a -F flag and there is some, khm, confusing info on whether the best sound quality will really be automatically chosen (per default vs. the -f171 or -f251 option). Compare your option with what you get with 171 and 251 audio (webm audio) files, if they are listed for the certain youtube video. Would like to hear a detailed opinion on this.


#5

srikanth R -> Kevin Burton

you are correct Kevin