Opened 4 years ago

Last modified 4 years ago

#8795 new enhancement

[Metadata] ID3 Lyrics are added as TXXX custom tags instead of proper USLT tag in MP3, etc.

Reported by: Eana Hufwe Owned by:
Priority: wish Component: avformat
Version: unspecified Keywords: ID3, lyrics
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
ID3 Lyrics are added as TXXX custom tags instead of proper USLT tag in MP3, AIFF (force ID3v2) and other formats.

How to reproduce:

% # Add lyrics metadata to an MP3 file
% ffmpeg -i mp3.mp3 -map 0 -y -codec copy -metadata "lyrics=line 1\x0aline 2\x0aline 3\x0a\x0aline 4\x0aline 5" mp3out.mp3

ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.3 (clang-1103.0.32.62)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --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-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100

Inspect the mp3out.mp3 file with other ID3 viewers/editors, it is seen that tag USLT is added by ffmpeg as a TXXX custom frame instead of a proper one. A proper USLT frame requires attributes like language and a content descriptor. The latter can be an empty string, while the former must a 3-letter language code.

The language tag can be included as part of the input in the format of lyrics-LANGUAGECODE (e.g. lyrics-eng) like what is shown in the ffprobe output, or can be defaulted to eng for English or und for undetermined.


References:

Change History (1)

comment:1 by Elon Musk, 4 years ago

Priority: normalwish
Type: defectenhancement
Note: See TracTickets for help on using tickets.