使用 ffmpeg 将专辑封面图像嵌入到 FLAC 文件

使用 ffmpeg 将专辑封面图像嵌入到 FLAC 文件

我正在尝试使用 ffmpeg 将专辑封面嵌入到 FLAC 文件中。

似乎它无法将专辑封面嵌入到 FLAC 文件中,并且生成的文件长度为零。

我知道您可以将图像放在与 FLAC 文件相同的文件夹中,但是有没有办法将其嵌入到特定的 FLAC 文件中?

谢谢 !

命令行

ffmpeg.exe -y -i "C:\1\test112014\cd\1.flac" -i "C:\Users\alex\AppData\Local\Temp\cover.png" -map 0 -map 1 -c copy  -id3v2_version 3 -write_id3v1 1 "C:\1\test112014\cd\1-with-album-art.flac"

输出

ffmpeg version N-60321-g4d7d9a5 Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb  2 2014 22:01:03 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 63.100 / 52. 63.100
  libavcodec     55. 49.101 / 55. 49.101
  libavformat    55. 29.101 / 55. 29.101
  libavdevice    55.  7.100 / 55.  7.100
  libavfilter     4.  1.102 /  4.  1.102
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, flac, from 'C:\1\test112014\cd\1.flac':
  Metadata:
    ALBUM           : Chillout del Mar Ibiza Lounge Cafe
    ARTIST          : Chillarea
    TITLE           : Sunset - Miami Beach Mix
    track           : 01/20
    DATE            : 2013
    ENCODER         : Lavf55.29.101
  Duration: 00:03:48.26, bitrate: 823 kb/s
    Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
Input #1, image2, from 'C:\Users\alex\AppData\Local\Temp\cover.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #1:0: Video: png, rgb24, 500x500 [SAR 1:1 DAR 1:1], 25 tbr, 25 tbn, 25 tbc
[flac @ 0430b7e0] only one stream is supported
Output #0, flac, to 'C:\1\test112014\cd\1-with-album-art.flac':
  Metadata:
    ALBUM           : Chillout del Mar Ibiza Lounge Cafe
    ARTIST          : Chillarea
    TITLE           : Sunset - Miami Beach Mix
    track           : 01/20
    DATE            : 2013
    encoder         : Lavf55.29.101
    Stream #0:0: Audio: flac, 44100 Hz, stereo
    Stream #0:1: Video: png, rgb24, 500x500 [SAR 1:1 DAR 1:1], q=2-31, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #1:0 -> #0:1 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Error number -22 occurred

相关内容