#!/bin/bash LINK="${1}" FILE="${2}" BASENAME="$(basename "${FILE}" .ogg)" wget "${LINK}" -O "${BASENAME}.jpg" && \ ffmpeg -i "${FILE}" -f ffmetadata "${BASENAME}.meta" && \ ogg-cover-art "${BASENAME}.jpg" >> "${BASENAME}.meta" && \ ffmpeg -i "${BASENAME}.meta" -i "${FILE}" -map_metadata 0 -c:a copy "${BASENAME}-cover.ogg" rm "${BASENAME}.meta" rm "${BASENAME}.jpg"