FLAC metadata are read incorrectly

Questions involving a Windows version of FFmpeg.
Post Reply
Vlada
Posts: 3
Joined: Mon Jul 14, 2014 9:42 pm

FLAC metadata are read incorrectly

Post by Vlada » Mon Jul 14, 2014 10:51 pm

Hello everyone,
I am trying to convert my FLAC file(s) (ripped by EAC) to MP3(s) while keeping the original tags and album cover. However, I have noticed that metadata of the resulting MP3 file are different. It looks like some tags are read twice ("Meteora;Meteora" instead of "Meteora" etc.). I think that problem is in the reading of the metadata (see the test below).

I have tried to delete the ENCODER entry (to avoid possible confusion of the tags), use different builds of the ffmpeg (32/64-bit static from Git, 32/64-bit static 2.2.3)...with no success. VLC and MP3tag show the tags of the input FLAC file correctly.

I think it may me caused by the EAC. Its compression options are set to store ID3v1.1+ID3v2.3, while the FLAC is designed to store Vorbis comments only (http://forums.mp3tag.de/lofiversion/ind ... t6119.html). Maybe the Vorbis comments and ID3v2.3 are being mixed together?

Can I avoid mixing the tags (or whatever causes this) without modifying my input file(s) (e.g. ignoring Vorbis comments)?

Code: Select all

D:\>"C:\Program Files\ffmpeg\bin\ffmpeg.exe" -i "D:\13 Numb.flac"
ffmpeg version N-64654-g2db1bcf Copyright (c) 2000-2014 the FFmpeg developers
  built on Jul 13 2014 22:08:34 with gcc 4.8.3 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib
modplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en
able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
 --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil      52. 92.100 / 52. 92.100
  libavcodec     55. 69.100 / 55. 69.100
  libavformat    55. 46.100 / 55. 46.100
  libavdevice    55. 13.102 / 55. 13.102
  libavfilter     4. 10.100 /  4. 10.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, flac, from 'D:\13 Numb.flac':
  Metadata:
    TOTALTRACKS     : 14
    ALBUM           : Meteora;Meteora
    disc            : 1/1
    encoder         : FLAC.EXE -6 -V -T "ARTIST=Linkin Park" -T "TITLE=Numb" -T
"ALBUM=Meteora" -T "DATE=2003" -T "TRACKNUMBER=13" -T "GENRE=Alternative Metal"
-T "COMMENT=" -T "BAND=" -T "ALBUMARTIST=" -T "COMPOSER=" -T "DISCNUMBER=1" -T "
TOTALDISCS=1" -T "TOTALTRACKS=14" -o
    DATE            : 2003;2003
    TLEN            : 339520
    ARTIST          : Linkin Park;Linkin Park
    encoded_by      : Exact Audio Copy   (Burst rezim)
    TITLE           : Numb;Numb
    TOTALDISCS      : 1
    GENRE           : Alternative Metal;Alternative Metal
    track           : 13
  Duration: 00:03:07.52, start: 0.000000, bitrate: 1068 kb/s
    Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
    Stream #0:1: Video: mjpeg, yuvj444p(pc, bt470bg), 400x400, 90k tbr, 90k tbn,
 90k tbc
    Metadata:
      comment         : Cover (front)
At least one output file must be specified

D:\>

rogerdpack
Posts: 1877
Joined: Fri Aug 05, 2011 9:56 pm

Re: FLAC metadata are read incorrectly

Post by rogerdpack » Mon Jul 21, 2014 6:54 am

maybe ask on the ffmpeg-user mailing list...

llogan
Posts: 332
Joined: Fri Mar 14, 2014 3:29 am

Re: FLAC metadata are read incorrectly

Post by llogan » Tue Jul 22, 2014 8:18 pm

Please provide an input file sample.

Vlada
Posts: 3
Joined: Mon Jul 14, 2014 9:42 pm

Re: FLAC metadata are read incorrectly

Post by Vlada » Wed Jul 23, 2014 10:56 pm

llogan wrote:Please provide an input file sample.
I want to avoid problems with copyright so I have recorded 3 seconds of "nothing", encoded to flac and copied the tags.

Here it is:
http://www58.zippyshare.com/v/26406148/file.html

I had to wait for moderator(s), so in the meantime I found avconv, which works fine (it shows some flac errors but the resulting MP3 is playable + the tags are preserved).

llogan
Posts: 332
Joined: Fri Mar 14, 2014 3:29 am

Re: FLAC metadata are read incorrectly

Post by llogan » Thu Jul 24, 2014 1:28 am

This is a possible regression from 0dc6655:

Code: Select all

commit 0dc66553adb8b7dc89bc1118da0b0661a7ed1c09
Author: Ben Boeckel <mathstuf at gmail>
Date:   Wed Feb 5 12:10:55 2014 -0500

    vorbis: append data from tags together
    
    Currently, if there are multiple 'performer' tags, the last one is the
    only one which appears. Instead, join them with a semicolon.
Thanks for the sample. Ticket #3799 created.
Last edited by llogan on Thu Jul 24, 2014 11:09 pm, edited 2 times in total.

Vlada
Posts: 3
Joined: Mon Jul 14, 2014 9:42 pm

Re: FLAC metadata are read incorrectly

Post by Vlada » Thu Jul 24, 2014 10:56 pm

Thank you for creating the ticket.

Yes, it might be related to this...however I am not sure whether the author (Ben Boeckel) mentions multiple authors within single container type (e.g. multiple ID3v2 'Author' tags; I dont even know if its possible) or within all types of metadata container (e.g. two authors... one in ID3v1 and second one in ID3v2).

Does ffmpeg internally store only single type of metadata? I believe it should store all(?) the 3 types (Vorbis+ID3v1+ID3v2, maybe there are more) separately to be able to convert lets say FLAC to OGG while preserving tags of particular type. The tags can be generally different from each other (I dont see any reason for this though), I think the encoder should preserve them if possible. Eventually, there could be some switch to enable/disable mixing of the tags.

I can imagine some "tricky" scenarios :) :
FLAC[Vorbis] -> MP3[ID3v2]
FLAC[Vorbis+ID3v1+ID3v2] -> MP3[ID3v1+ID3v2] (omit Vorbis?)
MP3[ID3v1+ID3v2] -> OGG[Vorbis] or MP3[ID3v1+ID3v2] -> OGG[Vorbis+ID3v1+ID3v2] (I believe that OGG does not officially support ID3 as well)

Please note that I do not have much experience with ffmpeg/tagging, some of my ideas may be wrong.

llogan
Posts: 332
Joined: Fri Mar 14, 2014 3:29 am

Re: FLAC metadata are read incorrectly

Post by llogan » Tue Jan 31, 2017 10:49 pm

This should be fixed now as of 65862f5.

Post Reply
'