Cannot add iTunes Meta Tags to file that doesn't already have some

67 views
Skip to first unread message

donmesserli

unread,
Jul 28, 2009, 6:09:42 PM7/28/09
to mp4v2
I've tried writing a program and using MP4TagsStore(), etc. to add
iTunes Meta Tags to a file that doesn't have any. The tags aren't
written to the file.

I then tried doing it with the command-line tool mp4tags and the same
thing happened.

In either case, if the file already had some tags, it works.

Am I doing something wrong or is this a limitation of the library?

Edward Groenendaal

unread,
Jul 28, 2009, 7:19:30 PM7/28/09
to mp...@googlegroups.com
Hi,

That is interesting, and no should not be a limitation of the library.

I guess it is related to the opening of the file using MP4Modify() and
there not being enough existing room for the metadata.

Try instrumenting the code somewhat to see what is going on, in
particular mp4v2/src/itmf/Tags.cpp.

How are you generating these MP4s in the first place?

Cheers, Ed.

> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "mp4v2" group.
> To post to this group, send email to mp...@googlegroups.com
> To unsubscribe from this group, send email to mp4v2+un...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/mp4v2?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

donmesserli

unread,
Jul 29, 2009, 11:20:22 AM7/29/09
to mp4v2
The files were converted from alac to aac using afconvert. I will do
some debugging. Am I right that the tags aren't actually written to
the file until MP4Close() is called?

Don


On Jul 28, 6:19 pm, Edward Groenendaal <ed...@myreflection.org> wrote:
> Hi,
>
> That is interesting, and no should not be a limitation of the library.
>
> I guess it is related to the opening of the file using MP4Modify() and  
> there not being enough existing room for the metadata.
>
> Try instrumenting the code somewhat to see what is going on, in  
> particular mp4v2/src/itmf/Tags.cpp.
>
> How are you generating these MP4s in the first place?
>
> Cheers, Ed.
>
> On 29/07/2009, at 10:09 AM, donmesserli wrote:
>
> > I've tried writing a program and using MP4TagsStore(), etc. to add
> > iTunes Meta Tags to a file that doesn't have any.  The tags aren't
> > written to the file.
>
> > I then tried doing it with the command-line tool mp4tags and the same
> > thing happened.
>
> > In either case, if the file already had some tags, it works.
>
> > Am I doing something wrong or is this a limitation of the library?
>
> > >
>
>
>  smime.p7s
> 2KViewDownload

donmesserli

unread,
Jul 31, 2009, 12:01:18 PM7/31/09
to mp4v2
I've found out where it is happening...

MP4TagsStore() calls
Tags::c_store calls
Tags::storeString calls
Tags::store calls
genericAddItem which includes the code...

MP4Atom* ilst = file.FindAtom( "moov.udta.meta.ilst" );
if( !ilst )
return false;

Since the atom can't be found, it returns and does nothing.
The atom isn't there because there isn't any metadata in the file yet.

It appears that I might be able to work at a lower level (i.e.
MP4File) and create the atom. Ideas?

Don

Edward Groenendaal

unread,
Jul 31, 2009, 3:37:45 PM7/31/09
to mp...@googlegroups.com, mp4v2
Well done on finding it.

I think we should change the code in the lib to create the atom if it
isn't found.

I've only got iPhone ineternet access at the moment so can't work on
this for a little while.

Cheers Ed.

Don Messerli

unread,
Aug 12, 2009, 11:19:39 AM8/12/09
to mp...@googlegroups.com
Should I add this as a new issue on the Google Code page?

Don

Kona Blend

unread,
Aug 17, 2009, 7:56:46 PM8/17/09
to mp...@googlegroups.com
trunk has this fixed a while back. see r344:
http://code.google.com/p/mp4v2/source/detail?r=344

-kb

Jeremy Noring

unread,
Aug 17, 2009, 8:11:22 PM8/17/09
to mp4v2
On Jul 31, 12:37 pm, Edward Groenendaal <ed...@me.com> wrote:
> Well done on finding it.
>
> I think we should change the code in the lib to create the atom if it  
> isn't found.
>
> I've only got iPhone ineternet access at the moment so can't work on  
> this for a little while.

It looks like this has already been fixed in the trunk:

http://code.google.com/p/mp4v2/source/browse/trunk/src/itmf/generic.cpp

...I ran into this bug as well. Any idea when a new release is due
out? So far I'm loving the library, but this is my hitch so far.
Reply all
Reply to author
Forward
0 new messages