Unable to tag mp4:offset problem

Issue #49 resolved
IJabz repo owner created an issue

https://java.net/jira/browse/JAUDIOTAGGER-433

'm using your library for an Android application to tag m4a files but it doesn't work somehow...
I've made a trunk build on 28th May since the latest snapshot from December 2011 didn't work at all for me.
I can tag such a file in Itunes without any problem btw.
It looks like the issue I found here already, but it says that the problem is fixed already...
https://java.net/jira/browse/JAUDIOTAGGER-387

05-28 11:24:01.778: E/generic(7787): Cannot make changes to file /sdcard/Music/Seeed/Molotov / Wonderful Life EP/2 - Wonderful Life.m4a because Unable to make changes to Mp4 file, incorrect offsets written difference was 100
05-28 11:24:01.778: E/generic(7787): org.jaudiotagger.audio.exceptions.CannotWriteException: Unable to make changes to Mp4 file, incorrect offsets written difference was 100
05-28 11:24:01.778: E/generic(7787): at org.jaudiotagger.audio.mp4.Mp4TagWriter.checkFileWrittenCorrectly(Mp4TagWriter.java:882)
05-28 11:24:01.778: E/generic(7787): at org.jaudiotagger.audio.mp4.Mp4TagWriter.write(Mp4TagWriter.java:694)
05-28 11:24:01.778: E/generic(7787): at org.jaudiotagger.audio.mp4.Mp4FileWriter.writeTag(Mp4FileWriter.java:41)
05-28 11:24:01.778: E/generic(7787): at org.jaudiotagger.audio.generic.AudioFileWriter.write(AudioFileWriter.java:429)
05-28 11:24:01.778: E/generic(7787): at org.jaudiotagger.audio.AudioFileIO.writeFile(AudioFileIO.java:334)
05-28 11:24:01.778: E/generic(7787): at org.jaudiotagger.audio.generic.AudioFileWriter.write(AudioFileWriter.java:429)
05-28 11:24:01.778: E/generic(7787): at org.jaudiotagger.audio.AudioFileIO.writeFile(AudioFileIO.java:334)
05-28 11:24:01.778: E/generic(7787): at org.jaudiotagger.audio.AudioFileIO.write(AudioFileIO.java:164)

Comments (5)

  1. IJabz reporter

    Just confirmed, this is still a problem with latest code base - see org.jaudiotagger.issues.Issue433Test

  2. IJabz reporter

    At the end of the original file we have:

        Atom udta @ 20548 of size:100 ,ends @ 20648
            Atom titl @ 20556 of size:29 ,ends @ 20585
            Atom perf @ 20585 of size:20 ,ends @ 20605
            Atom albm @ 20605 of size:43 ,ends @ 20648
    Atom mdat @ 20648 of size:1260852 ,ends @ 1281500
    

    After writing some metadata we had

        Atom udta @ 20548 of size:90 ,ends @ 20638
            Atom meta @ 20556 of size:82 ,ends @ 20638
                Atom hdlr @ 20568 of size:34 ,ends @ 20602
                Atom ilst @ 20602 of size:36 ,ends @ 20638
                    Atom ©alb @ 20610 of size:28 ,ends @ 20638
    Atom mdat @ 20638 of size:1260852 ,ends @ 1281490
    

    I think its write correctly but my offset check fails so the changes are not committed. I think the issue is that we don't understand the titl, perf and albm atoms and that is causing an issue

  3. IJabz reporter

    it doesnt write correctly, if I disalbe check and let it write changes the audio will not play. The problem is we dont take into the existing titl, pef and albm atoms when we adjust the stco offsets

  4. Log in to comment