ffmpeg  -i infile.flac  -q:a 0  outfile.mp3Code language: CSS (css)

-q:a 0 tells ffmpeg to use the highest quality VBR.

However, ffmpeg was transcoding my album art from jpeg to png, which increased the size of the cover art.

Stream mapping:
  Stream #0:1 -> #0:0 (mjpeg (native) -> png (native))
  Stream #0:0 -> #0:1 (flac (native) -> mp3 (libmp3lame))
Code language: CSS (css)

(I guess the above conversion sort of makes sense given how ffmpeg works.)

After some digging, I found the -c:v copy option, which specifies that the video stream should be copied, rather than transcoded. The full command is:

ffmpeg  -i infile.flac  -c:v copy  -q:a 0  outfile.mp3
Code language: CSS (css)

The above command results in:

Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (flac (native) -> mp3 (libmp3lame))Code language: CSS (css)

分类: Linux

0 条评论


Avatar placeholder

您的电子邮箱地址不会被公开。 必填项已用 * 标注