I have a bunch of audio files with cover art, and I want to convert them to OPUS files that also have a .ogg extension to aid integration with other apps (not to mention converting to just .opus doesn’t seem to preserve the cover art at all). Currently, ffmpeg -i "$filename" -c:a libopus "$outputbasename.opus.ogg"
converts the streams into something like this:
Stream #0:0: Video: theora, yuv444p, 600x600 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn
Metadata:
comment : Cover (front)
encoder : Lavc61.19.100 libtheora
TITLE : Student Demonstration Time (Remastered 2009)
ARTIST : The Beach Boys
GENRE : Pop, Rock
ALBUM : "Feel Flows" The Sunflower & Surf’s Up Sessions 1969-1971
album_artist : The Beach Boys
DATE : 2021-08-27
track : 5
Stream #0:1: Audio: opus, 48000 Hz, stereo, fltp
Metadata:
encoder : Lavc61.19.100 libopus
TITLE : Student Demonstration Time (Remastered 2009)
ARTIST : The Beach Boys
GENRE : Pop, Rock
ALBUM : "Feel Flows" The Sunflower & Surf’s Up Sessions 1969-1971
album_artist : The Beach Boys
DATE : 2021-08-27
track : 5
Theora is super lossy, and being stream 0 instead of stream 1 (as it originally was) confuses foobar2000 into refusing to tag the output files and foobar2000 not being able to display any album covers. When using its tagger to readd an album cover to audio files without an album cover, I get streams like this, which seem preferable:
Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp
Metadata:
ALBUM : "Feel Flows" The Sunflower & Surf’s Up Sessions 1969-1971
album_artist : The Beach Boys
ARTIST : The Beach Boys
DATE : 2021-08-27
encoder : Lavc61.19.100 libopus
GENRE : Pop, Rock
TITLE : Student Demonstration Time (Remastered 2009)
track : 5
Stream #0:1: Video: mjpeg (Progressive), yuvj444p(pc, bt470bg/unknown/unknown), 600x600, 90k tbr, 90k tbn (attached pic)
Metadata:
comment : Cover (front)
Is there a way to automate converting, say, FLAC files to this format?