title: Can ffmpeg copy metadata/ID3 from FLAC to MP3?
body: <p>I have  a bit of Python code that loops through audio files, finds .FLAC files, and then uses the Python subcommand to run ffmpeg. It works. The audio is fine, but even though I see the metadata in the shell, it doesn't transfer the data to the ID3 tags in the MP3, and I am using the example found in the previous post here. Here's the command:</p>
  
  <pre class="lang-none prettyprint-override"><code>cmd = 'ffmpeg -y -i "' + src + '" -codec:a libmp3lame -q:a 0 -map_metadata 0 -id3v2_version 3 -write_id3v1 1 "' + dst + '"'
  </code></pre>
  
  <p>Which works out to:</p>
  
  <pre><code>ffmpeg -y -i "source.flac" -codec:a libmp3lame -q:a 0 -map_metadata 0 -id3v2_version 3 -write_id3v1 1 "destination.mp3"
  </code></pre>
  
  <p>And here is the log dump:</p>
  
  <pre><code>/usr/local/bin/python3.7 /home/krypterro/PycharmProjects/mediaman/RipFLAC.py
  1 Music Files Found
  2019-04-09 14:32:47.758 | INFO     | __main__:main:31 - Start of program
  2019-04-09 14:32:48.110 | DEBUG    | __main__:ripmp3:206 - Running Command: ffmpeg -y -i "/home/krypterro/audio/music_in/Visions/01-grimes-laughing_and_not_being_normal.flac" -acodec libmp3lame -ab 192000 "/home/krypterro/audio/music_out/Visions/01-grimes-laughing_and_not_being_normal.mp3"
  ffmpeg version 3.4.4-0ubuntu0.18.04.1 Copyright (c) 2000-2018 the FFmpeg developers
    built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
    configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
    WARNING: library configuration mismatch
    avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
    libavutil      55. 78.100 / 55. 78.100
    libavcodec     57.107.100 / 57.107.100
    libavformat    57. 83.100 / 57. 83.100
    libavdevice    57. 10.100 / 57. 10.100
    libavfilter     6.107.100 /  6.107.100
    libavresample   3.  7.  0 /  3.  7.  0
    libswscale      4.  8.100 /  4.  8.100
    libswresample   2.  9.100 /  2.  9.100
    libpostproc    54.  7.100 / 54.  7.100
  Input #0, flac, from '/home/krypterro/audio/music_in/Visions/01-grimes-laughing_and_not_being_normal.flac':
    Metadata:
      ARTIST          : Grimes
      TITLE           : Laughing And Not Being Normal
      ALBUM           : Art Angels
      DATE            : 2015
      track           : 1
      GENRE           : Electronic
      disc            : 1
      TOTALDISCS      : 1
      TOTALTRACKS     : 15
      LANGUAGE        : English
      RIP DATE        : 2015-12-12
      RETAIL DATE     : 2015-00-00
      MEDIA           : CD
      ENCODER         : FLAC 1.2.1 -8 -V
      RIPPING TOOL    : EAC 1.0 Beta 3
      RELEASE TYPE    : Retail
      ORGANIZATION    : 4AD
      CATALOG         : CAD3535CD
    Duration: 00:01:47.51, start: 0.000000, bitrate: 743 kb/s
      Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
  Stream mapping:
    Stream #0:0 -&gt; #0:0 (flac (native) -&gt; mp3 (libmp3lame))
  Press [q] to stop, [?] for help
  Output #0, mp3, to '/home/krypterro/audio/music_out/Visions/01-grimes-laughing_and_not_being_normal.mp3':
    Metadata:
      TPE1            : Grimes
      TIT2            : Laughing And Not Being Normal
      TALB            : Art Angels
      TDRC            : 2015
      TRCK            : 1
      TCON            : Electronic
      TPOS            : 1
      TOTALDISCS      : 1
      TOTALTRACKS     : 15
      TLAN            : English
      RIP DATE        : 2015-12-12
      RETAIL DATE     : 2015-00-00
      MEDIA           : CD
      CATALOG         : CAD3535CD
      RIPPING TOOL    : EAC 1.0 Beta 3
      RELEASE TYPE    : Retail
      ORGANIZATION    : 4AD
      TSSE            : Lavf57.83.100
      Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, s16p, 192 kb/s
      Metadata:
        encoder         : Lavc57.107.100 libmp3lame
  size=    2522kB time=00:01:47.52 bitrate= 192.1kbits/s speed=  41x    
  video:0kB audio:2521kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.042501%
  2019-04-09 14:32:50.811 | INFO     | __main__:main:73 - End of program
  
  Process finished with exit code 0
  </code></pre>