Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Download only audio
- set url = http://www.youtube.com/watch?v=Q-p9MDAw2yyEE
- youtube-dl %url% --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --output "%(title)s.%(ext)s" --batch-file ./my_list_of_URLs.txt
- In a batch file:
- youtube-dl %url% --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 160K --output %%(title)s.^%%(ext)s
- OLD:
- youtube-dl -f 140 http://www.youtube.com/watch?v=Q-p9MDAw2yyEE
- youtube-dl -f 140 https://www.youtube.com/playlist?list=PLeKaU7RrCHNoy_8WHfm2irN5z7_sdSsYd
- ffmpeg.exe -v 5 -y -i input.m4a -acodec libmp3lame -ac 2 -ab 128k output.mp3
- In one command:
- youtube-dl -f 140 %url% -o - | ffmpeg.exe -v 5 -y -i pipe: -acodec libmp3lame -ac 2 -ab 128k %(title)s-.mp3
- ==========================
- Download a playlist
- youtube-dl.exe --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" https://www.youtube.com/playlist?list=PLeKaU7RrCHNoy_8WHfm2irN5z7_sdSsYd
- If the above doesn't work use this (download audio stream):
- youtube-dl -i -f mp3 --yes-playlist https://www.youtube.com/playlist?list=PLAxUii9jTsdxZ7SuRbRn4KyTzLa8QTCT_
- ==========================
- Convert a bunch of files
- for %A in ("*.m4a") do call "ffmpeg.exe" -v 5 -y -i "%A" -acodec libmp3lame -ac 2 -ab 128k "newfiles\%~nA.mp3"
- Convert webm to mp3
- for %FILE in *.webm; do
- echo -e "Processing video '\e[32m$FILE\e[0m'";
- ffmpeg -i "${FILE}" "${FILE%.webm}.mp3";
- done;
- ==========================
- Continuously download a playlist. archive.txt contains a list of files already downloaded. E.g.
- youtube mI3Xig4IfqI
- youtube 0Q2zD-mI3Xig4IfqI
- LOGFILE="$PWD/download_logs_$(date +"%Y_%m_%d_%H_%M_%S").log"
- exec 3>&1 4>&2 >>$LOGFILE 2>&1
- ./youtube-dl --verbose --ignore-errors --no-continue --no-overwrites --keep-video --no-post-overwrites --download-archive archive.txt --output "my_videos/%(title)s - %(upload_date)s.%(ext)s" -f bestvideo[ext=mp4]+bestaudio[ext=m4a] -- $1
- OR try:
- ./youtube-dl --download-archive archive.txt --add-metadata -f bestvideo[ext=vp9]+bestaudio[ext=opus]/bestvideo+bestaudio --merge-output-format mkv -i -o "my_videos/%(uploader)s/%(playlist)s/%(title)s.%(ext)s" 29DwZkz0jWI -- $1
- ==========================
- Download the best Audio quality
- youtube-dl -f bestaudio -o "%(title)s.%(ext)s" nlcIKh6sBtc
- youtube-dl -f bestaudio -o "%(title)s.%(ext)s" --yes-playlist https://www.youtube.com/playlist?list=PLm2nCoXppbGez_O4C75BVplAzsvwFh0Uq
- ffmpeg -i input.webm output.mp3
Add Comment
Please, Sign In to add comment