This makes the encoding of picture descriptions consistent with the
encoding of other text id3 tags and works better with iTunes, which
does not display pictures with some UTF-16 picture descriptions
(including a UTF-16 empty string, i.e. BOM + terminator). It also
saves a few bytes.
Example:
ffmpeg -f lavfi -i sine=b=4 -f lavfi -i smptebars -map 0:a -map 1:v \
-codec:a libmp3lame -codec:v mjpeg -id3v2_version 3 \
-metadata:s:v comment="Cover (front)" -t 3 -y out.mp3
This example does not set a picture description (-metadata:s:v title=)
so an empty string is written in the id3v2.3 APIC frame. Without this
patch, UTF-16 is used and the cover art does not display in iTunes.
With the patch the cover art is displayed. (Note that iTunes does not
display or have a way to set picture descriptions, only the picture
itself, but nevertheless has trouble skipping some UTF-16 descriptions.)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Adding an arbitrary amount of padding bytes at the end of the
ID3 metadata fixes cover art display for some software (iTunes,
Traktor, Serato, Torq).
For reference (ID3 metadata):
[ Apic frames ] -> cover doesn't show up
[ Apic frames, Padding ] -> ok
[ Apic frames, ID3 frames ] -> ok
[ ID3 frames, Apic frames ] -> cover doesn't show up
[ ID3 frames, Apic frames, Padding ] -> ok
Frame sizes in ID3v2.3 are not synchsafe, they are simply 32be numbers.
In practice this bug is not noticeable unless the frame size takes more
than 7 bits (which is almost never for text frames).
Adds support for year (TYER) and day/month (TDAT) tags when writing
id3v2 version 3 metadata by splitting the "date" tag. The date tag
should have a format of "YYYY-MM-DD" or "YYYY".
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>