Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo OFF
- pushd "%~dp0"
- setlocal
- cls
- REM https://github.com/rg3/youtube-dl/blob/master/README.md#readme
- REM https://www.slashgeek.net/2016/06/24/5-youtube-dl-tips-might-not-know/
- set "TARGET=%USERPROFILE%\Desktop\Music"
- set "VID_URL=https://www.youtube.com/watch?v=9WUoT6GVtXI"
- ::set "YT_PLAYLIST_URL=https://www.youtube.com/playlist?list=PLHJlC_5EPJgnV3fpzmbxONT5r5hQcdGsb"
- set "YTDL=%USERPROFILE%\Programs\youtube-dl.exe"
- set "FFMPEG=%USERPROFILE%\Programs\ffmpeg\bin\ffmpeg.exe"
- REM Download only the MP3 audio track from a YouTube video.
- %YTDL% --ffmpeg-location %FFMPEG% --prefer-insecure --extract-audio --audio-format mp3 -o "%TARGET%\%%(title)s.%%(ext)s" "%VID_URL%" --restrict-filenames
- REM Download YouTube playlist videos in separate directory indexed by video order in a playlist.
- ::%YTDL% --ffmpeg-location %FFMPEG% --prefer-insecure --extract-audio --audio-format mp3 -o "%TARGET%\%%(playlist)s\%%(playlist_index)s - %%(title)s.%%(ext)s" "%YT_PLAYLIST_URL%" --restrict-filenames
- :End
- endlocal
- popd
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement