Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#3969 closed defect (fixed)

Incorect mapping of tags during m4a -> mp3 transcoding

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

Description

During a m4a -> mp3 transcoding the AAC 'date atom' (release year) is incorrectly mapped to the mp3 ID3 tag. Instead of 'TYER' for ID3v3.2 and 'TDRC' for ID3v3.4 'TDRL' is used. As a result the year information is lost during transcoding.

(It seems to be a similar behavior as described in the ticket #3694)

% ffmpeg -i input.m4a -codec:v copy -codec:a libmp3lame -q:a 2 output.mp3
ffmpeg version 2.3.git
built on Ubuntu 4.8.2-19ubuntu1

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '03 Into the Black Light.m4a':

Metadata:

major_brand : M4A
minor_version : 512
compatible_brands: isomiso2
title : Into the Black Light
artist : Ghost Brigade
album : Isolation Songs
genre : Melodic Death Metal
track : 3/11
date : 2009
encoder : FDK AAC encoder
album_artist : Ghost Brigade

Duration: 00:05:27.98, start: 0.046444, bitrate: 207 kb/s

Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 204 kb/s (default)
Metadata:

handler_name : SoundHandler

Stream #0:1: Video: mjpeg, yuvj420p(pc, bt470bg), 600x597 [SAR 1:1 DAR 200:199], 90k tbr, 90k tbn, 90k tbc

Output #0, mp3, to '03 Into the Black Light.mp3':

Metadata:

major_brand : M4A
minor_version : 512
compatible_brands: isomiso2
TIT2 : Into the Black Light
TPE1 : Ghost Brigade
TALB : Isolation Songs
TCON : Melodic Death Metal
TRCK : 3/11
TDRL : 2009
TPE2 : Ghost Brigade
TSSE : Lavf56.4.101
Stream #0:0: Video: mjpeg, yuvj420p, 600x597 [SAR 1:1 DAR 200:199], q=2-31, 90k tbn, 90k tbc
Stream #0:1(und): Audio: mp3 (libmp3lame), 44100 Hz, stereo, fltp (default)
Metadata:

handler_name : SoundHandler
encoder : Lavc56.1.100 libmp3lame

Stream mapping:

Stream #0:1 -> #0:0 (copy)
Stream #0:0 -> #0:1 (aac (native) -> mp3 (libmp3lame))

Press [q] to stop, ? for help
frame= 1 fps=0.1 q=-1.0 Lsize= 8012kB time=00:05:28.02 bitrate= 200.1kbits/s
video:69kB audio:7942kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.006302%
ffmpeg version 2.3.git Copyright (c) 2000-2014 the FFmpeg developers

built on Sep 9 2014 21:20:40 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --prefix=/home/------/ffmpeg_build --extra-cflags=-I/home/------/ffmpeg_build/include --extra-ldflags=-L/home/------/ffmpeg_build/lib --bindir=/home/------/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1f65c20] stream 0, timescale not set

Change History (9)

comment:1 by ra666ack, 10 years ago

There's a typo: I meant ID3v2.3 and ID3v2.4

comment:2 by Carl Eugen Hoyos, 10 years ago

To make this a valid ticket, please provide the command line that allows to reproduce the issue together with the complete, uncut console output.

comment:3 by Carl Eugen Hoyos, 10 years ago

Do you believe that there is a difference between this ticket and ticket #3694?

comment:4 by ra666ack, 10 years ago

ffmpeg -i 03\ Into\ the\ Black\ Light.m4a -codec:v copy -codec:a libmp3lame -q:a 2 03\ Into\ the\ Black\ Light.mp3
ffmpeg version 2.3.git Copyright (c) 2000-2014 the FFmpeg developers

built on Sep 9 2014 21:20:40 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --prefix=/home/dontcare/ffmpeg_build --extra-cflags=-I/home/dontcare/ffmpeg_build/include --extra-ldflags=-L/home/dontcare/ffmpeg_build/lib --bindir=/home/dontcare/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x3761c20] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '03 Into the Black Light.m4a':

Metadata:

major_brand : M4A
minor_version : 512
compatible_brands: isomiso2
title : Into the Black Light
artist : Ghost Brigade
album : Isolation Songs
genre : Melodic Death Metal
track : 3/11
date : 2009
encoder : FDK AAC encoder
album_artist : Ghost Brigade

Duration: 00:05:27.98, start: 0.046444, bitrate: 207 kb/s

Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 204 kb/s (default)
Metadata:

handler_name : SoundHandler

Stream #0:1: Video: mjpeg, yuvj420p(pc, bt470bg), 600x597 [SAR 1:1 DAR 200:199], 90k tbr, 90k tbn, 90k tbc

Output #0, mp3, to '03 Into the Black Light.mp3':

Metadata:

major_brand : M4A
minor_version : 512
compatible_brands: isomiso2
TIT2 : Into the Black Light
TPE1 : Ghost Brigade
TALB : Isolation Songs
TCON : Melodic Death Metal
TRCK : 3/11
TDRL : 2009
TPE2 : Ghost Brigade
TSSE : Lavf56.4.101
Stream #0:0: Video: mjpeg, yuvj420p, 600x597 [SAR 1:1 DAR 200:199], q=2-31, 90k tbn, 90k tbc
Stream #0:1(und): Audio: mp3 (libmp3lame), 44100 Hz, stereo, fltp (default)
Metadata:

handler_name : SoundHandler
encoder : Lavc56.1.100 libmp3lame

Stream mapping:

Stream #0:1 -> #0:0 (copy)
Stream #0:0 -> #0:1 (aac (native) -> mp3 (libmp3lame))

Press [q] to stop, ? for help
frame= 1 fps=0.1 q=-1.0 Lsize= 8012kB time=00:05:28.02 bitrate= 200.1kbits/s
video:69kB audio:7942kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.006302%

in reply to:  3 comment:5 by ra666ack, 10 years ago

Replying to cehoyos:

Do you believe that there is a difference between this ticket and ticket #3694?

In case the described assumption is correct, probably not. This is to demonstrate the issue is most probably source codec independent.

Thank you for fixing!

comment:6 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedavformat
Keywords: id3v2 metadata added

Is this still reproducible?
Or was it fixed in dc351e1381900ead3288079f93f359161804d024 ?

in reply to:  6 comment:7 by ra666ack, 10 years ago

Replying to cehoyos:

Is this still reproducible?
Or was it fixed in dc351e1381900ead3288079f93f359161804d024 ?

The issue seems to be fixed. During the m4a to mp3 conversion the ID3v2.4 tag is written. The year is stored in 'TRDC' Tag which seems to work now.

Tested on:

ffmpeg version 2.5.git Copyright (c) 2000-2014 the FFmpeg developers

built on Dec 10 2014 20:15:35 with gcc 4.9.1 (Ubuntu 4.9.1-16ubuntu6)
configuration: --prefix=/home/###/ffmpeg_build --extra-cflags=-I/home/###/ffmpeg_build/include --extra-ldflags=-L/home/###/ffmpeg_build/lib --bindir=/home/###/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 14.100 / 56. 14.100
libavformat 56. 15.103 / 56. 15.103
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100

Thanks for fixing!

comment:8 by Carl Eugen Hoyos, 10 years ago

Resolution: fixed
Status: newclosed

comment:9 by Carl Eugen Hoyos, 10 years ago

Version: unspecifiedgit-master

Apparently a duplicate of ticket #3694, thank you for testing again!

Note: See TracTickets for help on using tickets.