I am trying to download mp4 1080p videos from YouTube. I have tried this batch file:
@ECHO OFF
SET /P URL="Enter YouTube video URL: "
ECHO.
youtube-dl.exe -f mp4 ("bestvideo[width>=1920]"/bestvideo)+bestaudio/best -o %userprofile%/Downloads/YouTubeDL/%%(title)s_[YouTubeID=%%(id)s].%%(ext)s %URL%
ECHO.
PAUSE
EXIT
It's returning errors. While researching, I bumped into this question but it doesn't answer how I can download mp4 only videos.
The code below works but often downloads webm files.
@ECHO OFF
SET /P URL="Enter YouTube video URL: "
ECHO.
youtube-dl.exe -f ("bestvideo[width>=1920]"/bestvideo)+bestaudio/best -o %userprofile%/Downloads/YouTubeDL/%%(title)s_[YouTubeID=%%(id)s].%%(ext)s %URL%
ECHO.
PAUSE
EXIT