5

The way I understand man avconv (version 9.16-6:9.16-0ubuntu0.14.04.1), the following command should convert input.ogg to output.mp3 and carry over metadata:

avconv -i input.ogg -map_metadata 0 output.mp3

It does not, however; ogginfo clearly shows the information (artist, album, title, ...) in input.ogg and id3info confirms that output.mp3 has empty (ID3) tags.

The same happens when converting ogg to flac, or (presumably) any combination of the formats.

Is my understanding of -map_metadata wrong? Is there a way to convert between formats and keep tags (without hardcoding like this)?

4

Following this answer on Stack Overflow, I tinkered around and found out that the correct parameter depends on the combination of input and output format/codec.

These combinations work as intended:

  • OGG → MP3: -map_metadata 0:s:0
  • FLAC → MP3: -map_metadata 0:g:0
  • FLAC → OGG: -map_metadata -0

    Using -codec libvorbis.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.