Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#7969 closed defect (wontfix)

Flac tracknumber is incorrectly identified

Reported by: rayden Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: flac metadata
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: track number is shown incorrectly for flac files. ffprobe shows tracknumber as track (lowercase), and track as TRACK (uppercase). Only using metaflac I realised the tags were different

How to reproduce:
Grab a good flac file, and then run:

$ ffprobe '02 - Angelica.flac'
Input #0, flac, from '02 - Angelica.flac':
Metadata:
ALBUM : Eternity [Peaceville Records-Pony Canyon Inc PCCY-01050]
TRACKTOTAL : 15
ARTIST : Anathema
PERFORMER : Anathema
GENRE : "Doom metal"
DATE : 1996
TITLE : Angelica
track : 02
Duration: 00:05:50.40, start: 0.000000, bitrate: 809 kb/s
Stream #0:0: Audio: flac, 44100 Hz, stereo, s16


$ metaflac --list '02 - Angelica.flac'
...
METADATA block #2
  type: 4 (VORBIS_COMMENT)
  is last: false
  length: 233
  vendor string: reference libFLAC 1.3.2 20170101
  comments: 8
    comment[0]: ALBUM=Eternity [Peaceville Records-Pony Canyon Inc PCCY-01050]
    comment[1]: TRACKNUMBER=02
    comment[2]: TRACKTOTAL=15
    comment[3]: ARTIST=Anathema
    comment[4]: PERFORMER=Anathema
    comment[5]: GENRE=Doom Metal
    comment[6]: DATE=1996
    comment[7]: TITLE=Angelica

Tracknumber is the correct tag that players use to identify, hence the following example is just for the purpose of showing the differences:

$ metaflac --set-tag=track=02 '02 - Angelica.flac'
$ ffprobe -fflags +bitexact 02\ -\ Angelica.flac
Input #0, flac, from '02 - Angelica.flac':
  Metadata:
    ALBUM           : Eternity [Peaceville Records-Pony Canyon Inc PCCY-01050]
    TITLE           : Angelica
    TRACKTOTAL      : 15
    ARTIST          : Anathema
    PERFORMER       : Anathema
    GENRE           : Doom Metal
    DATE            : 1996
    TRACK           : 02
  Duration: 00:05:50.40, start: 0.000000, bitrate: 809 kb/s
    Stream #0:0: Audio: flac, 44100 Hz, stereo, s16

This is very confusing and I think the tracknumber should show as TRACKNUMBER (uppercase).
It took me a good while initially to understand why the tags on my flac album were not being set correctly, and that was because I was using track as ffprobe was showing it.

Change History (4)

comment:1 by rayden, 5 years ago

Cc: akylen@gmail.com added

comment:2 by rayden, 5 years ago

Forgot to add this:

$ ffmpeg -v 9 -loglevel 99 -i '02 - Angelica.flac'
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-i' ... matched as input url with argument '02 - Angelica.flac'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input url 02 - Angelica.flac.
Successfully parsed a group of options.
Opening an input file: 02 - Angelica.flac.
[NULL @ 0x7f898500be00] Opening '02 - Angelica.flac' for reading
[file @ 0x7f8986000000] Setting default whitelist 'file,crypto'
Probing flac score:100 size:2048
[flac @ 0x7f898500be00] Format flac probed with size=2048 and score=100
[flac @ 0x7f898500be00] Before avformat_find_stream_info() pos: 8934 bytes read:32768 seeks:0 nb_streams:1
[flac @ 0x7f8985800800] sample/frame number mismatch in adjacent frames
    Last message repeated 20 times
[flac @ 0x7f898500be00] All info found
[flac @ 0x7f898500be00] stream 0: start_time: 0.000 duration: 350.400
[flac @ 0x7f898500be00] format: start_time: 0.000 duration: 350.400 bitrate=809 kb/s
[flac @ 0x7f898500be00] After avformat_find_stream_info() pos: 68608 bytes read:98304 seeks:0 frames:1
Input #0, flac, from '02 - Angelica.flac':
  Metadata:
    ALBUM           : Eternity [Peaceville Records-Pony Canyon Inc PCCY-01050]
    track           : 02
    TRACKTOTAL      : 15
    ARTIST          : Anathema
    PERFORMER       : Anathema
    GENRE           : Doom Metal
    DATE            : 1996
    TITLE           : Angelica
  Duration: 00:05:50.40, start: 0.000000, bitrate: 809 kb/s
    Stream #0:0, 1, 1/44100: Audio: flac, 44100 Hz, stereo, s16
Successfully opened the file.
At least one output file must be specified
[AVIOContext @ 0x7f8986000200] Statistics: 98304 bytes read, 0 seeks
Last edited 5 years ago by rayden (previous) (diff)

comment:3 by Carl Eugen Hoyos, 5 years ago

Component: ffprobeavformat
Resolution: wontfix
Status: newclosed
Version: unspecifiedgit-master

For future tickets: Please remember that only current FFmpeg git head is supported here.
track is how FFmpeg calls the tag in question.

Last edited 5 years ago by Carl Eugen Hoyos (previous) (diff)

comment:4 by rayden, 5 years ago

Cc: akylen@gmail.com removed
Note: See TracTickets for help on using tickets.