Totem Chapters/Markers Plugin

My proposal for GSoC 2010 is to create Totem plugin for handling chapters/markers. Chapters act like "live" bookmarks - you can add them while watching movie. It should work like subtitles: all information is stored in a single file along with the movie. I'm using CMML format (slightly modified to handle clips' thumbnails) to store chapters in.

More Information

Getting Code

Chapters plugin is in Totem trunk now, so you can grab fresh Totem version from the git (git:// and test it, or you can get stuff here:

  • Here is a git repository, please use master branch or hit git clone git://;

As part of my GSoC I have been developing generic table of contents for the GStreamer and Matroska chapters support based on it (see more details below). Here are repositories for that work:

  • git repository of GStreamer core with GstToc support: git://;

  • git repository of gstreamer-plugins-good with Matroska chapters support: git://

Note: you'll need GTK+-3 (2.90.x) and fresh GLib for Totem building.

Weekly Reports

How the GSoC Was Going On

Well, the main aim of the proposal was to create plugin for Totem to mark time positions in the movies. To be honest, I thought that I would be working only with Totem and CMML/Annodex inside OGG container, so I read CMML, Annodex and OGG specifications at the begining of the GSoC. Moreover I thought that I would be working with OGG contatiner directly and I had written some code examples based on liboggz: to parse OGG headers, to parse CMML headers. The first part of the GSoC I spent reading docs for GLib/GObject, GTK+, OGG, CMML/Annodex, liboggz and Totem. That was exciting, but the direction of development was wrong. And that was the time of my important lesson: ask first, then do it. I spent a lot of time reading and understanding OGG format, but I haven't used it anywhere. Yeah, that knowledge may be helpful in the future, but when you have limited time you can't waste it for something you don't need. The first part of the summer I spent developing Totem chapters plugin. Thanks to my mentor Bastien Nocera it was very exciting and I knew a lot of new things, especially about GLib and GTK+. The last part of the summer (when the GUADEC has started) I spent working with GStreamer. Well, I was surprised a bit when Bastien talked me to work on Matroska chapters support, but new work means new challenge. So, some time I spent reading GStreamer docs (Application Developer Manual and Plugin Writer's Manual) and Matroska format specifications. Then I started to work on generic table of contents (TOC) support for the GStreamer (based on bug 540890). The idea was to create a generic way to handle chapters, editions, angles and multitrack files. That will help to handle Matroska chapters, too. Thanks to Sebastian Dröge (from the GStreamer team) for the great help, the work has been done smoothly and without big troubles. After I had done initial work on GstToc (generic TOC support for the GStreamer), I started to work on the Matroska chapters support (with per-chapters/editions tags) using GstToc. That work is done, but I need to finish GstToc first and make some changes to Matroska element then. But that would be after GSoC.

What Is Done

  • All things mentioned in my GSoC proposal except writing files with embedded chapters and overlay titles. The first one will need file transcoding, which is not cool to do inside Totem. Before GSoC I thought that it can be done without transcoding, but I was wrong. Overlay titles need some changes in Totem's GStreamer backend, and they are not so important to spend time on them. Chapters plugin is already in the trunk (git commit) and you can test it in the fresh Totem version.

  • Wrote my own tiny CMML parser with embedded thumbnails support using libxml2 to drop dependency for obsolete libcmml, included in the chapters plugin.
  • Started to implement generic TOC support (GstToc) in the GStreamer. Totem (and chapters plugin, too) will have great benefits from that: imagine that you can navigate through FLAC tracks from the embedded cue sheet or chapters from the Matroska file. And support for new formats in GStreamer will require almost no changes in chapters plugin (see link for separate repository above).

  • Implemented Matroska chapters support based on GstToc (see link for separate repository above). But it will require some changes because GstToc isn't stable enough.

What I'm Going to Do After GSoC

  • Improve Totem chapters plugin (some UI redesign, integration with GstToc).

  • Finish GstToc support in the GStreamer.

  • Finish Matroska chapters support after GstToc stabilization.

  • Implement GstToc support for the FLAC embedded cue sheets (I have already read FLAC specifications).

  • Look for other GStreamer elements where I can implement GstToc support to make chapters plugin more valuable.

What I Have Learnt During GSoC

  • GLib/GObject
  • GTK+
  • libxml2
  • CMML and Annodex formats
  • OGG/liboggz
  • GStreamer
  • Matroska/EBML format
  • FLAC format
  • How to work with git and bugzilla
  • Autotools a bit
  • and other coding tips & tricks

How to Contact Me

Outreach/SummerOfCode/2010/AlexanderSaprykin_Totem (last edited 2013-12-03 18:33:16 by WilliamJonMcCann)