Skip to content

Yt-dlp

A youtube-dl fork with additional features and fixes

yt-dlp is a youtube-dl fork based on the now inactive youtube-dlc. The main focus of this project is adding new features and patches while also keeping up to date with the original project

Examples

yt-dlp --split-chapters "$@"
챕터별로 분리하기
yt-dlp --extract-audio --audio-format flac --audio-quality 0 "$@"
최고품질 오디오를 flac 포맷으로 저장.
yt-dlp -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]" "$@"
youtube-dl에서 사용했던 최고품질(비디오, 오디오)로 저장.
yt-dlp -f 'bestvideo+bestaudio' URL
파일 포맷 지정 없이 (자동 선택) 최고 품질 선택.
yt-dlp -F URL
사용 가능 포맷 확인.
yt-dlp -f '137+140' URL
특정 포맷 선택. 여기서 137은 특정 비디오 포맷 ID, 140은 특정 오디오 포맷 ID입니다.

파일 다운로드 후 파일명 끝에 붙은 ID 제거 스크립트

Alan Walker - All Falls Down [R8nfqmHQ87s].flac
Alan Walker - Alone & Sing Me To Sleep [MeHhOB4KTHk].flac

이런 파일이 있을 때 "[R8nfqmHQ87s]" 이런거 제거하는 스크립트:

#!/bin/bash

for file in *.flac; do
  # 파일명에서 대괄호와 그 안의 텍스트 제거
  new_name=$(echo "$file" | sed 's/ \[[^]]*\]//')
  # 파일명 변경
  mv "$file" "$new_name"
done

See also

Favorite site