Criar uma sessão ao vivo

Com a API Video Stitcher, você cria uma sessão ao vivo toda vez que inicia a reprodução de uma transmissão ao vivo em que os anúncios são agrupados dinamicamente durante os intervalos. A resposta especifica o URL de reprodução e a configuração da sessão ativa.

Neste documento, descrevemos como criar uma sessão ao vivo. Para ver mais detalhes, consulte a documentação da REST.

Antes de começar

Definir uma sessão ao vivo

Quando você define uma sessão ao vivo, o seguinte campo é obrigatório:

  • liveConfig

Ao definir uma sessão ativa, os campos abaixo são opcionais:

  • adTagMacros
  • manifestOptions

O parâmetro adTagMacros é uma lista de pares de chave-valor para a substituição da macro da tag de anúncio. Para mais detalhes, consulte a seção de macros de tag de anúncio.

O parâmetro manifestOptions especifica quais renderizações de vídeo são geradas no manifesto de vídeo integrado. Ele também oferece suporte à ordenação das renderizações no manifesto de vídeo integrado. Para mais informações, consulte a documentação das opções de manifesto.

Criar uma sessão ao vivo

Para criar uma sessão ao vivo, use o método projects.locations.liveSessions.create.

REST

Antes de usar os dados da solicitação, faça as substituições a seguir:

  • PROJECT_NUMBER: o número do projeto do Google Cloud, localizado no campo Número do projeto na página Configurações do IAM.
  • LOCATION: o local em que a sessão será criada. Use uma das regiões com suporte.
    Mostrar locais
    • us-central1
    • us-east1
    • us-west1
    • asia-east1
    • asia-south1
    • asia-southeast1
    • europe-west1
    • southamerica-east1
  • LIVE_CONFIG_ID: o identificador definido pelo usuário para a configuração ativa

Para enviar a solicitação, expanda uma destas opções:

Você receberá uma resposta JSON semelhante a esta:

{
  "name": "projects/PROJECT_NUMBER/locations/LOCATION/liveSessions/SESSION_ID",
  "playUri": "PLAY_URI",
  "liveConfig": "projects/PROJECT_NUMBER/locations/LOCATION/liveConfigs/LIVE_CONFIG_ID",
}

C#

Antes de testar esta amostra, siga as instruções de configuração de C# no Guia de início rápido da API Video Stitcher usando bibliotecas de cliente. Para saber mais, consulte a documentação de referência da API C# da API Video Stitcher.

Para autenticar a API Video Stitcher, configure o Application Default Credentials. Para mais informações, consulte Configurar a autenticação para um ambiente de desenvolvimento local.


using Google.Cloud.Video.Stitcher.V1;

public class CreateLiveSessionSample
{
    public LiveSession CreateLiveSession(
        string projectId, string location, string liveConfigId)
    {
        // Create the client.
        VideoStitcherServiceClient client = VideoStitcherServiceClient.Create();

        CreateLiveSessionRequest request = new CreateLiveSessionRequest
        {
            Parent = $"projects/{projectId}/locations/{location}",
            LiveSession = new LiveSession
            {
                LiveConfig = LiveConfigName.FormatProjectLocationLiveConfig(projectId, location, liveConfigId)
            }
        };

        // Call the API.
        LiveSession session = client.CreateLiveSession(request);

        // Return the result.
        return session;
    }
}

Go

Antes de testar esta amostra, siga as instruções de configuração do Go no Guia de início rápido da API Video Stitcher usando bibliotecas de cliente. Para saber mais, consulte a documentação de referência da API Go da API Video Stitcher.

Para autenticar a API Video Stitcher, configure o Application Default Credentials. Para mais informações, consulte Configurar a autenticação para um ambiente de desenvolvimento local.

import (
	"context"
	"fmt"
	"io"

	stitcher "cloud.google.com/go/video/stitcher/apiv1"
	"cloud.google.com/go/video/stitcher/apiv1/stitcherpb"
)

// createLiveSession creates a livestream session in which to insert ads.
// Live sessions are ephemeral resources that expire after a few minutes.
func createLiveSession(w io.Writer, projectID, liveConfigID string) error {
	// projectID := "my-project-id"
	// liveConfigID := "my-live-config"
	location := "us-central1"
	ctx := context.Background()
	client, err := stitcher.NewVideoStitcherClient(ctx)
	if err != nil {
		return fmt.Errorf("stitcher.NewVideoStitcherClient: %w", err)
	}
	defer client.Close()

	req := &stitcherpb.CreateLiveSessionRequest{
		Parent: fmt.Sprintf("projects/%s/locations/%s", projectID, location),
		LiveSession: &stitcherpb.LiveSession{
			LiveConfig: fmt.Sprintf("projects/%s/locations/%s/liveConfigs/%s", projectID, location, liveConfigID),
		},
	}
	// Creates the live session.
	response, err := client.CreateLiveSession(ctx, req)
	if err != nil {
		return fmt.Errorf("client.CreateLiveSession: %w", err)
	}

	fmt.Fprintf(w, "Live session: %v\n", response.GetName())
	fmt.Fprintf(w, "Play URI: %v", response.GetPlayUri())
	return nil
}

Java

Antes de testar esta amostra, siga as instruções de configuração do Java no Guia de início rápido da API Video Stitcher usando bibliotecas de cliente. Para saber mais, consulte a documentação de referência da API Java da API Video Stitcher.

Para autenticar a API Video Stitcher, configure o Application Default Credentials. Para mais informações, consulte Configurar a autenticação para um ambiente de desenvolvimento local.


import com.google.cloud.video.stitcher.v1.CreateLiveSessionRequest;
import com.google.cloud.video.stitcher.v1.LiveConfigName;
import com.google.cloud.video.stitcher.v1.LiveSession;
import com.google.cloud.video.stitcher.v1.LocationName;
import com.google.cloud.video.stitcher.v1.VideoStitcherServiceClient;
import java.io.IOException;

public class CreateLiveSession {

  public static void main(String[] args) throws Exception {
    // TODO(developer): Replace these variables before running the sample.
    String projectId = "my-project-id";
    String location = "us-central1";
    String liveConfigId = "my-live-config-id";

    createLiveSession(projectId, location, liveConfigId);
  }

  public static void createLiveSession(String projectId, String location, String liveConfigId)
      throws IOException {
    // Initialize client that will be used to send requests. This client only needs to be created
    // once, and can be reused for multiple requests. In this example, try-with-resources is used
    // which automatically calls close() on the client to clean up resources.
    try (VideoStitcherServiceClient videoStitcherServiceClient =
        VideoStitcherServiceClient.create()) {
      CreateLiveSessionRequest createLiveSessionRequest =
          CreateLiveSessionRequest.newBuilder()
              .setParent(LocationName.of(projectId, location).toString())
              .setLiveSession(
                  LiveSession.newBuilder()
                      .setLiveConfig(LiveConfigName.format(projectId, location, liveConfigId)))
              .build();

      LiveSession response = videoStitcherServiceClient.createLiveSession(createLiveSessionRequest);
      System.out.println("Created live session: " + response.getName());
      System.out.println("Play URI: " + response.getPlayUri());
    }
  }
}

Node.js

Antes de testar esta amostra, siga as instruções de configuração do Node.js no Guia de início rápido da API Video Stitcher usando bibliotecas de cliente. Para saber mais, consulte a documentação de referência da API Node.js da API Video Stitcher.

Para autenticar a API Video Stitcher, configure o Application Default Credentials. Para mais informações, consulte Configurar a autenticação para um ambiente de desenvolvimento local.

/**
 * TODO(developer): Uncomment these variables before running the sample.
 */
// projectId = 'my-project-id';
// location = 'us-central1';
// liveConfigId = 'my-live-config-id';

// Imports the Video Stitcher library
const {VideoStitcherServiceClient} =
  require('@google-cloud/video-stitcher').v1;
// Instantiates a client
const stitcherClient = new VideoStitcherServiceClient();

async function createLiveSession() {
  // Construct request
  const request = {
    parent: stitcherClient.locationPath(projectId, location),
    liveSession: {
      liveConfig: stitcherClient.liveConfigPath(
        projectId,
        location,
        liveConfigId
      ),
    },
  };

  const [session] = await stitcherClient.createLiveSession(request);
  console.log(`Live session: ${session.name}`);
  console.log(`Play URI: ${session.playUri}`);
}

createLiveSession();

PHP

Antes de testar esta amostra, siga as instruções de configuração do PHP no Guia de início rápido da API Video Stitcher usando bibliotecas de cliente. Para saber mais, consulte a documentação de referência da API PHP da API Video Stitcher.

Para autenticar a API Video Stitcher, configure o Application Default Credentials. Para mais informações, consulte Configurar a autenticação para um ambiente de desenvolvimento local.

