Skip to content

Commit

Permalink
1st draft tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunter Hillman committed Dec 16, 2024
1 parent a8954df commit 7baa96f
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 37 deletions.
Binary file added apps/docs/images/actions-stream.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/docs/images/create-stream.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/docs/images/sidebar-stream.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions apps/docs/knowledge-base/tutorials/create-a-stream.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: Create an AI-powered Stream
description: 'How to create a stream that uses a Livepeer Pipeline'
icon: 'video'
---


## Step 1: Navigate to the Streams page
Navigate to the [Streams page](https://pipelines.livepeer.org/streams/my-streams) or click the "Create Stream" quick link in the sidebar.

<img alt="streams nav" classname="block" src="/images/sidebar-stream.png" />

## Step 2: Select a pipeline
Search for your desired pipeline. You can browse all pipelines on the [Explore page](https://pipelines.livepeer.org/explore).

## Step 3: Name your stream and define the output

Once you've selected your desired pipeline, give your stream a name and specify the URL where you'd like to push the output. We've also created tutorials for setting up push to [Twitch](/knowledge-base/tutorials/stream-to-twitch), [Youtube](/knowledge-base/tutorials/stream-to-youtube), and [X](/knowledge-base/tutorials/stream-to-x).

<img alt="streams create" classname="block" src="/images/create-stream.png" />


## Step 4: Copy your stream key and start streaming from OBS

Please see our OBS guide [here](/knowledge-base/tutorials/stream-into-pipeline-obs).

## Step 5: Tweak stream parameters and observe updates

You can access stream parameters through the settings popup.

<img alt="streams nav" classname="block" src="/images/actions-stream.png" />
54 changes: 18 additions & 36 deletions apps/docs/knowledge-base/tutorials/stream-into-pipeline-obs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,10 @@ icon: 'video'
Before you begin, you'll need:

* [OBS Studio](https://obsproject.com/) installed on your computer
* A Pipeline ID (find one in the [Pipelines application](https://pipelines.livepeer.org))
* [A stream created](/create-a-stream.mdx)

* A Livepeer API key

* A pipeline ID (find one in the [Pipelines application](https://showcase.livepeer.stuorgio))

## Step 1: Create a stream

First, create a stream that uses your chosen pipeline. Using your preferred language:

```javascript
const livepeer = new LivepeerClient({
apiKey: 'your-api-key'
});

const stream = await livepeer.Stream.create({
name: 'My AI Stream',
pipeline: {
id: 'anime-style-transfer',
params: {
styleIntensity: 0.8
}
}
});

// Save these values
console.log({
streamKey: stream.streamKey,
rtmpIngestUrl: stream.rtmpIngestUrl,
playbackUrl: stream.playbackUrl
});
```

## Step 2: Configure OBS
## Step 1: Configure OBS

1. Open OBS Studio

Expand All @@ -49,7 +20,7 @@ console.log({

* For screen capture: Select "Display Capture"

## Step 3: Set up streaming settings
## Step 2: Set up streaming settings

1. Click "Settings" → "Stream"

Expand All @@ -61,6 +32,19 @@ console.log({

5. Click "Apply"

## Step 3 (optional): Add an Audio delay

1. In the Audio Mixer panel (at the bottom of the OBS interface), locate the audio source you want to adjust. This might be your microphone, desktop audio, or another audio input.

2. Click the gear icon next to the audio source in the Audio Mixer.

3. From the dropdown menu, select Filters.

4. In the Filters window, click the + button at the bottom-left corner and select Audio Delay (Sync Offset) from the list of available filters.

5. A new filter will appear in the list. Set the delay in milliseconds (ms) - positive values delay the audio. Start with a small delay, such as 200ms, and adjust incrementally until the audio and video are synchronized on the distribution platform.


## Step 4: Start streaming

1. Click "Start Streaming" in OBS
Expand All @@ -79,8 +63,6 @@ console.log({

## Next steps

* [Update pipeline parameters in real-time](https://pipelines.livepeer.org/api-reference)

* [Distribute your stream with Livepeer Studio](https://livepeer.studio)
* [Update pipeline parameters in real-time](https://pipelines.livepeer.org/streams/my-streams)

Need help? Join our [Discord](https://discord.gg/livepeer) or contact support at [[email protected]](mailto:[email protected])
29 changes: 28 additions & 1 deletion apps/docs/knowledge-base/tutorials/stream-to-twitch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,31 @@
title: Stream to Twitch using a Livepeer Pipeline
description: ''
icon: 'twitch'
---
---

## Prerequisites
* Follow the steps in the [Create Stream tutorial](/knowledge-base/tutorials/create-a-stream) to create a new stream


## Step 1: Access Twitch Inspector
Go to the [Twitch Inspector website](https://inspector.twitch.tv) and log in with your Twitch account credentials.

## Step 2: Prepare Your Stream
* In a new tab, go to your Twitch Creator Dashboard.
* Navigate to Settings > Stream to find your Stream Key and RTMP ingest URL
* Copy the RTMP URL & Stream Key, append `?bandwidthtest=true` to the end, and paste the full URL into the "Destination URL" field of your stream on Livepeer.

## Step 3: Start a Stream Test
* In Twitch Inspector, click the Run a Stream Test button.

## Step 4: Stream and Monitor
[Start streaming with OBS](/knowledge-base/tutorials/stream-into-pipeline-OBS). Twitch Inspector will begin receiving your stream data.

In Twitch Inspector, confirm that the stream output is what you expect. You can also use this to preview changes to pipeline parameters.

##Step 5: Final Check & Real Stream
Once your stream test looks stable in Twitch Inspector:

* Stop the stream in OBS
* In Livepeer, remove `?bandwidthtest=true` from the Stream Key.
* Start your actual live stream
1 change: 1 addition & 0 deletions apps/docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
{
"group": "Streamer Tutorials",
"pages": [
"knowledge-base/tutorials/create-a-stream",
"knowledge-base/tutorials/stream-into-pipeline-obs",
"knowledge-base/tutorials/stream-to-twitch",
"knowledge-base/tutorials/stream-to-youtube",
Expand Down

0 comments on commit 7baa96f

Please sign in to comment.