I want to download everything (subtitles, cards, tags, annotations, thumbnails, etc. (and obviously the video w/ audio)) from a YouTube video (for example, this one).
I'm using youtube-dl
and, with the overwhelming amount of switches to use, I can't seem to find anything to fit my needs. I also want to download the video/audio in the highest quality possible, with no quality loss. Even though it's not YouTube, I did also want to download some of my udemy courses I've bought so I can watch them while I'm on a long road trip.
I have ffmpeg
installed, and I heard that you need this for lossless downloads from YouTube, but I'm not sure how to link it with youtube-dl
.
This is my first time using youtube-dl
, so any help is appreciated.
Best Answer
The relevant options you need:
Copy that to your config file (either
/etc/youtube-dl.conf
or~/.config/youtube-dl/config
).Using that configuration, I downloaded this video and
youtube-dl
wrote the following files:I can't post
mediainfo
's output here because it exceeds the characters limit, but you can see it in github.youtube-dl
downloads videos at the highest quality possible by default, but you can force this behavior using--format bestvideo+bestaudio/best
.Please read the article Can I Download a Course to my Computer?:
youtube-dl
usesavconv
by default, but--prefer-ffmpeg
let you useffmpeg
instead. Anyway, this option is not needed for "lossless downloads". In the example I provided,youtube-dl
only usedffmpeg
to merge all the downloaded formats into a single mkv file.