use Google\Cloud\Video\Stitcher\V1\Client\VideoStitcherServiceClient;
use Google\Cloud\Video\Stitcher\V1\CreateLiveSessionRequest;
use Google\Cloud\Video\Stitcher\V1\LiveSession;

/**
 * Creates a live session. Live sessions are ephemeral resources that expire
 * after a few minutes.
 *
 * @param string $callingProjectId     The project ID to run the API call under
 * @param string $location             The location of the session
 * @param string $liveConfigId         The live config ID to use to create the
 *                                     live session
 */
function create_live_session(
    string $callingProjectId,
    string $location,
    string $liveConfigId
): void {
    // Instantiate a client.
    $stitcherClient = new VideoStitcherServiceClient();

    $parent = $stitcherClient->locationName($callingProjectId, $location);
    $liveConfig = $stitcherClient->liveConfigName($callingProjectId, $location, $liveConfigId);
    $liveSession = new LiveSession();
    $liveSession->setLiveConfig($liveConfig);

    // Run live session creation request
    $request = (new CreateLiveSessionRequest())
        ->setParent($parent)
        ->setLiveSession($liveSession);
    $response = $stitcherClient->createLiveSession($request);

    // Print results
    printf('Live session: %s' . PHP_EOL, $response->getName());
}

Python

Antes de testar esta amostra, siga as instruções de configuração de Python no Guia de início rápido da API Video Stitcher usando bibliotecas de cliente. Para saber mais, consulte a documentação de referência da API Python da API Video Stitcher.

Para autenticar a API Video Stitcher, configure o Application Default Credentials. Para mais informações, consulte Configurar a autenticação para um ambiente de desenvolvimento local.


import argparse

from google.cloud.video import stitcher_v1
from google.cloud.video.stitcher_v1.services.video_stitcher_service import (
    VideoStitcherServiceClient,
)

def create_live_session(
    project_id: str, location: str, live_config_id: str
) -> stitcher_v1.types.LiveSession:
    """Creates a live session. Live sessions are ephemeral resources that expire
    after a few minutes.
    Args:
        project_id: The GCP project ID.
        location: The location in which to create the session.
        live_config_id: The user-defined live config ID.

    Returns:
        The live session resource.
    """

    client = VideoStitcherServiceClient()

    parent = f"projects/{project_id}/locations/{location}"
    live_config = (
        f"projects/{project_id}/locations/{location}/liveConfigs/{live_config_id}"
    )

    live_session = stitcher_v1.types.LiveSession(live_config=live_config)

    response = client.create_live_session(parent=parent, live_session=live_session)
    print(f"Live session: {response.name}")
    return response

Ruby

Antes de testar esta amostra, siga as instruções de configuração do Ruby no Guia de início rápido da API Video Stitcher usando bibliotecas de cliente. Para saber mais, consulte a documentação de referência da API Ruby da API Video Stitcher.

Para autenticar a API Video Stitcher, configure o Application Default Credentials. Para mais informações, consulte Configurar a autenticação para um ambiente de desenvolvimento local.

require "google/cloud/video/stitcher"

##
# Create a live stream session. Live sessions are ephemeral resources
# that expire after a few minutes.
#
# @param project_id [String] Your Google Cloud project (e.g. "my-project")
# @param location [String] The location (e.g. "us-central1")
# @param live_config_id [String] Your live config name (e.g. "my-live-config")
#
def create_live_session project_id:, location:, live_config_id:
  # Create a Video Stitcher client.
  client = Google::Cloud::Video::Stitcher.video_stitcher_service

  # Build the resource name of the parent.
  parent = client.location_path project: project_id, location: location

  # Build the resource name of the live config.
  live_config_name = client.live_config_path project: project_id,
                                             location: location,
                                             live_config: live_config_id

  # Set the session fields.
  new_live_session = {
    live_config: live_config_name
  }

  response = client.create_live_session parent: parent,
                                        live_session: new_live_session

  # Print the live session name.
  puts "Live session: #{response.name}"
end

A API Video Stitcher gera um ID de sessão exclusivo para cada solicitação. Uma sessão expira quando o playUri não é solicitado nos últimos 5 minutos.

Um anúncio precisa ser codificado antes de ser incluído em uma sessão ao vivo. Quando você cria uma sessão para um vídeo com anúncios, a API Video Stitcher determina se o anúncio já foi codificado em uma sessão anterior. A API procura apenas anúncios codificados criados pelas sessões associadas ao seu projeto do Google Cloud. Para mais informações sobre esse processo, consulte a Visão geral.

A resposta é um objeto de sessão ativa. O playUri é o URL que o dispositivo cliente usa para reproduzir o stream agrupado com anúncios para essa sessão ao vivo.

Se você estiver gerando uma sessão em nome dos dispositivos dos seus clientes, poderá definir os seguintes parâmetros usando cabeçalhos HTTP:

Parâmetro Cabeçalho HTTP
CLIENT_IP x-forwarded-for
REFERRER_URL referer
USER_AGENT user-agent

É possível adicionar os seguintes cabeçalhos à solicitação curl anterior:

-H "x-forwarded-for: CLIENT_IP" \
-H "referer: REFERRER_URL" \
-H "user-agent: USER_AGENT" \

Se o cabeçalho x-forwarded-for não for fornecido, a API Video Stitcher vai usar o endereço IP do cliente nas solicitações de metadados do anúncio. O endereço IP do cliente pode não corresponder ao IP dos dispositivos dos clientes se as sessões forem geradas em nome desses dispositivos.

Macros de tags de anúncio

Uma tag de anúncio pode conter macros, que produzem uma tag de anúncio diferente para cada sessão. As macros são indicadas por colchetes na tag de anúncio, conforme ilustrado pelo exemplo a seguir:

AD_TAG_URI&macro=[value]

O adTagUri é definido na configuração ao vivo.

Para substituir o valor na macro da tag de anúncio, forneça um mapeamento no campo adTagMacros. Por exemplo, se você quiser substituir a macro [value] pela string bar, será necessário fornecer o seguinte:

{
  ...
  "adTagMacros": {
    "value": "bar"
  },
  ...
}

Quando a API Video Stitcher solicita os metadados do anúncio, ela usa a seguinte tag de anúncio:

AD_TAG_URI&macro=bar

Acessar uma sessão

Para acessar a sessão ao vivo, use o método projects.locations.liveSessions.get.

REST

Antes de usar os dados da solicitação, faça as substituições a seguir:

  • PROJECT_NUMBER: o número do projeto do Google Cloud, localizado no campo Número do projeto na página Configurações do IAM.
  • LOCATION: o local em que a sessão será criada. Use uma das regiões com suporte.
    Mostrar locais
    • us-central1
    • us-east1
    • us-west1
    • asia-east1
    • asia-south1
    • asia-southeast1
    • europe-west1
    • southamerica-east1
  • SESSION_ID: o identificador da sessão ao vivo.

Para enviar a solicitação, expanda uma destas opções:

Você receberá uma resposta JSON semelhante a esta:

{
  "name": "projects/PROJECT_NUMBER/locations/LOCATION/liveSessions/SESSION_ID",
  "playUri": "ad-stitched-live-stream-uri",
  "liveConfig": "projects/PROJECT_NUMBER/locations/LOCATION/liveConfigs/LIVE_CONFIG_ID",
}

C#

Antes de testar esta amostra, siga as instruções de configuração de C# no Guia de início rápido da API Video Stitcher usando bibliotecas de cliente. Para saber mais, consulte a documentação de referência da API C# da API Video Stitcher.

Para autenticar a API Video Stitcher, configure o Application Default Credentials. Para mais informações, consulte Configurar a autenticação para um ambiente de desenvolvimento local.


using Google.Cloud.Video.Stitcher.V1;

public class GetLiveSessionSample
{
    public LiveSession GetLiveSession(
        string projectId, string location, string sessionId)
    {
        // Create the client.
        VideoStitcherServiceClient client = VideoStitcherServiceClient.Create();

        GetLiveSessionRequest request = new GetLiveSessionRequest
        {
            LiveSessionName = LiveSessionName.FromProjectLocationLiveSession(projectId, location, sessionId)
        };

        // Call the API.
        LiveSession session = client.GetLiveSession(request);

        // Return the result.
        return session;
    }
}

Go

Antes de testar esta amostra, siga as instruções de configuração de Go no Guia de início rápido da API Video Stitcher usando bibliotecas de cliente. Para saber mais, consulte a documentação de referência da API Go da API Video Stitcher.

Para autenticar a API Video Stitcher, configure o Application Default Credentials. Para mais informações, consulte Configurar a autenticação para um ambiente de desenvolvimento local.

import (
	"context"
	"fmt"
	"io"

	stitcher "cloud.google.com/go/video/stitcher/apiv1"
	"cloud.google.com/go/video/stitcher/apiv1/stitcherpb"
)

