AAMP Events and Logging

Created on June 21, 2022

This page is a work in progress and is not complete!


Events


Event

Description

AAMP_EVENT_TUNED Tune success
AAMP_EVENT_TUNE_FAILED Tune failure
AAMP_EVENT_SPEED_CHANGED Speed changed internally
AAMP_EVENT_EOS End of stream
AAMP_EVENT_PLAYLIST_INDEXED Playlist downloaded and indexed
AAMP_EVENT_PROGRESS Progress event with playback stats. Report interval configurable 
AAMP_EVENT_CC_HANDLE_RECEIVED Sent when video decoder handle retrieved 
AAMP_EVENT_JS_EVENT Generic event generated by JavaScript binding 
AAMP_EVENT_MEDIA_METADATA Meta-data of asset currently playing
AAMP_EVENT_ENTERING_LIVE Event when live point reached
AAMP_EVENT_BITRATE_CHANGED Event when bitrate changes 
AAMP_EVENT_TIMED_METADATA Meta-data of a subscribed tag parsed from manifest
AAMP_EVENT_BULK_TIMED_METADATA Bulk Meta-data of a subscribed tag parsed from manifest
AAMP_EVENT_STATE_CHANGED Event when player state changes 
AAMP_EVENT_SPEEDS_CHANGED Event when supported playback speeds changes 
AAMP_EVENT_SEEKED Event when seek completes
AAMP_EVENT_TUNE_PROFILING Event when micro event data sends
AAMP_EVENT_BUFFERING_CHANGED Event when buffering starts/ends btw a playback
AAMP_EVENT_DURATION_CHANGED Event when duration changed 
AAMP_EVENT_AUDIO_TRACKS_CHANGED Event when available audio tracks changes 
AAMP_EVENT_TEXT_TRACKS_CHANGED Event when available test tracks changes 
AAMP_EVENT_AD_BREAKS_CHANGED Event when content/ad breaks changes 
AAMP_EVENT_AD_STARTED Ad playback started 
AAMP_EVENT_AD_COMPLETED Ad playback completed 
AAMP_EVENT_DRM_METADATA Event with DRM metadata info
AAMP_EVENT_REPORT_ANOMALY Playback Anomaly reporting 
AAMP_EVENT_WEBVTT_CUE_DATA WebVTT Cue data 
AAMP_EVENT_AD_RESOLVED Ad fulfill status 
AAMP_EVENT_AD_RESERVATION_START Adbreak playback starts 
AAMP_EVENT_AD_RESERVATION_END Adbreak playback ends 
AAMP_EVENT_AD_PLACEMENT_START Ad playback starts 
AAMP_EVENT_AD_PLACEMENT_END Ad playback ends 
AAMP_EVENT_AD_PLACEMENT_ERROR Ad playback error 
AAMP_EVENT_AD_PLACEMENT_PROGRESS Ad playback progress 
AAMP_EVENT_REPORT_METRICS_DATA AAMP VideoEnd info reporting 
AAMP_EVENT_ID3_METADATA ID3 metadata from audio stream 
AAMP_EVENT_DRM_MESSAGE Message from the DRM system 
AAMP_EVENT_CONTENT_RESTRICTED Content Restriction status 
AAMP_EVENT_BLOCKED ATSC AV BLOCKED Event


AAMP_EVENT_REPORT_ANOMALY

Curl Related

Host Not Found/Connection Error

This is an example where the host could not be looked up.

evt:n n=0-error, 1-warning, 2-trace
field: CDN or FOG
field: file type MANIFEST, VIDEO, AUDIO, SUBTITLE,AUX-AUDIO, LICENSE, IFRAME, PLAYLIST_VIDEO, PLAYLIST_AUDIO, PlayLIST_SUBTITLE, PLAYLIST_AUX-AUDIO, Unknown
field: Curl-, HTTP-
field: errno (<100 are curl errors, other http response)
field: url

In this case Curl-6 is
CURLE_COULDNT_RESOLVE_HOST (6)
Couldn’t resolve host. The given remote host was not resolved.

Curl-7 would be
CURLE_COULDNT_CONNECT (7)
Failed to connect() to host or proxy.

