Advanced Adaptive Media Player
Published: September 09, 2019
Edited: December 31, 2019
What is AAMP?
AAMP (Advance Adaptive Media Player) is an application which uses gstreamer to present IP Video Streams. It supports the following features,
- Player supporting HLS (Access) and DASH (PlayReady) streams. AAMP is a lightweight player for IP Video Playback,
- This player is built on top of GStreamer framework and is capable of playing Apple HLS & MPEG DASH contents over IP.
- AAMP supports multiple DRMs such as Microsoft PlayReady, Google WideVine and HLS AES encryption.
- AAMP supports HTML5 video tag based playback and JS bindings based playback for WPE.
- It is capable of playing 4K Video and is supported by Soc.
AAMP as a Player
- Java Script Player or application directly creates AAMP Player Instance
- AAMP manages the GStreamer pipeline
- Audio /Video buffers are pushed to playbin using appsrc
AAMP as a Plugin
- Enables HTML5 based playback
- WebKit manages the GStreamer pipeline
- AAMPs GStreamer plugin ‘Gstaamp’ is loaded in the GStreamer pipeline
- The ‘Gstaamp’ creates AAMP player instance
- Audio /Video buffers are pushed to ‘Gstaamp’s srcpads
AAMP Video Application
Data flow diagram
Adaptive bitrate streaming
- Initial profile bandwidth configurable for 4k and non-4k content
- Steady state network bandwidth estimated from most recent 3 fragment downloads
- ABR manager supports jumping over profiles for big changes in available bandwidth
- For small changes in estimated bandwidth, change must hold over 3+ samples before triggering ramp up/down to avoid thrashing.
AV Synchronization (DASH)
QT demux is instantiated for audio and video fragment collectors in the pipeline. Player feeds pairs of temporally close fragments; they may or may not have the exact same start times, due to different duration cadence. QT demux takes care of time stamping for normal speed MPEG DASH playback, re-stamping PTS as it slices content into smaller segments.To support trickplay using iframe track, a patch in qt demux alters the timestamp base to achieve desired playout frame rate. GstStream Synchronizer is used to synchronize audio and video prior to passing on to audio and video sinks. Broadcom plugins are also involved in maintaining AV sync. In case any problems detected, they are reported back upstream through GStreamer. If PTS errors are detected in succession, player will reset/restart pipeline as a recovery mechanism. If an audio or video fragment is missing (and not recoverable with retry/ramping down) player advances to the next fragment and user will experience brief disruption.
Debugging and Testing
- Interactive standalone command-line application
- Built along with AAMP
- Used to test AAMP player
- http urls can be entered directly to start playback
- command-line application similar to aampcli
- Invokes AAMP in plugin mode
- aamp:// URLs is provided to start playback
- The pipeline diagram is available in the page AAMP.
- For videos, Please see - AAMP and Fog Webinar - Part 1 AAMP and Fog Webinar - Part 2 AAMP and Fog Webinar - Part 3
To know more about SoC/Application level APIs details use in RDK, refer the link AAMP API Documentation