Hercules C++ Fog App - ABR refactoring

Key Information

The challenge is finished.
Show Deadlines

Challenge Overview

The Hercules Player is an application that allows customers to download videos to their computer or device for offline playback, along with streaming playback of videos for online playback.

The Hercules Fog project has stripped out some key portions of the Hercules Player application into a new test application for downloading videos from a server, modifying the manifest, and then playing back on various mobile and TV devices.

The current implementation is C++ and will run on:

This challenge will refactor the automatic bitrate selection functionality of AAMP into an external library and integrate that library back into the AAMP player.  A subsequent challenge will integrate this new library with Fog.

NOTE:  This is a very technical challenge and will require a fair bit of work in setup and testing.  You will need to use Linux to test the player.  Ubuntu 16.04 is your best bet.


In the forum will be the source code to the AAMP player.  The AAMP player is a video player that implements playback.  Fog implements recording, and those recordings can be played back through AAMP.  Both Fog and AAMP handle automatic bitrate switching when the network can't handle a given bitrate.  This is common for video playback now.  The HLS and Dash streams that are used have multiple bitrates encoded in the streams, and Fog can automatically switch between bitrates as it records, based on the network congestion / available bandwidth.

AAMP does the same, but for playback.  

The goal of this challenge is to abstract out the ABR (automatic bit rate) functionality from AAMP into a separate library, and then update the AAMP player to use that new library in their implementations, to handle the bitrate switching.  A subsequent challenge will integrate this new library with Fog for it's ABR implementation.  This way we can ensure that Fog is consistent with the player, and that when the client makes changes to the bitrate switching requirements, we only have to update one library, not two separate apps.  Because both Fog and AAMP run on large numbers (millions) of embedded devices, the QA process for both is extremely arduous, so the more we can have them share code, the easier QA should be in the long run as well.

When recording a live Dash feed through the TSB (time sync buffer) endpoint in Fog, ABR will be enabled.

ABR will start at a reasonable bitrate and will ramp up or down, depending on network conditions.  Only one bitrate will be recorded at any one time, but to the player it will look like a single, consistent video for playback.

The recording should react quickly to changing network conditions.  At the start of a recording, the bitrate rampup to a high quality bitrate should be as quick as possible, depending on what the network supports.

Going down in bitrate should happen less quickly, attempting to stay at a higher bitrate as long as possible.
AAMP player implementation
In the fragmentcollector_mpd.cpp file is a PrivateStreamAbstractionMPD::DoAbr method.  You are required to follow the same ABR implementation already available in the AAMP player, as this has been tuned to client expectations for playback, so if we follow what AAMP does in Fog, that should meet client requirements.  If you need to deviate from a similar implementation, please get clarification in the forum first.  We will use the ABR implementation in the AAMP player as it is in the code in the forum.  We will not change that implementation, other than whatever minor changes have to happen to make it a proper, consumable library.  The goal is to have the AAMP player function exactly as it did before the changes.

Library design

This new ABR library needs to be very well designed and encapsulated.  It will be integrated back into Fog and the goal is to ensure there are little to no integration problems.  Don't just tailor your solution to the AAMP player.  You need to think about how the library will be integrated into other projects and ensure that your library you create is clear, well documented, and easy to use.

Dash and HLS

Note that this new library must support both Dash and HLS stream formats. 

Validation is going to be difficult, due to the networking requirements here.  As a submitter, you are required to clearly document how you validated your changes and compared them to the AAMP implementation before the changes.  This will be used by reviewers to further validate the submissions.

Sample player

The AAMP player will be provided in the forum.  Build instructions can be found here:


Note that the AAMP player has changed quite a bit recently.  If you have trouble building, please ask questions in the forum.


Your submission should be a new AAMP player source, with the ABR functionality clearly separated out into a separate, compilable library.  This new library should be clearly documented, should have its own make structure, and should be completely independent from the AAMP player itself.  The updated AAMP player source should require this library as a dependency.


Please include clear, updated build documentation for:

* The new library
* AAMP player

Target Ubuntu 16.04 for the changes for this challenge.



Final Submission Guidelines

Please see above


Topcoder will compensate members in accordance with our standard payment policies, unless otherwise specified in this challenge. For information on payment policies, setting up your profile to receive payments, and general payment questions, please refer to ‌Payment Policies and Instructions.


2018 Topcoder(R) Open


Final Review:

Community Review Board


User Sign-Off

ID: 30062896