Restricting resolution
youtube-dl -f best[height=1920] $URL # restrict to <= 1080p
Specifying format
youtube-dl -f best[ext=mp4] $URL # mp4 files
Combining specifications
youtube-dl -f best[ext=mp4,height=1920] $URL # restrict to <= 1080p, mp4 files