Add the alias
to your shell profile.
Depending on your system, shell and local/remote connection, the file sourced(loaded) may change.
For BASH and Debian, you could edit ~/.bash_profile
nano ~/.bash_profile
It is common to get a mkv
from youtube because the streams downloaded are not compatible with mp4
.
It is easy to force the best mp4
streams though.
Add this to your shell profile
file
alias youtube-dl-mp4="youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4'"
OR
alias youtube-dl-mp4='youtube-dl -f '\''bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4'\'''
Then you need to reload/reconnect the shell or source
the profile again.
To use you can just call it
youtube-dl-mp4 <url>