Create a lossless WebM video from a FLAC file and a static cover image (find, ffmpeg, bash, metaflac)
find . -type f -wholename '*.flac' -exec bash -c 'ffmpeg -hide_banner -loglevel error -nostats -y -i "$(eval "echo .meta/artwork/*video_cover_l.jpeg")" -i "${0}" -metadata title="$(metaflac --show-tag=TITLE "${0}" | cut -c7-)" -metadata artist="$(metaflac --show-tag=ARTIST "${0}" | cut -c8-)" -metadata album="$(metaflac --show-tag=ALBUM "${0}" | cut -c7-)" -metadata genre="$(metaflac --show-tag=GENRE "${0}" | cut -c7-)" -metadata encoded_by="FFmpeg" -q:v 8 -codec:v libvpx-vp9 -lossless 1 -preset slow -quality good -speed 0 -deadline best -codec:a libopus -b:a 160k -vbr on -compression_level 10 -pix_fmt yuv420p -threads 0 "./${0%.*}_vp9_opus_1080p.webm"' '{}' \;
Finds all FLAC files and converts each one into a WebM video that uses a static cover image for the video track, which is encoded losslessly with high-quality VP9 settings, while preserving all metadata.