[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglib-devel
Subject:    Re: MP4 atoms incorrectly showing as non-null empty strings (e.g., "aART" and "\251wrt" atoms)
From:       Luká¹ Lalinský <lalinsky () gmail ! com>
Date:       2013-04-03 12:04:33
Message-ID: CAGUtLj8q2WuRTut7bmSM94+CV0oav1pWkttNO5cC0eCOiSxtyA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


With AtomicParsley I get this:

lukas@gurgle:~/code/taglib$ AtomicParsley a.m4a -t
Atom "trkn" contains: 21 of 29
Atom "disk" contains: 1 of 2
Atom "gnre" contains: R&B
Atom "stik" contains: Normal
Atom "=C2=A9alb" contains: DJMAX TECHNIKA 3 ORIGINAL SOUNDTRACK
Atom "aART" contains: PENTAVISION
Atom "----" [com.apple.iTunes;ARRANGER] contains: 3rd Coast
Atom "=C2=A9ART" contains: 3rd Coast
Atom "=C2=A9wrt" contains: 3rd Coast
Atom "cprt" contains: =E2=84=97&=C2=A92011 PENTAVISION Corp.
Atom "----" [com.apple.iTunes;COVER ART DIMENSION] contains: 720
Atom "----" [com.apple.iTunes;DISCID] contains: 970D3F1D
Atom "----" [com.apple.iTunes;GENRE DJMAX] contains: R&B Slow
Atom "----" [com.apple.iTunes;iTunSMPB] contains:  00000000 00000840
00000168 0000000000524658 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000
Atom "----" [com.apple.iTunes;LABEL] contains: PENTAVISION
Atom "----" [com.apple.iTunes;LYRICIST] contains: JC
[01:53:33]Rhyme over these processed beats - back to back on the DJMAXg
Atom "----" [com.apple.iTunes;LYRICS LANGUAGE] contains: English
Atom "----" [com.apple.iTunes;PACKAGING] contains: Super Jewel Box
Atom "----" [com.apple.iTunes;PERFORMER] contains: vocal: So Fly / rap: JC
Atom "----" [com.apple.iTunes;RIPTOOL] contains: ExactAudioCopy v1.0b2
Atom "=C2=A9nam" contains: My Heart, My Soul
Atom "=C2=A9too" contains: qaac 1.39, CoreAudioToolbox 7.9.7.9, AAC-LC Enco=
der,
TVBR q91, Quality 96
Atom "=C2=A9day" contains: 2011-10-07
Atom "----" [com.apple.iTunes;BAND] contains:
Atom "=C2=A9wrt" contains:
Atom "covr" contains: 1 piece of artwork

So yes, it does contain =C2=A9wrt multiple times. I'm not sure if that's
expected to happen and what would be the best way for TagLib to handle it,
but currently it uses only the last entry. Could you check with iTunes if
it can read the composer tag?

The printing issue is expected. What you get from ByteVector::data is not
NULL-terminated, so you can't use simple %s with it.



On Wed, Apr 3, 2013 at 12:28 PM, Duke Yin <yindesu@gmail.com> wrote:

> I've added log statements to the 1.8 final source code and determined tha=
t
> when an MP4 file/tag is constructed, the tag is constructed multiple time=
s.
>
> Test file:
> http://dl.dropbox.com/u/22586935/test/121%20My%20Heart%2C%20My%20Soul.m4a
>
> Log change:
> https://github.com/taglib/taglib/blob/stable/taglib/mp4/mp4tag.cpp#L174
> In ParseText function,
> Added: printf("Inserted %s : %s.",
>             atom->name.data(),
>             value.toString(" ; ").toCString(true));
>
> Full log:
> http://pastebin.com/EYba1uDL
>
> Order of tags read:
> 04-03 03:13:29.545: Inserted =EF=BF=BDalb=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=
=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD :
> 04-03 03:13:29.545: Inserted aART=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=
=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD :
> 04-03 03:13:29.555: Inserted =EF=BF=BDART=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=
=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD :
> 04-03 03:13:29.555: Inserted =EF=BF=BDwrt=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=
=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD : Good (1st)
> 04-03 03:13:29.555: Inserted cprt=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=
=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD :
> 04-03 03:13:29.555: Inserted =EF=BF=BDlyr=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=
=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD :
> 04-03 03:13:29.555: Inserted =EF=BF=BDnam=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=
=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD :
> 04-03 03:13:29.565: Inserted =EF=BF=BDtoo=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=
=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD :
> 04-03 03:13:29.565: Inserted =EF=BF=BDday=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=
=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD :
> 04-03 03:13:29.565: Inserted =EF=BF=BDwrt=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=
=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD : BAD blank! (2nd)
> 04-03 03:13:29.585: Inserted =EF=BF=BDalb: :
> 04-03 03:13:29.585: Inserted aARTo :
> 04-03 03:13:29.585: Inserted =EF=BF=BDARTp :
> 04-03 03:13:29.585: Inserted =EF=BF=BDwrt0 : Good (3rd)
> 04-03 03:13:29.585: Inserted cprt  :
> 04-03 03:13:29.595: Inserted =EF=BF=BDlyr, : (longer by 7-8 chars compare=
d to the
> first "?lry" atom)
> 04-03 03:13:29.595: Inserted =EF=BF=BDnam in my h :
> 04-03 03:13:29.595: Inserted =EF=BF=BDtoodo it to :
> 04-03 03:13:29.595: Inserted =EF=BF=BDdayuals[00 :
> 04-03 03:13:29.595: Inserted =EF=BF=BDwrtack to b : BAD blank! (4th)
>
>
> As you can see, Composer was read 4 times, with the last read being a
> blank string.  Additionally, atom's name gets garbled after the first 4
> characters.
>
> Can anyone explain what's going on here?  Bad m4a file?  Bug in TagLib?
> Broken behavior because of compiling for Android?
>
> Thanks,
> Duke
>
> _______________________________________________
> taglib-devel mailing list
> taglib-devel@kde.org
> https://mail.kde.org/mailman/listinfo/taglib-devel
>
>

[Attachment #5 (text/html)]

<div dir="ltr"><div style>With AtomicParsley I get \
this:</div><div><br></div><div>lukas@gurgle:~/code/taglib$ AtomicParsley a.m4a \
-t</div><div>Atom &quot;trkn&quot; contains: 21 of 29</div><div>Atom &quot;disk&quot; \
contains: 1 of 2</div>

<div>Atom &quot;gnre&quot; contains: R&amp;B</div><div>Atom &quot;stik&quot; \
contains: Normal</div><div>Atom &quot; ©alb&quot; contains: DJMAX TECHNIKA 3 ORIGINAL \
SOUNDTRACK</div><div>Atom &quot;aART&quot; contains: PENTAVISION</div>

<div>Atom &quot;----&quot; [com.apple.iTunes;ARRANGER] contains: 3rd \
Coast</div><div>Atom &quot; ©ART&quot; contains: 3rd Coast</div><div>Atom &quot; \
©wrt&quot; contains: 3rd Coast</div><div>Atom &quot;cprt&quot; contains: â„—&amp; \
©2011 PENTAVISION Corp.</div>

<div>Atom &quot;----&quot; [com.apple.iTunes;COVER ART DIMENSION] contains: \
720</div><div>Atom &quot;----&quot; [com.apple.iTunes;DISCID] contains: \
970D3F1D</div><div>Atom &quot;----&quot; [com.apple.iTunes;GENRE DJMAX] contains: \
R&amp;B Slow</div>

<div>Atom &quot;----&quot; [com.apple.iTunes;iTunSMPB] contains:   00000000 00000840 \
00000168 0000000000524658 00000000 00000000 00000000 00000000 00000000 00000000 \
00000000 00000000</div><div>Atom &quot;----&quot; [com.apple.iTunes;LABEL] contains: \
PENTAVISION</div>

<div>Atom &quot;----&quot; [com.apple.iTunes;LYRICIST] contains: \
JC</div><div>[01:53:33]Rhyme over these processed beats - back to back on the \
DJMAXg</div><div>Atom &quot;----&quot; [com.apple.iTunes;LYRICS LANGUAGE] contains: \
English</div>

<div>Atom &quot;----&quot; [com.apple.iTunes;PACKAGING] contains: Super Jewel \
Box</div><div>Atom &quot;----&quot; [com.apple.iTunes;PERFORMER] contains: vocal: So \
Fly / rap: JC</div><div>Atom &quot;----&quot; [com.apple.iTunes;RIPTOOL] contains: \
ExactAudioCopy v1.0b2</div>

<div>Atom &quot; ©nam&quot; contains: My Heart, My Soul</div><div>Atom &quot; \
©too&quot; contains: qaac 1.39, CoreAudioToolbox 7.9.7.9, AAC-LC Encoder, TVBR q91, \
Quality 96</div><div>Atom &quot; ©day&quot; contains: 2011-10-07</div>

<div>Atom &quot;----&quot; [com.apple.iTunes;BAND] contains:  </div><div>Atom &quot; \
©wrt&quot; contains:  </div><div>Atom &quot;covr&quot; contains: 1 piece of \
artwork</div><div><br></div><div>So yes, it does contain  ©wrt multiple times. \
I&#39;m not sure if that&#39;s expected to happen and what would be the best way for \
TagLib to handle it, but currently it uses only the last entry. Could you check with \
iTunes if it can read the composer tag?<br>

</div><div><br></div><div style>The printing issue is expected. What you get from \
ByteVector::data is not NULL-terminated, so you can&#39;t use simple %s with \
it.</div><div><br></div></div><div class="gmail_extra"><br><br>

<div class="gmail_quote">On Wed, Apr 3, 2013 at 12:28 PM, Duke Yin <span \
dir="ltr">&lt;<a href="mailto:yindesu@gmail.com" \
target="_blank">yindesu@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">

<div dir="ltr"><div><div>I&#39;ve added log statements to the 1.8 final source code \
and determined that when an MP4 file/tag is constructed, the tag is constructed \
multiple times.<br><br></div><div>Test file:<br><a \
href="http://dl.dropbox.com/u/22586935/test/121%20My%20Heart%2C%20My%20Soul.m4a" \
target="_blank">http://dl.dropbox.com/u/22586935/test/121%20My%20Heart%2C%20My%20Soul.m4a</a><br>




</div><div><br>Log change:<br><a \
href="https://github.com/taglib/taglib/blob/stable/taglib/mp4/mp4tag.cpp#L174" \
target="_blank">https://github.com/taglib/taglib/blob/stable/taglib/mp4/mp4tag.cpp#L174</a><br></div><div>In \
ParseText function,<br>



</div><div>Added: printf(&quot;Inserted %s : %s.&quot;,<br>                    \
atom-&gt;name.data(),<br>                    value.toString(&quot; ; \
&quot;).toCString(true));<br><br></div></div><div>Full log:<br><a \
href="http://pastebin.com/EYba1uDL" \
target="_blank">http://pastebin.com/EYba1uDL</a><br>



<br></div><div>Order of tags read:<br>04-03 03:13:29.545: Inserted \
�alb��������  : <br>04-03 03:13:29.545: Inserted \
aART��������  : <br>04-03 03:13:29.555: Inserted \
�ART��������  : <br>04-03 03:13:29.555: Inserted \
�wrt��������  : Good (1st)<br>



04-03 03:13:29.555: Inserted cprt��������  : <br>04-03 03:13:29.555: \
Inserted �lyr��������  : <br>04-03 03:13:29.555: Inserted \
�nam��������  : <br>04-03 03:13:29.565: Inserted \
�too��������  : <br>04-03 03:13:29.565: Inserted \
�day��������  : <br>



04-03 03:13:29.565: Inserted �wrt��������  : BAD blank! \
(2nd)<br>04-03 03:13:29.585: Inserted �alb: : <br>04-03 03:13:29.585: Inserted \
aARTo : <br>04-03 03:13:29.585: Inserted �ARTp : <br>04-03 03:13:29.585: Inserted \
�wrt0 : Good (3rd)<br>



04-03 03:13:29.585: Inserted cprt   : <br>04-03 03:13:29.595: Inserted �lyr, : \
(longer by 7-8 chars compared to the first &quot;?lry&quot; atom)<br>04-03 \
03:13:29.595: Inserted �nam in my h  : <br>04-03 03:13:29.595: Inserted �toodo it \
to  : <br>



04-03 03:13:29.595: Inserted �dayuals[00  : <br>04-03 03:13:29.595: Inserted \
�wrtack to b  : BAD blank! (4th)<br><br><br></div><div>As you can see, Composer was \
read 4 times, with the last read being a blank string.   Additionally, atom&#39;s \
name gets garbled after the first 4 characters.<br>



<br></div><div>Can anyone explain what&#39;s going on here?   Bad m4a file?   Bug in \
TagLib?   Broken behavior because of compiling for \
Android?<br><br>Thanks,<br>Duke<br></div></div> \
<br>_______________________________________________<br> taglib-devel mailing list<br>
<a href="mailto:taglib-devel@kde.org">taglib-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/taglib-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/taglib-devel</a><br> \
<br></blockquote></div><br></div>



_______________________________________________
taglib-devel mailing list
taglib-devel@kde.org
https://mail.kde.org/mailman/listinfo/taglib-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic