Files
youtubedl/ytdl.sh
2025-07-02 07:43:21 -07:00

18 lines
378 B
Bash
Executable File

#!/bin/bash
# Either builds yt-dlp docker container or runs it
if [[ "$1" == "" ]]; then
echo "Arg: build"
echo "Arg: run [yt-dlp target URL]"
fi
if [[ "$1" == "build" ]]; then
echo "Building"
docker build -t ytdl .
fi
if [[ "$1" == "run" ]]; then
echo "Running"
docker run --rm -v $PWD/vid:/vid ytdl /yt-dlp -P /vid -x --audio-format mp3 --audio-quality 0 $2
fi