AAMP could return any appropriate curl error in this event (see https://curl.se/libcurl/c/libcurl-errors.html)

HTTP Response Related

File Not Found

Content not found (404) generates the same event type with the following fields.

Player State

  • Anomaly evt:1 msg:BLOCKED REASON:6

the last digit corresponds to the following.
eAAMP_BITRATE_CHANGE_BY_ABR = 0,
eAAMP_BITRATE_CHANGE_BY_RAMPDOWN = 1,
eAAMP_BITRATE_CHANGE_BY_TUNE = 2,
eAAMP_BITRATE_CHANGE_BY_SEEK = 3,
eAAMP_BITRATE_CHANGE_BY_TRICKPLAY = 4,
eAAMP_BITRATE_CHANGE_BY_BUFFER_FULL = 5,
eAAMP_BITRATE_CHANGE_BY_BUFFER_EMPTY = 6,
eAAMP_BITRATE_CHANGE_BY_FOG_ABR = 7,
eAAMP_BITRATE_CHANGE_MAX = 8

  • Anomaly evt:1 msg:VIDEO Underflow
    field VIDEO or AUDIO
    field PTS ERROR, Underflow, Stall After Discontinuity, GstPipeline Internal Error, STARTTIME RESET

This event is only sent on a retune attempt.

Receiving Events

How does an application connect and receive events?

Logging

Logs that might be useful as events/telemetry.  The following can be pretty printed with html page at ./test/LogParsingUtility/index.html within aamp git repo.

1. IP_EX_TUNETIME:3,0.390,0.000,0.142,0.000,0.000,0.000,0.248,0.000,0.000,0.000,0.000,0.000,1,0.000,1,0.000,1,0.000,1,30,0,1,0,0,3600,1,0.000,30,1,0

contentType

totalTime

networkTime

loadBucketTime

prepareToPlayBucketTime

playBucketTime

drmReadyBucketTime

decodedStreamingBucketTime

playingbackToXREBucketTime

firstManifestTIme

firstProfileTime

firstFragmentTime

firstLicenseTime

maniCount

manifestTotal

profCount

profilesTotal

fragCount

fragmentTotal

isLive

streamType

abrSwitch

isFOGEnabled

isDDPlus

isDemuxed

assetDuration

success

failRetryBucketTime

playbackCount

tuneRetries

tuneCompleteTime

(3)LINEAR0.3900.0000.1420.0000.0000.0000.2480.0000.0000.0000.0000.00010.00010.00010.0001(30)Progressive0100360010.0003010


2. [AAMP-PLAYER]HttpRequestEnd: <Platform>,0,0,18(1),5.0000,4.9995,0.0285,0.0765,0.0003,0.0000,0.0287,0.0000,1.16473e+06,601,http://example.mp4

appName

mediaType

simType

http_code

totalPerformRequest

total

connect

startTransfer

resolve

appConnect

preTransfer

redirect

dlSize

reqSize

url

<Platform>0(0)VIDEO18(1)5.00004.99950.02850.07650.00030.00000.02870.00001.16473e+06601http://example.mp4

3. [AAMP-PLAYER]APP: <Platform> IP_AAMP_TUNETIME:4,0,1587849806787,5,108,0,122,309,0,132,330,0,722,107,0,723,117,0,829,26,0,2037000,841,36,0,0,133,1428,0

version

build

tuneStartBaseUTCMS

ManifestDLStartTime

ManifestDLTotalTime

ManifestDLFailCount

VideoPlaylistDLStartTime

VideoPlaylistDLTotalTime

VideoPlaylistDLFailCount

AudioPlaylistDLStartTime

AudioPlaylistDLTotalTime

AudioPlaylistDLFailCount

VideoInitDLStartTime

VideoInitDLTotalTime

VideoInitDLFailCount

AudioInitDLStartTime

AudioInitDLTotalTime

AudioInitDLFailCount

VideoFragmentDLStartTime

VideoFragmentDLTotalTime

VideoFragmentDLFailCount

VideoBitRate

AudioFragmentDLStartTime

AudioFragmentDLTotalTime

AudioFragmentDLFailCount

AudioBitRate

drmLicenseAcqStartTime

drmLicenseAcqTotalTime

drmFailErrorCode

LicenseAcqPreProcessingDuration

LicenseAcqNetworkDuration

LicenseAcqPostProcDuration

VideoFragmentDecryptDuration

AudioFragmentDecryptDuration

gstPlayStartTime

gstFirstFrameTime

contentType

streamType

firstTune

4015878498067875108012230901323300722107072311708292602037000841360013314280









4. IP_TUNETIME:3,0.3,0.0

contentType

aampTuneTime

totalNetTime

(3)LINEAR0.30.0
Go To Top