How to download YouTube Videos quickly
I used to use yt5s all the time to rip and remix videos:
now you have to use https://ytdlp.online/
โฆbut it often downloads the functionally useless .webm
extension. Like with other bullshit google extensions, you can simply rename from .webm
to .mp4
and it may work - but twitter actually rejects it when you try to upload..
I also keep this flag around
yt-dlp -f "bestvideo[ext=mp4][height<=720]+bestaudio[ext=m4a]/best[ext=mp4]/best" YOUR_URL_HERE
vp9 codec errors
this is bad: youtube-dl -f bestvideo+bestaudio --merge-output-format mp4 https://www.youtube.com/watch\?v\=VcUl0vPJwxo
because it downloads the wrong video (https://chatgpt.com/c/68856117-61c8-8331-b493-9027ad956de5) which you then have to re encode ffmpeg -i yourvideo.mp4 -c:v libx265 -c:a aac fixed.mp4
if Youtube allows do this
yt-dlp -f "bv*[vcodec^=avc1][ext=mp4]+ba[acodec^=mp4a]/b[vcodec^=avc1][ext=mp4]" \
--merge-output-format mp4 -o "%(title)s.%(ext)s" https://www.youtube.com/watch?v=VcUl0vPJwxo
# or re encode:
yt-dlp -f "bv*+ba/b" --recode-video mp4 \
--postprocessor-args "ffmpeg:-c:v hevc_videotoolbox -b:v 8M -pix_fmt yuv420p -tag:v hvc1 -c:a aac -movflags +faststart" \
-o "%(title)s.%(ext)s" https://www.youtube.com/watch?v=VcUl0vPJwxo
for livestreams
yt-dlp --live-from-start -f "bestvideo[ext=mp4][height<=720]+bestaudio[ext=m4a]/best[ext=mp4]/best" YOUR_URL_HERE
updates
If you ever get a .webm you might use
ffmpeg -i textgeneratorvision.webm -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -shortest -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2,fps=30" -c:v libx264 -pix_fmt yuv420p -c:a aac textgeneratorvision.mp4
and
yt-dlp -f "bestvideo+bestaudio[ext=m4a]/bestvideo+bestaudio/best" -o "%(title)s.%(ext)s" --merge-output-format mp4