// getLiveSession gets a livestream session by ID.
func getLiveSession(w io.Writer, projectID, sessionID string) error {
	// projectID := "my-project-id"
	// sessionID := "123-456-789"
	location := "us-central1"
	ctx := context.Background()
	client, err := stitcher.NewVideoStitcherClient(ctx)
	if err != nil {
		return fmt.Errorf("stitcher.NewVideoStitcherClient: %w", err)
	}
	defer client.Close()

	req := &stitcherpb.GetLiveSessionRequest{
		Name: fmt.Sprintf("projects/%s/locations/%s/liveSessions/%s", projectID, location, sessionID),
	}
	// Gets the session.
	response, err := client.GetLiveSession(ctx, req)
	if err != nil {
		return fmt.Errorf("client.GetLiveSession: %w", err)
	}

	fmt.Fprintf(w, "Live session: %+v", response)
	return nil
}

Java

Antes de testar esta amostra, siga as instruções de configuração de Java no Guia de início rápido da API Video Stitcher usando bibliotecas de cliente. Para saber mais, consulte a documentação de referência da API Java da API Video Stitcher.

Para autenticar a API Video Stitcher, configure o Application Default Credentials. Para mais informações, consulte Configurar a autenticação para um ambiente de desenvolvimento local.


import com.google.cloud.video.stitcher.v1.GetLiveSessionRequest;
import com.google.cloud.video.stitcher.v1.LiveSession;
import com.google.cloud.video.stitcher.v1.LiveSessionName;
import com.google.cloud.video.stitcher.v1.VideoStitcherServiceClient;
import java.io.IOException;

public class GetLiveSession {

  public static void main(String[] args) throws Exception {
    // TODO(developer): Replace these variables before running the sample.
    String projectId = "my-project-id";
    String location = "us-central1";
    String sessionId = "my-session-id";

    getLiveSession(projectId, location, sessionId);
  }

  public static void getLiveSession(String projectId, String location, String sessionId)
      throws IOException {
    // Initialize client that will be used to send requests. This client only needs to be created
    // once, and can be reused for multiple requests. In this example, try-with-resources is used
    // which automatically calls close() on the client to clean up resources.
    try (VideoStitcherServiceClient videoStitcherServiceClient =
        VideoStitcherServiceClient.create()) {
      GetLiveSessionRequest getLiveSessionRequest =
          GetLiveSessionRequest.newBuilder()
              .setName(LiveSessionName.of(projectId, location, sessionId).toString())
              .build();

      LiveSession response = videoStitcherServiceClient.getLiveSession(getLiveSessionRequest);
      System.out.println("Live session: " + response.getName());
    }
  }
}

Node.js

Antes de testar esta amostra, siga as instruções de configuração de Node.js no Guia de início rápido da API Video Stitcher usando bibliotecas de cliente. Para saber mais, consulte a documentação de referência da API Node.js da API Video Stitcher.

Para autenticar a API Video Stitcher, configure o Application Default Credentials. Para mais informações, consulte Configurar a autenticação para um ambiente de desenvolvimento local.

/**
 * TODO(developer): Uncomment these variables before running the sample.
 */
// projectId = 'my-project-id';
// location = 'us-central1';
// sessionId = 'my-session-id';

// Imports the Video Stitcher library
const {VideoStitcherServiceClient} =
  require('@google-cloud/video-stitcher').v1;
// Instantiates a client
const stitcherClient = new VideoStitcherServiceClient();

async function getLiveSession() {
  // Construct request
  const request = {
    name: stitcherClient.liveSessionPath(projectId, location, sessionId),
  };
  const [session] = await stitcherClient.getLiveSession(request);
  console.log(`Live session: ${session.name}`);
}

getLiveSession();

PHP

Antes de testar esta amostra, siga as instruções de configuração de PHP no Guia de início rápido da API Video Stitcher usando bibliotecas de cliente. Para saber mais, consulte a documentação de referência da API PHP da API Video Stitcher.

Para autenticar a API Video Stitcher, configure o Application Default Credentials. Para mais informações, consulte Configurar a autenticação para um ambiente de desenvolvimento local.

use Google\Cloud\Video\Stitcher\V1\Client\VideoStitcherServiceClient;
use Google\Cloud\Video\Stitcher\V1\GetLiveSessionRequest;

/**
 * Gets a live session.
 *
 * @param string $callingProjectId     The project ID to run the API call under
 * @param string $location             The location of the session
 * @param string $sessionId            The ID of the session
 */
