mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-30 03:56:12 +01:00
14 lines
382 B
Bash
14 lines
382 B
Bash
#!/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"
|