<br><br><div class="gmail_quote">On Mon, Feb 25, 2013 at 10:21 AM, Sergey Ivanov <span dir="ltr"><<a href="mailto:123kash@gmail.com" target="_blank">123kash@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi. <div>Actually you can get much more data using TagLib. Fields mentioned by you can be obtained using unified TagLib API, It works for all metadata containers. You you need to get some extra data, you have to dig It by yourself. Take a look on shared/tag_helpers/MP4TagHelper.cpp file in amarok repository. </div>
</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div> I didn't google how does iTunes store chapters, but I'm pretty sure that you can grab It using TagLib. ;)<br>
</div></blockquote><div>Thanks a lot for your reply. It took me a while to search the "atom" structure of an mp4 file, but I've finally found it! :D Will implement the patch using TagLib and submit it soon. :) </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<br><div class="gmail_quote">2013/2/23 Abhinandan Ramprasath <span dir="ltr"><<a href="mailto:abhiin1947@gmail.com" target="_blank">abhiin1947@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
Hi,<div><br></div><div>After going through the source of TagLib, I can confidently say it currently does not support chapters in MP4 or M4A files. The information u can get out of the library includes title, album, artist, comment, year, track, genre. This information is directly available in the header of the MP4 file. The problem with decoding the chapter markers is that it is not stored in the header ( apple's patented it apparently ) or rather, scattered around in the file. I am still hoping for some positive reply from the TagLib Developers ( they haven't replied yet ). </div>


<div><br></div><div>Will let you know of any developments.</div><div><div><div><br></div><div><br><div class="gmail_quote">On Thu, Feb 21, 2013 at 8:57 PM, Abhinandan Ramprasath <span dir="ltr"><<a href="mailto:abhiin1947@gmail.com" target="_blank">abhiin1947@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><div class="gmail_quote"><div>On Thu, Feb 21, 2013 at 4:17 AM, Matěj Laitl <span dir="ltr"><<a href="mailto:matej@laitl.cz" target="_blank">matej@laitl.cz</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On 19. 2. 2013 Abhinandan Ramprasath wrote:<br>
</div><div>> This is what I've got so far,<br>
<br>
</div>Nice research!<br>
<div><br>
> 1) mp4v2-2.0.0 supports chapters in mp4 files(mentioned on comment 2). The<br>
> format for chapter storage is specified between lines 2321 and 2375 under<br>
> src/mp4file.cpp (<br>
> <a href="http://code.google.com/p/mp4v2/downloads/detail?name=mp4v2-2.0.0.tar.bz2" target="_blank">http://code.google.com/p/mp4v2/downloads/detail?name=mp4v2-2.0.0.tar.bz2</a> ) .<br>
<br>
</div>Okay.<br>
<div><br>
> 2) comment 2 in <a href="https://bugs.kde.org/show_bug.cgi?id=240409" target="_blank">https://bugs.kde.org/show_bug.cgi?id=240409</a> mentions that<br>
> the dependency was removed. Is it safe for me to add it back?<br>
<br>
</div>We'd prefer not to, certainly not as a mandatory dependency.<br>
<div><br>
> 3) I cross checked the format of chapter storage with a simple cpp program<br>
> I wrote and got the titles of all chapters as output. But that was just<br>
> using a regex and I'm not too sure that would be accepted as a solution.<br>
<br>
</div>RegExes are used all over Amarok, so if this is not a moving target (e.g. if<br>
the strings you match don't change with library versions), it should be fine,<br>
but see below.<br></blockquote></div><div>I'm not sure if it is a moving target. Will read about it and get back.</div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div><br>
> 4) An Issue was filed for TagLib<br>
> <a href="https://github.com/taglib/taglib/issues/81" target="_blank">https://github.com/taglib/taglib/issues/81</a> asking<br>
> to expand support for chapters in mp3 files, which sadly, hasn't been<br>
> solved yet. Unfortunately, I wasn't able to find anything similar for mp4.<br>
<br>
</div>You fan file one, then! ;) Even better would be creating a pull request for<br>
TagLib that would add support for reading chapters (ideally both from mp3 and<br>
mp4 files). Given that mp4v2 is under MPL 1.1 and TagLib is under MPL 1.1 +<br>
LGPL 2.1, it may be possible to copy & adapt code from mp4v2 to TagLib<br>
directly, but please consult this first with TagLib developers [1]. (if both<br>
mp4v2 and TagLib where updated to the newest MPL 2.0, it would be definitely<br>
possible)<br></blockquote><div><br></div></div><div>Ya, trying to get the feature working on Taglib was the next thing I was going to do. I will try to find more information about it and get back.</div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<br>
Let's defer the decision how to represent this in Amarok until underlying<br>
libraries are ready, I must say that the idea to use MultiTrack may end up to<br>
be the good way, but please let us think about this more.<br></blockquote></div><div>I think Multitrack is how QuickTime does it( or I have a really old version ) and it looks pretty good. </div><div><br></div><div>P.S sorry for submitting the patch, I was almost done with it when I read the email</div>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[1] <a href="https://mail.kde.org/mailman/listinfo/taglib-devel" target="_blank">https://mail.kde.org/mailman/listinfo/taglib-devel</a><br>
<span><font color="#888888"><br>
        Matěj<br>
</font></span></blockquote></div><br>
</blockquote></div><br></div>
</div></div><br></div></div><div class="im">_______________________________________________<br>
Amarok-devel mailing list<br>
<a href="mailto:Amarok-devel@kde.org" target="_blank">Amarok-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/amarok-devel" target="_blank">https://mail.kde.org/mailman/listinfo/amarok-devel</a><br>
<br></div></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Sergey Ivanov
</font></span></div>
<br>_______________________________________________<br>
Amarok-devel mailing list<br>
<a href="mailto:Amarok-devel@kde.org">Amarok-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/amarok-devel" target="_blank">https://mail.kde.org/mailman/listinfo/amarok-devel</a><br>
<br></blockquote></div><br>