mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-01 20:46:12 +01:00
16 lines
446 B
Bash
16 lines
446 B
Bash
# -*- mode: sh -*-
|
|
#! /usr/bin/env nix-shell
|
|
#! nix-shell -i bash -p ffmpeg
|
|
|
|
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"
|