Skip to content

Instantly share code, notes, and snippets.

@dontdieych
Last active October 12, 2024 20:38
Show Gist options
  • Save dontdieych/b6da35797283c0af8aad6d87bc57e293 to your computer and use it in GitHub Desktop.
Save dontdieych/b6da35797283c0af8aad6d87bc57e293 to your computer and use it in GitHub Desktop.
ffmpeg flac to opus mka copy album art cover jpg
$ ffmpeg -hide_banner -i 01.flac -c:a libopus 01.mka -y
Input #0, flac, from '01.flac':
Metadata:
ALBUM : Bach - Cello Suites Nos. 1-6, BWV 1007-1012
album_artist : Henrik Dam Thomsen
ARTIST : Henrik Dam Thomsen
COMPOSER : Johann Sebastian Bach
DATE : 2024
GENRE : Classical
TITLE : Cello Suite No. 1 in G Major, BWV 1007: I. Prélude
track : 1
TRACKTOTAL : 36
Duration: 00:02:38.08, start: 0.000000, bitrate: 2500 kb/s
Stream #0:0: Audio: flac, 96000 Hz, stereo, s32 (24 bit)
Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 700x700, 90k tbr, 90k tbn (attached pic)
Metadata:
comment : Cover (front)
Stream mapping:
Stream #0:0 -> #0:0 (flac (native) -> opus (libopus))
Press [q] to stop, [?] for help
[libopus @ 0xaaabbff76680] No bit rate set. Defaulting to 96000 bps.
Output #0, matroska, to '01.mka':
Metadata:
ALBUM : Bach - Cello Suites Nos. 1-6, BWV 1007-1012
album_artist : Henrik Dam Thomsen
ARTIST : Henrik Dam Thomsen
COMPOSER : Johann Sebastian Bach
DATE : 2024
GENRE : Classical
TITLE : Cello Suite No. 1 in G Major, BWV 1007: I. Prélude
PART_NUMBER : 1
TRACKTOTAL : 36
encoder : Lavf60.16.100
Stream #0:0: Audio: opus ([255][255][255][255] / 0xFFFFFFFF), 48000 Hz, stereo, flt, 96 kb/s
Metadata:
encoder : Lavc60.31.102 libopus
size= 1kB time=00:00:00.01 bitrate= 504.3kbits/s speed=34.3x
size= 512kB time=00:00:47.23 bitrate= 88.8kbits/s speed=94.4x
size= 1024kB time=00:01:33.57 bitrate= 89.6kbits/s speed=93.5x
size= 1792kB time=00:02:18.67 bitrate= 105.9kbits/s speed=92.4x
[out#0/matroska @ 0xaaabbffdf970] video:0kB audio:2056kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.726128%
size= 2112kB time=00:02:38.07 bitrate= 109.5kbits/s speed=91.9x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment