Skip to main content

Recording a Live Streaming

This guide will walk you through the process of setting up a live stream with automatic recording using the Teyuto API.

Prerequisites

  • A Teyuto account with API access
  • Your API authorization token

Step 1: Create a Live Stream

To create a live stream with recording enabled, you'll use the POST /videos/live endpoint. Here's how to do it:

POST https://api.teyuto.tv/v2/videos/live
Content-Type: application/x-www-form-urlencoded
Authorization: YOUR_API_TOKEN

title=My Recorded Live Stream&description=This is a test live stream with recording&privacy=public&record_video=true

Request Parameters

  • title (required): The title of your live stream
  • description: A description of your live stream
  • privacy: Set to public, private, or hidden
  • record_video: Set to true to enable automatic recording

Response

If successful, you'll receive a response like this:

{
"id": "12345",
"status": "success"
}

The id in the response is your live stream ID, which you'll need for further operations.

Step 2: Configure Your Streaming Software

After creating the live stream, you'll need to configure your streaming software (e.g., OBS, Streamlabs) with the following details:

  1. Stream URL: Retrieve this from your Teyuto dashboard or API
  2. Stream Key: Use the id received in the response from step 1

Step 3: Start Streaming

Once your streaming software is configured, you can start your live stream. The recording will automatically begin when the stream starts.

Step 4: End the Stream

When you end your stream in your broadcasting software, the recording will automatically stop and be processed.

Accessing the Recorded Video

After the stream ends and processing is complete, you can access the recorded video through the Teyuto dashboard or by using the GET /videos/{video_id} API endpoint.

Additional Notes

  • The recorded video will be available in your Teyuto account as a regular video-on-demand (VOD) content.
  • Processing time for the recorded video may vary depending on the length of the stream and current system load.
  • Make sure you have sufficient storage space in your Teyuto account for the recorded video.

By following these steps, you can easily set up a live stream with automatic recording using the Teyuto API. This allows you to capture your live content for later use or distribution.