Skip to content

Composite media session

Overview

When a stream is transcoding on Transcoder node to play it as ABR, the media session between Transcoder and Edge includes a number of media streams, one per video profile. In this case, the media session is a composite one.

The composite media session was introduced in CDN 2.1. Such session appears in the WCS statistics, logs etc as one pseudo stream, like test-HLS-ABR-STREAM.

Since build 5.3.265 composite media session state, logs and statistics are available via REST API.

The second generation of composite media session

Since build 5.3.425, an improved composite session of the second generation is available:

composite_gen2=true

The main improvement is every media session between Transcoder and Edge nodes, even for single profile, is a composite one.

When composite media session is established, it will be reused for all the possible transcoding cases: a single profile transcoding, a multiple profile HLS ABR or WebRTC ABR. So the viewer can start to play WebRTC stream test-480p on the Edge server, then play HLS ABR including 240p, 480p and 720p profiles, and all those media streams should be in one composite media session.

The parameter composite_gen2 should be set to true both on Transcoder and Edge nodes to enable this behavior.

Composite media session REST API

The REST API details available here

Get the media session data and logs

POST /rest-api/v3/stream_composite/find HTTP/1.1
HOST: localhost:8081
Content-Type: application/json

{
    "name": "test-HLS-ABR-STREAM",
    "offset": 0,
    "size": 50
}
{
    "name": "test-HLS-ABR-STREAM",
    "profiles": [
        "0x240-500 Kbps",
        "0x480-1000 Kbps",
        "0x720-1.5 Mbps",
        "0x1080-2 Mbps"
    ],
    "logs": [
        "2025-12-17T13:25:08.826 WARNING: Profiles out of sync",
        [
            "0x1080-2 Mbps, 0, 0, 0, 0",
            "0x720-1.5 Mbps, 0, 0, 0, 0",
            "0x480-1000 Kbps, 0, 0, 0, 0",
            "0x240-500 Kbps, -7, +0, -234, +0"
        ],
        "2025-12-17T13:25:18.826 WARNING: Track(s) saturation rate is unsatisfactory",
        [
            "(0x1080-2 Mbps) received 922 frames. Expected 1077",
            "(0x240-500 Kbps) received 1187 frames. Expected 1077",
            "(0x480-1000 Kbps) received 1211 frames. Expected 1077"
        ],
        "2025-12-17T13:25:18.827 WARNING: Profiles out of sync",
        ...
    ]
}

Get all the media sessions data and logs

POST /rest-api/v3/stream_composite/find_all HTTP/1.1
HOST: localhost:8081
Content-Type: application/json

{
    "offset": 0,
    "size": 50
}
[
    {
        "name": "test-HLS-ABR-STREAM",
        "profiles": [
            "0x240-500 Kbps",
            "0x480-1000 Kbps",
            "0x720-1.5 Mbps",
            "0x1080-2 Mbps"
        ],
        "logs": [
            "2025-12-17T13:25:08.826 WARNING: Profiles out of sync",
            [
                "0x1080-2 Mbps, 0, 0, 0, 0",
                "0x720-1.5 Mbps, 0, 0, 0, 0",
                "0x480-1000 Kbps, 0, 0, 0, 0",
                "0x240-500 Kbps, -7, +0, -234, +0"
            ],
            "2025-12-17T13:25:18.826 WARNING: Track(s) saturation rate is unsatisfactory",
            [
                "(0x1080-2 Mbps) received 922 frames. Expected 1077",
                "(0x240-500 Kbps) received 1187 frames. Expected 1077",
                "(0x480-1000 Kbps) received 1211 frames. Expected 1077"
            ],
            "2025-12-17T13:25:18.827 WARNING: Profiles out of sync",
            ...
        ]
    },
    ...
]