DistroTV Studio

Getting Started Guide

«

Introduction

Welcome to the DistroTV Studio Getting Started Guide.

DistroTV Studio allows you to ingest existing linear streams from different formats such as HLS, RTMP, and SRT. Once ingested, DistroTV Studio can be used to transcode the input and output these as HLS with extras such as your own ad marker insertions.

The purpose of this document is to provide a complete, hands-on walkthrough for ingesting an existing HLS stream through DistroTV Studio.

In this guide, you will learn how to:

Prerequisites

Before you begin, you should have:

Setting Up the AWS Environment

Creating an S3 Bucket


Edit Bucket Permissions

[ { "AllowedHeaders": [ "*" ], "AllowedMethods": [ "GET", "HEAD" ], "AllowedOrigins": [ "*" ], "ExposeHeaders": [], "MaxAgeSeconds": 3000 } ]

Access Management Setup

Create a New IAM Policy

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:GetObject", "s3:PutObject", "s3:PutObjectAcl", "s3:DeleteObject" ], "Resource": [ "arn:aws:s3:::bucket name", "arn:aws:s3:::bucket name/*" ] } ] }

Create a New Role

Create a Global Conf File

The global conf file is a configuration file which helps point the DistroTV Studio AMI to access the correct public S3 directories for files.

It takes 4 required parameters:

Create Global Conf File

https://docs.distro.tv/samples/restream/globals/global_1.conf

[General] s3_meta=s3://bucket name/meta/ s3_output=s3://bucket name/ s3_transcode=s3://bucket name/transcode/ channel_list=myrestreamchannel

Create globals Folder

Upload Your Global Conf File

Creating S3 Bucket Directories

Create meta Folder

Create transcode Folder

Create content Folder

Create channels Folder

Create schedule Folder

After this chapter, your S3 bucket should have the following structure:

bucket-name/ ├── content/ (Created in Chapter 5) │ ├── globals/ (Created in Chapter 4) │ └── global_1.conf (Uploaded in Chapter 4) │ ├── meta/ (Created in Chapter 5) │ ├── channels/ (Created in Chapter 5) │ └── schedule/ (Created in Chapter 5) │ └── transcode/ (Created in Chapter 5)

Launch a DistroTV Studio Image

globals=s3://bucket name/globals/global_1.conf

Launch Your Channel

[General] stream=your-existing-stream-m3u8 buffer=10 cdd=1 uses3=1 awsparams=--acl public-read --recursive --cache-control max-age=3 download=1

After all chapters, your S3 bucket should have the following structure:

bucket-name/ ├── content/ (Created as per Chapter 5) │ ├── globals/ (Created as per Chapter 4) │ └── global_1.conf (Uploaded as per Chapter 4, referenced by EC2 instances) │ ├── meta/ (Created as per Chapter 5) │ └── channels/ (Created as per Chapter 5) │ └── myrestreamchannel.conf (Uploaded as per Chapter 7) │ ├── strm/ (System generated, implied by Chapter 7) │ └── channels/ (System generated, implied by Chapter 7) │ └── myrestreamchannel/ (System generated, implied by Chapter 7) │ ├── master.m3u8 (System generated, playback URL target in Chapter 7) │ └── *.ts (Video segment files, system generated) │ └── transcode/ (Created as per Chapter 5)