function get_live_session(
    string $callingProjectId,
    string $location,
    string $sessionId
): void {
    // Instantiate a client.
    $stitcherClient = new VideoStitcherServiceClient();

    $formattedName = $stitcherClient->liveSessionName($callingProjectId, $location, $sessionId);
    $request = (new GetLiveSessionRequest())
        ->setName($formattedName);
    $session = $stitcherClient->getLiveSession($request);

    // Print results
    printf('Live session: %s' . PHP_EOL, $session->getName());
}

Python

Antes de testar esta amostra, siga as instruções de configuração de Python no Guia de início rápido da API Video Stitcher usando bibliotecas de cliente. Para saber mais, consulte a documentação de referência da API Python da API Video Stitcher.

Para autenticar a API Video Stitcher, configure o Application Default Credentials. Para mais informações, consulte Configurar a autenticação para um ambiente de desenvolvimento local.


import argparse

from google.cloud.video import stitcher_v1
from google.cloud.video.stitcher_v1.services.video_stitcher_service import (
    VideoStitcherServiceClient,
)

def get_live_session(
    project_id: str, location: str, session_id: str
) -> stitcher_v1.types.LiveSession:
    """Gets a live session. Live sessions are ephemeral resources that expire
    after a few minutes.
    Args:
        project_id: The GCP project ID.
        location: The location of the session.
        session_id: The ID of the live session.

    Returns:
        The live session resource.
    """

    client = VideoStitcherServiceClient()

    name = client.live_session_path(project_id, location, session_id)
    response = client.get_live_session(name=name)
    print(f"Live session: {response.name}")
    return response

Ruby

Antes de testar esta amostra, siga as instruções de configuração de Ruby no Guia de início rápido da API Video Stitcher usando bibliotecas de cliente. Para saber mais, consulte a documentação de referência da API Ruby da API Video Stitcher.

Para autenticar a API Video Stitcher, configure o Application Default Credentials. Para mais informações, consulte Configurar a autenticação para um ambiente de desenvolvimento local.

require "google/cloud/video/stitcher"

##
# Get a live session. Live sessions are ephemeral resources
# that expire after a few minutes.
#
# @param project_id [String] Your Google Cloud project (e.g. "my-project")
# @param location [String] The location (e.g. "us-central1")
# @param session_id [String] The live session ID (e.g. "my-live-session-id")
#
def get_live_session project_id:, location:, session_id:
  # Create a Video Stitcher client.
  client = Google::Cloud::Video::Stitcher.video_stitcher_service

  # Build the resource name of the live session.
  name = client.live_session_path project: project_id, location: location,
                                  live_session: session_id

  # Get the live session.
  session = client.get_live_session name: name

  # Print the live session name.
  puts "Live session: #{session.name}"
end

Exemplo de playlist agrupada por anúncios

Confira a seguir um exemplo de playlist ao vivo de origem antes da união do anúncio:

#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:4
#EXT-X-MEDIA-SEQUENCE:5
#EXTINF:10.010
segment_00005.ts
#EXTINF:10.010
segment_00006.ts
#EXT-X-DATERANGE:ID="2415919105",START-DATE="2021-06-22T08:32:00Z",DURATION=60,SCTE35-OUT=0xF...
#EXTINF:10.010
segment_00007.ts
#EXTINF:10.010
segment_00008.ts
#EXT-X-DATERANGE:ID="2415919105",START-DATE="2021-06-22T08:39:20Z",SCTE35-IN=0xF...
#EXTINF:10.010
segment_00009.ts

Confira a seguir um exemplo de playlist ao vivo de origem após a união do anúncio:

#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:4
#EXT-X-MEDIA-SEQUENCE:5
#EXTINF:10.010
segment_00005.ts
#EXTINF:10.010
segment_00006.ts
#EXT-X-DISCONTINUITY
#EXTINF:6.000
https://ads.us-west1.cdn.videostitcher.goog/ad-1/seg-1.ts
#EXTINF:5.000
https://ads.us-west1.cdn.videostitcher.goog/ad-1/seg-2.ts
#EXT-X-DISCONTINUITY
#EXTINF:6.000
https://ads.us-west1.cdn.videostitcher.goog/ad-2/seg-1.ts
#EXTINF:5.000
https://ads.us-west1.cdn.videostitcher.goog/ad-2/seg-2.ts
#EXT-X-DISCONTINUITY
#EXTINF:10.010
segment_00009.ts