Force mp4 output with yt-dlp
yt-dlp is the swiss army knife when it comes to downloading videos (not only!) from YouTube.
In order to get the best compatible format for the Apple ecosystem, I’m always adding a static -f argument. It makes sure to download the best possible H.264/5 video and m4a audio and avoids using webm or opus codecs.
Example:
yt-dlp -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' "https://www.youtube.com/watch?v=******"
In order to check all available formats and codecs, use the -F
argument.
