Metadata

Metadata for the current track are sent using SET_PARAMETER requests. This allows the Apple TV to show the track name, artist, album, cover artwork and timeline. The RTP-Info header contains a rtptime parameter with the RTP timestamp corresponding to the time from which the metadata is valid.

mdbitdescription
017text
115artwork
216progress
50bplist

Track Informations

Informations about the current track are sent in the [DAAP] format, with application/x-dmap-tagged content type.

The following DAAP attributes are displayed on Apple TV:

attributesdescription
dmap.itemnametrack name
daap.songartistartist
daap.songalbumalbum

Example: send track informations

client → server

SET_PARAMETER rtsp://fe80::217:f2ff:fe0f:e0f6/3413821438 RTSP/1.0
CSeq: 8
Session: 1
Content-Type: application/x-dmap-tagged
Content-Length: 3242
RTP-Info: rtptime=1146549156
User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
Client-Instance: 56B29BB6CB904862
DACP-ID: 56B29BB6CB904862
Active-Remote: 1986535575

<DMAP DATA>

server → client

RTSP/1.0 200 OK
Server: AirTunes/130.14
CSeq: 8

Cover Artwork

Artworks are sent as JPEG pictures, with image/jpeg content type.

Example: send cover artwork

client → server

SET_PARAMETER rtsp://fe80::217:f2ff:fe0f:e0f6/3413821438 RTSP/1.0
CSeq: 9
Session: 1
Content-Type: image/jpeg
Content-Length: 34616
RTP-Info: rtptime=1146549156
User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
Client-Instance: 56B29BB6CB904862
DACP-ID: 56B29BB6CB904862
Active-Remote: 1986535575

<JPEG DATA>

server → client

RTSP/1.0 200 OK
Server: AirTunes/130.14
CSeq: 9

Playback Progress

Playback progress is sent as text/parameters, with a progress parameter representing three absolute RTP timestamps values: start / curr / end.

timestampdescription
startbeginning of the current track
currcurrent playback position
endend of the current track

The relative position and track duration can be computed as follows:

  • position = rtptime_to_sec(curr - start)
  • duration = rtptime_to_sec(end - start)

Example: send playback progress

client → server

SET_PARAMETER rtsp://fe80::217:f2ff:fe0f:e0f6/3413821438 RTSP/1.0
CSeq: 10
Session: 1
Content-Type: text/parameters
Content-Length: 44
User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3)
AppleWebKit/535.18.5
Client-Instance: 56B29BB6CB904862
DACP-ID: 56B29BB6CB904862
Active-Remote: 1986535575

progress: 1146221540/1146549156/1195701740

server → client

RTSP/1.0 200 OK
Server: AirTunes/130.14
CSeq: 10