youtube-dl -t # You can use youtube-dl from to download videos from Youtube and other video sites. No copyright infringement intended. 🤣

· · Web · 2 · 5 · 6

@climagic a very neat thing is mpv has youtube-dl support built in, so you can also mpv

One common problem is, youtube-dl in your OS repos gets outdated pretty quickly. The following shell alias can help with that:

alias mpv="PYTHONPATH=$YOUDL mpv"

granted you have a checkout of youtube-dl git repository at $YOUDL. A couple other aliases I like using:

alias ydl="PYTHONPATH=$YOUDL python3 $YOUDL/bin/youtube-dl"

# Medium quality
alias ydl720="ydl -f 'bestvideo[height<=720]+bestaudio/best[height<=720]'"

alias ydlup="(cd $YOUDL && git pull)"

# downloads urls from STDIN, line by line
alias ydlmusic="ydlup && ydl --extract-audio --audio-format vorbis --audio-quality 3 --no-progress --batch-file -"

-embed-thumbnail --add-metadata and a dump of other options. 

@cadadr @climagic might give filesystems/media players a nice summary?

In ~/.config/mpv/mpv.conf

Or some other resolution too avoid ridiculously high resolution, though i have had freezing issues with this setting.

Tho not recently? If it does happen, this script can allow change the format on the fly.

subtiltes and other metadata 

@cadadr @climagic also subtitles --write-sub --write-auto-sub though i am not sure how to short-circuit those options so mpv immediately can show subtitles, other than having a script download them in the same directory and then running it.

For archiving --write-description --write-info-json --write-annotations could be useful, though the jsons are kindah big. (zstd compresses them a lot)

@climagic With the integrated format conversion, this is a great way to turn your favorite video podcast to an audio one for listening on the go

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!