GPAC report from GSoC 2016

This was the first Google Summer of Code (GSoC) for the GPAC team. GSoC is a program organized by Google “Google Summer of Code (GSoC) is an online, international program designed to encourage university student participation in open source software development”.

Practically, Google selects organizations around open-source projects (such as GPAC, full list). The organizations publish subjects (ours) with mentors to take care of the selected student(s). Then students can apply for GSoC during their summer.

For organizations, Google also organizes a mentor event at Google’s office in the Silicon Valley. It is a great opportunity to meet other mentors from all over the world. GSoC is an opportunity to get new contributors.

For students, GSoC is a huge opportunity to get financed to work on open-source projects. Students get a stipend (that is going to be modulated per country starting at next year) that covers their expenses. It is a real journey into freedom.

Below is what our student Abdul Rauf from India said about his GSoC. Abdul was an excellent student for us:

It was a very successful journey with GPAC during GSoC time and I am very happy that I was selected for GPAC organisation.
My project was to create a video decoding module on Android using the low level media API i.e. MediaCodec API. During the project, I faced some trouble with the MediaCodec C++ API due to little to no documentation on the internal working of the API. Also, the color format of the decoded video was not known. This was the most difficult part of my project but with the help of my mentors who guided and provided me with different resources, I completed it on time. My other tasks included overhauling the user interface of the “osmo4” player on Android and also creating a config file editor. Both the tasks were more related to Android development and were relatively easy than the first one. It felt really nice when the work I did during summer was merged into GPAC.
I feel really blessed to have such responsive mentors specially Romain and Rodolphe who were always ready to help and I need to thank them for guiding and helping me every time there was an issue. It was a very good learning experience for me.

Support for Apple latest adaptive streaming format

As some of you may already know, Apple has announced during WWDC2016 the support for fragmented MP4 files in HLS:

We have been adding support in GPAC for fmp4 HLS, both at the client side and at MP4Box side. You can translate a fmp4 m3u8 manifest into a DASH manifest:

For DASH main profile (using segment lists):

For DASH live profile (using segment template):

Here is GPAC playing the demo fmp4 stream for Apple (


This is early stage work, feedback is of course welcome !

MPEG-DASH SRD and HEVC tiling for VR videos


We were at MMSys 2016 talking about new nice features in GPAC: support for MPEG-DASH Spatial Relation Description and HEVC motion-constrained tiling!
We had a quick poster presenting our two demos:

Tile-based adaptation using independent video encoded in H264

In this demo, a 4K tears of steel is split in 9 tiles, each of them encoded in various bitrates and resolutions. The resulting composition of tiles is played in GPAC with frame-level accuracy to rebuild the complete video. Of course, all of this is 100% DASH conformant and produced with MP4Box. MP4Box has the ability to add any MPD descriptor at period, adaptation set or representation level. For SRD, we use adaptation set descriptors as specified in MPEG DASH; for example:

MP4Box -dash 1000 [other dash params]  source.mp4:desc_as=<SupplementalProperty schemeIdUri=\"urn:mpeg:dash:srd:2014\" value=\"0,0,1,1,1,2,2\"/>

indicates that source.mp4 is placed at X=0, Y=1 with width 1 and height 1 on a tiling grid of size 2×2. This information needs to be manually specified at command line for independent videos, but  is automatically inserted if the source file contains an HEVC tile track (see second demo).

The full content of the demo can be browsed here, and you can have fun with the HD version or the 4K version of the DASH session.

You can use GPAC player with gui to watch the different tiles quality and stats:


HEVC Motion-constrained Tile-based adaptation

In this demo, we use HEVC tiling tools with constrained motion to allow replacing a tile of an HEVC bitstream with a tile from another HEVC bitstream with same configuration but different quality. In this use case the different HEVC bitstream represent the same content in order to perform bitrate adaptation at the tile level. The nice thing about this is that the reconstructed bitstream is HEVC compliant and requires only a single decoder for the playback!

The full content of the demo can be browsed here, and you can have fun with the HD version of the DASH session.

You can use GPAC player with gui to watch the different tiles quality and stats:


WARNING: the file format for the HEVC tile track or the MPD format are not standardized yet, there will be some changes in GPAC regarding this demo any time soon. The MP4Box documentation will be updated once the standard is finalized.

MP4Box.js : our FOSDEM 2016 talk

Dear readers,

Like every year the GPAC team went to the FOSDEM conference. FOSDEM is the biggest worldwide event about Open-Source Software (OSS). It occurs every year in January in Brussels, Belgium.

The event contained an Open Media track led by EBU and Kaltura. Kudos to them! For a report of what happened in the Open Media room, please read the excellent review from Nicolas Weil.

This year Cyril Concolato made a presentation of the current leads for MP4Box.js:



All the presentations from the Open Media room.

All the videos from the Open Media room.


GPAC selected for the Google Summer Of Code (GSoC) 2016

GPAC GSoC page:


The timeline to see the subject and apply is quite short (25 March for student application deadline):

Please pass along the message. GSoC is a good opportunity for projects to improve and find contributors!

If you have any question, please contact

Check key-frame alignment with MP4Box

Dear adaptive streaming followers,

Many of you reported issues when packaging your encoded content to respectively HLS or MPEG-DASH using GPAC (resp. the MP42TS and MP4Box tools). Most of the time, this is due to misalignment of key-frames across the different encoded qualities. In this article, we are going to show how to check key-frame alignment.

A packager like MP4Box doesn’t re-encode your content

MP4Box does two things for you:

  1. Import: It understands your media to import it to the MP4 container. For example: ‘MP4Box -add video.h264 -add audio.aac av.mp4’
    When MP4Box doesn’t understand the format, you may want to specify manually this step with NHML.
  2. Manipulates: MP4Box manipulates the MP4 container (e.g. edit, fragment, cut, dash, encrypt, etc.). One key feature of the MP4 container is the ability to manipulate content without any knowledge about the content format. Theoretically it means that MP4Box can package some MPEG-DASH content even for a codec it wouldn’t know.

But in any case MP4Box does not re-encode the content. For that, please use an encoder (such as FFmpeg – see references at the end of the article). It is your responsibility, as the content editor, to feed MP4Box with some appropriate content at the encoder level.

If your content is not prepared correctly, MP4Box works on a best-effort basis and may (or may not) do its job. MP4Box may or may not print warnings. But some players (like dash.js for MPEG-DASH) may silently fail with the packaged content.

Command-line to get quick summary of key-frames intervals

You will get the average key-frame interval computed for the track with ID TRACK_ID:

Having different numbers for the average GOP length on different files mean that your GOP size differ and key-frames won’t be aligned across various qualities: you will have to re-encode. However there may be cases where the average GOP length is the same, but slight variations may occur resulting in misalignment when DASHing.

Command-line to get complete key-frames list and indexes to check alignment

You’ll get:

Then do it with another source file, and compare:

Additional resources for encoding properly

Some tutorials are available at:


Open positions in our lab

The GPAC team at Telecom ParisTech has two new open positions:

We also have an open PhD position on peer-to-peer streaming in web browsers, description available here.

If you would like to join us in our offices in Paris and participate in our open-source and R&D activities, don’t hesitate to contact us!