Opened 5 years ago

Last modified 3 years ago

#3125 reopened defect

\\ 'separator' in id3tag causes unwanted truncation of ffprobe output

Reported by: ginjaninja Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: id3 ogg
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: ffprobe truncates artist (possibly others as well) tag of mp3/flac file, if it contains '
' text 'separator' eg. 'artist1
artist2
artist3' outputs as 'artist3'
How to reproduce: amend artist tag of mp3 or flac file as 'artist1
artist2
artist3'; run ffprobe against it and review output.

C:\New folder>ffprobe.exe "01. Ring Ring.flac"
ffprobe version N-56041-gf974289 Copyright (c) 2007-2013 the FFmpeg developers

built on Sep 4 2013 18:01:17 with gcc 4.7.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-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib

libavutil 52. 43.100 / 52. 43.100
libavcodec 55. 31.101 / 55. 31.101
libavformat 55. 16.101 / 55. 16.101
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 83.102 / 3. 83.102
libswscale 2. 5.100 / 2. 5.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100

Input #0, flac, from '01. Ring Ring.flac':

Metadata:

ALBUM : Ring Ring
ARTIST : artist3
GENRE : Pop
TITLE : Ring Ring
album_artist : aartist1/aartist2/aartist3
DATE : 1973
track : 1

Duration: 00:03:04.87, bitrate: 1021 kb/s

Stream #0:0: Audio: flac, 44100 Hz, stereo, s16

Attachments (2)

Ring.flac (596.9 KB) - added by ginjaninja 5 years ago.
5 second clip, by way of example (less than 2.5mb limit)
test - Copy (mp3cut.net).mp3 (339.6 KB) - added by ginjaninja 4 years ago.
mp3 file showing \ not working

Download all attachments as: .zip

Change History (14)

comment:1 Changed 5 years ago by ginjaninja

comment:2 Changed 5 years ago by ginjaninja

artist1\\artist2\\artist3 outputs as artist3

Last edited 5 years ago by ginjaninja (previous) (diff)

comment:3 Changed 5 years ago by ginjaninja

didnt escape the \\ in the original post

comment:4 Changed 5 years ago by cehoyos

Is this not reproducible with ffmpeg (the application)?

comment:5 Changed 5 years ago by ginjaninja

yes ffmpeg also truncates artist tag if it contains \\

C:\New folder>ffmpeg.exe -v 99 -i "01. Ring Ring.flac" test.mp3
ffmpeg version N-57057-g024bf3a Copyright (c) 2000-2013 the FFmpeg developers
  built on Oct 11 2013 18:01:59 with gcc 4.8.1 (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-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aa
cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavp
ack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 46.101 / 52. 46.101
  libavcodec     55. 35.100 / 55. 35.100
  libavformat    55. 19.100 / 55. 19.100
  libavdevice    55.  4.100 / 55.  4.100
  libavfilter     3. 88.101 /  3. 88.101
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument
'99'.
Reading option '-i' ... matched as input file with argument '01. Ring Ring.flac'
.
Reading option 'test.mp3' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 99.
Successfully parsed a group of options.
Parsing a group of options: input file 01. Ring Ring.flac.
Successfully parsed a group of options.
Opening an input file: 01. Ring Ring.flac.
[flac @ 0254a000] Format flac probed with size=2048 and score=50
[flac @ 0254a000] File position before avformat_find_stream_info() is 8628
[flac @ 0242ebe0] sample/frame number mismatch in adjacent frames
    Last message repeated 126 times
[flac @ 0254a000] max_analyze_duration 5000000 reached at 5015510 microseconds
[flac @ 0254a000] File position after avformat_find_stream_info() is 745472
Input #0, flac, from '01. Ring Ring.flac':
  Metadata:
    ALBUM           : Ring Ring
    ARTIST          : artist3
    GENRE           : Pop
    TITLE           : Ring Ring
    album_artist    : aartist1/aartist2/aartist3
    DATE            : 1973
    track           : 1
  Duration: 00:03:04.87, bitrate: 1021 kb/s
    Stream #0:0, 56, 1/44100: Audio: flac, 44100 Hz, stereo, s16
Successfully opened the file.
Last edited 5 years ago by ginjaninja (previous) (diff)

comment:6 Changed 5 years ago by cehoyos

  • Component changed from FFprobe to avformat
  • Keywords id3 added
  • Version changed from unspecified to git-master

Please upload a short sample.

Changed 5 years ago by ginjaninja

5 second clip, by way of example (less than 2.5mb limit)

comment:7 Changed 5 years ago by ginjaninja

From another post i now realise that \\ is treated as special by mp3tag (the client i use to write tags). I had thought it was just a.n.other text string, but it turns out that \\ actually instructs mp3tag to write something special to the header.

for flacs the header (when viewed in hex editor) has artist=artist1....artist=artist2....artist=artist3
so ffmpeg isn't truncating a text string past the last \\, it is perhaps just not multi-value aware.

for mp3 the header is TPE1 artist1[00][00][00]artist2[00][00][00]artist3
and ffmpeg\ffprobe reports artist as artist1 (ie doesnt read past the 1st null character?)

so perhaps there is no standard for ffmpeg to accommodate? perhaps it is a peculiarity of the mp3tag client and the way it writes headers. Still it would be great if ffmpeg did support such headers by using its own format for output of multi value tags.

I understand other clients do write headers in a similar way. If the user could specify the text character to use to delimit the output for eg a multivalue artist field (such as the way they are written here by mp3tag), then my client would be able to see multiple artists as they were intended (it uses ffmpeg (ffprobe) to extract tags from files). My client could parse the output of ffmpeg (ffprobe) with the known separator to derive the multiple artists.

more universally, when using ffmpeg to transcode content, maybe if ffmpeg had an appreciation of these types of multi value headers, it could ensure they are written to the destination in the same format?

comment:8 Changed 4 years ago by michael

  • Resolution set to fixed
  • Status changed from new to closed

ffmpeg displays

ARTIST : artist1;artist2;artist3

now, dont remeber which commit fixed it

Last edited 4 years ago by michael (previous) (diff)

comment:9 Changed 4 years ago by cehoyos

  • Keywords ogg added

Fixed by Ben Boeckel in 0dc66553

comment:10 Changed 4 years ago by ginjaninja

multiple value appreciation is not working in ffprobe/ffmpeg version N-65895-g96b2ba6 for mp3s...It is working for flacs.

Last edited 4 years ago by ginjaninja (previous) (diff)

comment:11 Changed 4 years ago by ginjaninja

  • Resolution fixed deleted
  • Status changed from closed to reopened

Changed 4 years ago by ginjaninja

mp3 file showing
\ not working

Note: See TracTickets for help on using tickets.