Skip to content

Instantly share code, notes, and snippets.

@KevinNitroG
Created October 14, 2025 11:12
Show Gist options
  • Save KevinNitroG/cd228dcced2177f0d3f592671e467c2a to your computer and use it in GitHub Desktop.
Save KevinNitroG/cd228dcced2177f0d3f592671e467c2a to your computer and use it in GitHub Desktop.
download video from downloaded.txt?
#!/bin/bash
PLAYLIST_FILE="playlists.txt"
ARCHIVE_FILE="downloaded.txt"
YTDLP_OPTS=(
-f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best"
--merge-output-format mp4
--download-archive "$ARCHIVE_FILE"
)
while IFS= read -r url || [[ -n "$url" ]]; do
[[ -z "$url" || "$url" =~ ^# ]] && continue
echo "Downloading from: $url"
yt-dlp "${YTDLP_OPTS[@]}" "$url"
done <"$PLAYLIST_FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment