I have a script that extracts a specified subset of my music collection. Most of my music is FLAC; since space (and supported formats) may be an issue on the target device (smartphon, car radio, ...) it can also convert "down" to OGG for MP3.

I figured out a while ago how to convert FLAC to OGG so that meta data is kept:

ffmpeg -v quiet -y -i "${infile}" \
       -codec:a libvorbis -qscale:a 6 -map_metadata 0 \

However, I noticed that the resulting file won't play in my Android app if the FLAC contained a cover image. I did some digging; the short of it is, ffmpeg seems to create corrupt OGGs in this case.

Is this a bug, or do I have to pick different parameters?

  • Does the Android app you're using actually support Ogg Vorbis? Are other devices able to read or play the file? It might be possible that you need to convert to another format, such as MPEG-2 Layer 3 (.mp3) for the device or application you're using. – DopeGhoti Feb 1 '17 at 22:24
  • @DopeGhoti I guess you didn't click through to Github; OGGs without images and OGGs that had images added by other means play just fine. – Raphael Feb 1 '17 at 22:28
  • Did you try with oggenc (see linux.die.net/man/1/oggenc)? Could be a solution if ffmpeg does not work. – ridgy Feb 2 '17 at 11:25
  • @ridgy Did not; will do and update, thanks for the pointer! – Raphael Feb 2 '17 at 15:42
  • @ridgy oggenc does not keep the image. There are certainly ways to add them "by hand", but why should one have to? – Raphael Feb 2 '17 at 20:06

Your Answer

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

Browse other questions tagged or ask your own question.