#!/bin/bash if [ -z "${OUTPUT_TEMPLATE}" ]; then OUTPUT_TEMPLATE='%(upload_date)s - %(title)s (YT-%(id)s).%(ext)s' fi docker run --rm --mount type=bind,source="$(pwd)",target=/data youtube-dl "$@" --ignore-errors --format 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' --output "${OUTPUT_TEMPLATE}"