Why FFMPEG changes the front cover image format and size while converting FLAC to MP3?

I am building a project using FFmpeg and using the the following command
ffmpeg -i “input.flac” -b:a 320k "output.mp3"This command copies all metadata to the mp3 and converts the front cover from jpg to png but I need the same cover file while converting FLAC to mp3.

1 Like

FFmpeg is a command-line tool for converting audio and video files from one format to another. When converting from one audio format to another, such as FLAC to MP3, FFmpeg may make changes to the audio data in order to achieve a certain level of quality or to meet the requirements of the target format.
For example, when converting from FLAC to MP3, FFmpeg may apply a lossy compression algorithm to the audio data in order to reduce the size of the resulting file. This can result in a change in the quality of the audio, as well as a change in the size of the file.

The format or size of the front cover picture changed during the conversion process. This could have been caused by the conversion parameters you selected or by the FFmpeg default settings. Several factors may be involved in this behavior:

  1. Compression Parameters
    JPEG is commonly supported by MP3 files for embedded album art. FFmpeg may transform the original picture in the FLAC file to JPEG if it was originally in a different format (such as PNG) while converting it to MP3. The format and size of the file may change as a result of this conversion.

  2. Setting for Quality
    You can set the output file quality with FFmpeg, which also affects the quality of the embedded images. It can seem different after conversion if the embedded image is of poorer quality due to the default settings or your customized settings.

  3. Sizing up
    Depending on your choices or the default settings, FFmpeg may resize the embedded image. FFmpeg may adjust the original image to comply with standards if it is larger than what is accepted as album art in MP3 files.

Got it! But in my case, it changes the front cover image of the file during the conversion process.

There can be various reasons, such as resizing the image to fit the requirements of the target format or applying a different image compression algorithm to the image data.
It’s worth noting that when converting from one format to another, it is generally expected that there will be some loss of quality or changes to the file. This is because different formats have different capabilities and requirements, and converting from one format to another often involves quality and file size trade-offs.

Do let me know if this solves your query. :slightly_smiling_face: