GSoC proposal review

Abhinandan Ramprasath abhiin1947 at gmail.com
Fri May 3 17:42:02 UTC 2013


This is the proposal I'm submitting for GSoC. Thanks to matej for the
reviews.

*Short Description:* Amarok currently has very limited CUE sheet support
and no support for chapters. My project aims at detecting chapter markers
of various formats by implementing them in TagLib and using it to Amarok's
advantage. Also, Integrating CUE sheets with Amarok so that they work
seamlessly.

Basic Details:

Name: Abhinandan Ramaprasath

Email Address: abhiin1947 at gmail.com

Freenode IRC Nick: abhiin1947

IM Service and Username: Gtalk - abhiin1947

Location (City, Country and/or Time Zone): Chennai, India, UTC+05:30

Github: https://github.com/abhiin1947/

Proposal Title: Implementing CUE sheet and chapter support in Amarok



Motivation for project:


Audiobooks are usually quite lengthy and go on for hours. It is not always
possible for people to finish listening to audiobooks in one go. Chapter
support is an important feature in modern audio players. Trying to find the
part of the audiobook that the user wants is an arduous task. Since Amarok
already provides a bookmark to the location where the user left off,
addition of chapter markers would make navigating an audiobook as easy as
flipping through a book.


Chapter markers otherwise have been a demanded feature ( with over 40+
wishes ). It would be very useful inenhanced
<http://en.wikipedia.org/wiki/Podcast#Enhanced_podcasts>
podcast <http://en.wikipedia.org/wiki/Podcast#Enhanced_podcasts> to be able
to jump to various chapters/parts with just a click of a button.
*
*

CUE sheeted music, on the other hand, is very popular, and not providing
proper support ruins the music experience. It has also been a requested
feature for quite a long time (1) ( 700+ votes ). Many bugs have been
reported (2) about Amarok’s lack of support for CUE sheeted music.
Implementation of CUE sheet support has been delayed over releases (from
2.6 to 2.8) and I would like to complete it this Google Summer of Code.
*
*

Goals:


The goals of my project would be to

1) Implement QuickTime chapter support in TagLib.

2) MP3 chapter support in Amarok.

3) Implement OGG chapter support in TagLib.

4) Display these chapters in Amarok.

5) Integrate CUE sheet support with collection manager and Amarok for a
seamless music experience.

6) Implement support for NeroChapter type in TagLib

7) Solve bugs related to my project along the way (3).
*
*

Implementation Details:


The project involves making changes in both TagLib and Amarok repositories.
I would like to divide the project into 5 parts.
*
*

*1. QtChapter support in MP4/M4A/M4B files*


The first part is implementing the QtChapter (Qt = QuickTime in this
proposal) support in MP4/M4A/M4B files. As per the Apple
docs<https://developer.apple.com/library/mac/#documentation/QuickTime/qtff/QTFFChap2/qtff2.html>,
the Qt (QuickTime) chapter support can be achieved by reading the “trak”
atom which contains the “chap” data. This trak atom contains the text track
which contains the chapter information. The indicated text track should
contain a “stbl” atom ( basically a table ) which would contain offsets to
the location in the file that contain chapter title in the file. Reading
data at these offsets give information about chapter titles. The time at
which each chapter marker occurs can be easily calculated using the
“bitrate” of the audiofile. These would be the changes that I would make in
TagLib to support QtChapters (QuickTime).


This should also solve part of the
bug<https://bugs.kde.org/show_bug.cgi?id=144849>.
This merge will provide support for the Apple Enhanced Podcast ( M4A ) as
well.
*
*

The changes in Amarok include, displaying the chapter markers to the user
in the form of bookmarks or Multi-Tracks.I plan on reading the chapter
information in Amarok the same way I implemented it in the bug
fix<https://git.reviewboard.kde.org/r/109256/>attempt. For actually
showing them on Amarok I’ll use the BookmarkGroupPtr
to create a new bookmark group and add chapter pointers to it in the form
of URLs. I would like to also store the chapter information in the database
as well.


*2. Show MP3 chapter markers in Amarok*



Thanks to a recent pull request
<https://github.com/taglib/taglib/pull/173>by krejclu6, MP3 chapter
support has been implemented in TagLib. This small
part of the project is to use this framework to show MP3 chapter markers in
Amarok. The implementation of this in Amarok will be same as mentioned
before.


*3. Implement OGG chapter support*

*
*

OGG chapter support is something TagLib still lacks. According to XIPH's
docs <http://wiki.xiph.org/Chapter_Extension>, chapter support in OGG is
very straightforward. The chapter data is found in the comments of the file
along with the metadata.

*4. **Implement CUE Sheet support*


The fourth part of the project would be to implement complete CUE sheet
support.


*What is CUE sheet?*

CUE sheet contains information related to the album, the main filename and
the time offsets at which each track occurs.


*What needs to be done?*

I propose to make this change in the KUrl. Parts of the Url would have data
about the Base File, Time-Offset and Duration of the track (after a “?” or
“#” at the end, if not possible a new protocol?). Then these URL’s would be
interpreted in the UmsCollection or SqlCollection classes as separate Track
files. This would also enable storing the details of each song in the
database, hence there is no need to access the CUE file every time.
*
*

Amarok already has a basic CUE sheet support, it can read CUE sheets added
manually through the browser or from a CDROM. I would like to integrate
this better with the CollectionScanner ( the way it is supposed to work,
highlighted in the bug
<https://bugs.kde.org/show_bug.cgi?id=187587>report's comments ). The
scanner will automatically recognize these CUE
files and record them as separate tracks in the database as mentioned
above. Any changed metadata in the file would be stored in the KUrl.
*
*
*5. Support for NeroChapter type in MP4*
*
*

The last part of the project would be to implement support for the
NeroChapter type in MP4. Since, this is not so popular, I would like to
keep this the last part of the project. This involves more changes in
TagLib than Amarok. The chapter track information is found under the “udta”
atom. This part of the project would aim at automatically detecting the
type of chapter present in the given file, decoding the chapter data and
providing it neatly.



Tentative Timeline:


June

< GSoC begins >

week 4: Community Bonding Period - Ask for improvement suggestions and get
to know the Amarok community.

July-

week 1: Create Abstract Classes in TagLib for MP4 chapter support ( This
will be useful for the last part of the project as well ). Implementing
QtChapter (QuickTime) Support.

week 2: Finish implementing QtChapter (QuickTime) Support in TagLib.
Implement OGG chapter support.

week 3: Modify the database and store the chapter data in it.

week 4: Tweak UI in Amarok to display the chapter markers ( MP3, MP4 , OGG
).Start Implementation of CUE sheet support.

< Mid-term  - Complete chapter support in Amarok>

August-

*week 1*: Integrate CUE sheet reading with the scanner and automatically
detect that these are separate track files and add them to the collection.

*weeks 2 and 3*: Implement changes in KUrl. Make modifications in
SqlCollection and other methods and classes that use url(TrackPtr ,
playback and other controllers).

*week 4*: Make modifications in UmsCollection to support CUE sheets as well.

September-

*week 1*: Implement modules that allow the user to change the metadata of
CUE-sheeted tracks. I do not plan on making these changes in the CUE sheet
instead store them locally/in the url so that Amarok can display them

*week 2*: Finish CUE sheet support in Amarok.

*week 3*: Implement NeroChapter support in TagLib.

< pencils down >

*week 4*: Testing and resolving any bugs.



Do you have other obligations from late May to early August (school, work,
vacation, etc.)?
*
*

No. I can work upto 50 hours a week, 6-8 hours in the weekdays, and in the
weekends too, if required, or if I am possessed with the compulsive urge to
get something done ;) College starts early August, but it’s early in the
semester, and the course work would be extremely light.
*
*

About Me:


I am an Information Technology undergrad at SSN College of Engineering. I
am comfortable writing code in C/C++/Python. I was introduced to Amarok
when my friend suggested it after looking at my android app
Lyricize<https://play.google.com/store/apps/details?id=com.festalize.LyricMatch>.
It totally drew me in. I'd love to make any contribution that makes music
more enjoyable. I am also an enthusiastic web and android developer, and a
great fan of FOSS. On a Foreign Exchange trade related project I recently
worked on, I built a scraper <https://github.com/makkarlabs/stockscrape>,
which I open sourced, that scrapes data from the National Stock Exchange
website, and publishes it as a JSON API. I’ve also contributed to the Haiku
OS.
*
*

Introduced to C and C++ at the age of 8, I continued to work on programming
challenges, web and mobile related projects during school and college to
sharpen my skills. I have learnt to code in languages such as java, php,
ruby, node(javascript), etc. In the hackathon conducted by KRDS in 2012, I
created a location guessing Facebook game which won the second
prize<http://lighthouseinsights.in/a-chat-with-the-krds-india-facecode-hackathon-winners.html>.
I also was selected as one of the winners of Firefox OS hackathon conducted
by Mozilla for creating a collaborative browser across platforms called
BrowseWithMe using nodejs (
server<https://bitbucket.org/abhiin1947/bb_monkey/src>,
client <https://github.com/makkarlabs/bbmonkey> ). I created a
gesturecontrolled web app "
Fliptube <https://github.com/makkarlabs/fliptube>", a YouTube client where
mobile users could flip through videos with ease, for the Yahoo! Open hack
2012 and it was selected as top 10 hacks of the night (out of 180+ hacks).
*
*

Am I comfortable working independently under a mentor or supervisor?


Yes. I have been an intern for the ULaw Software Foundation based in Canada
and time zones aren’t really a problem at all.
*
*

After GSoC:

After GSoC I plan on continuing to fix bugs and code more features for
Amarok and Taglib. I intend to learn about more multimedia related file
formats and improving support in those areas.

One area I intentionally did not mention is the implementation of matroska
chapter support. I plan on implementing this after GSoC as I feel it would
be too much for 3 months. It is similar to the chapter markers in OGG
Vorbis.
Another requested feature is the support for embedded CUE files. I have
explained these more clearly in the "Additional Information" section. This
is one feature that requires a lot more time so, I plan to work on this
after GSoC.

My experience with Amarok:


I started out my Amarok journey by trying to solve bug 240409 (which turns
out to be a big part of my proposal ). It was initially marked as a junior
job. I tried to implement chapter detection using library mp4v2 ( patch:
https://git.reviewboard.kde.org/r/109079/ ) which was eventually rejected.
After research and learning, I implemented support for chapter detection in
Amarok by using mp4atom.h from taglib explicitly ( patch:
https://git.reviewboard.kde.org/r/109256/ ). It was rejected because it was
a technical preview. I have been busy with exams since, and have not been
able to finish it.



Two other recent bug fixes that are not accepted yet -
https://git.reviewboard.kde.org/r/110243/ ,
https://git.reviewboard.kde.org/r/110150/
*
*
Additional Information:

Embedded CUE sheets are CUEs that are stored within the audio files. There
are 2 formats in which they occur, FLAC and WAVPACK. The FLAC embedded CUE
sheet has its own tags whereas the WAVPACK uses the apev2 tag. The task
would be to implement CUE detection in TagLib and then use them to
implement it in Amarok.


External Links:


(1) - https://bugs.kde.org/show_bug.cgi?id=187587 reported 2009


(2) - https://bugs.kde.org/show_bug.cgi?id=187587 ,
https://bugs.kde.org/show_bug.cgi?id=286089 ,
https://bugs.kde.org/show_bug.cgi?id=294136 ,
https://bugs.kde.org/show_bug.cgi?id=270003 ,
https://bugs.kde.org/show_bug.cgi?id=279234 ,
https://bugs.kde.org/show_bug.cgi?id=230272
*
*

(3) - https://bugs.kde.org/show_bug.cgi?id=240409 ,
https://bugs.kde.org/show_bug.cgi?id=187587 ,
https://bugs.kde.org/show_bug.cgi?id=286089 ,
https://bugs.kde.org/show_bug.cgi?id=270003 ,
https://bugs.kde.org/show_bug.cgi?id=294136 ,

*https://bugs.kde.org/show_bug.cgi?id=144849*


(4) - *https://bugs.kde.org/show_bug.cgi?id=144849*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok-devel/attachments/20130503/d6930319/attachment-0001.html>


More information about the Amarok-devel mailing list