# Getting Started on AWS

## Subscribe to OvenMediaEngine Enterprise

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/5oR70FeUb5uicOhROrHC/image.png" alt=""><figcaption></figcaption></figure>

1. Please sign in to [AWS Marketplace](https://aws.amazon.com/marketplace).
2. Search for <mark style="color:yellow;">**OvenMediaEngine Enterprise**</mark>, then open the product page and review the details.
3. To proceed, click <mark style="color:yellow;">\[View purchase options]</mark> and accept the terms and subscription offer.
4. Once confirmed, click <mark style="color:yellow;">\[Subscribe]</mark> to complete your subscription.
   * After subscribing, you can deploy and run OvenMediaEngine Enterprise on Amazon EC2. For detailed instructions, please refer to the [AWS Buyer's Guide](https://docs.aws.amazon.com/marketplace/latest/buyerguide/buyer-getting-started.html).

## Access to OvenMediaEngine Enterprise

{% stepper %}
{% step %}

### Launch an EC2 instance <a href="#launch-an-ec2-instance" id="launch-an-ec2-instance"></a>

5. After deciding on your subscription, click the <mark style="color:yellow;">\[Launch Software]</mark> button displayed shortly after to enter the EC2 Instance configuration page.
   * If the <mark style="color:yellow;">\[Launch Software]</mark> button does not appear even after waiting, you can go directly to the page where you can launch the instance by clicking <mark style="color:yellow;">\[AWS Marketplace Software]</mark> (or \[Manage Subscriptions]) in the [AWS Console Home](https://console.aws.amazon.com) or [AWS Marketplace](https://aws.amazon.com/marketplace).

{% hint style="success" %}

1. OvenMediaEngine Enterprise can run on various EC2 instance types, but we recommend <mark style="color:yellow;">`c5.xlarge`</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">or larger</mark>.
2. For the Security group, we recommend selecting the <mark style="color:yellow;">\[Vendor-recommended security group]</mark> so that a Security group including the required ports is created automatically.
   {% endhint %}

#### \[Option A]  If you select “**Launch from EC2 Console**” <a href="#launch-from-ec2-console" id="launch-from-ec2-console"></a>

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/PiJHvqz7P44AoDvVXrhr/image.png" alt=""><figcaption></figcaption></figure>

2. On the \[Setup] page, if you selected <mark style="color:yellow;">\[Launch from EC2 Console]</mark> as the Launch method, click <mark style="color:$primary;">**\[Launch from EC2]**</mark> under \[Launch] to configure the instance details.

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/umuBax4SAqW4taVv8zN5/image.png" alt=""><figcaption></figcaption></figure>

3. While configuring the instance, check in the <mark style="color:yellow;">\[Network settings]</mark> section that the <mark style="color:$primary;">**\[Vendor-recommended security group]**</mark> is applied as shown above, then complete the remaining settings.
4. Then click <mark style="color:yellow;">\[Launch instance]</mark> on the right to create and run the instance.

{% hint style="info" %}
For details on the ports included in the <mark style="color:yellow;">\[Vendor-recommended security group]</mark>, please refer to the [Inbound Security Group Rules](https://ovenmediaengine-enterprise.gitbook.io/guide/exclusive/aws-marketplace/getting-started-on-aws/inbound-security-group-rules) guide.
{% endhint %}

***

#### \[Option B] If you select “**One-click launch from AWS Marketplace**” <a href="#one-click-launch-from-aws-marketplace" id="one-click-launch-from-aws-marketplace"></a>

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/zMlZ5QzbHonLRgKVYN58/image.png" alt=""><figcaption></figcaption></figure>

2. On the **\[**&#x53;etup] page, if you selected <mark style="color:yellow;">\[One-click launch from AWS Marketplace]</mark> as the launch method, complete the detailed settings for each item as needed.

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/a6M8C7wHXbLxHhA8VaKl/image.png" alt=""><figcaption></figcaption></figure>

3. In the \[Security group] section, click <mark style="color:yellow;">\[Create security group]</mark>. After reviewing the <mark style="color:$primary;">**\[Vendor-recommended security group]**</mark> creation details, create the security group.
4. Then click <mark style="color:yellow;">\[Launch]</mark> (or \[One-click launch]) at the bottom to create and run the instance.

{% hint style="info" %}
For details on the ports included in the <mark style="color:yellow;">\[Vendor-recommended security group]</mark>, please refer to the [Inbound Security Group Rules](https://ovenmediaengine-enterprise.gitbook.io/guide/exclusive/aws-marketplace/getting-started-on-aws/inbound-security-group-rules) guide.
{% endhint %}
{% endstep %}

{% step %}

### Check required instance information <a href="#check-required-instance-information" id="check-required-instance-information"></a>

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/UAfe3Gnh5cHdjCWxlay3/image.png" alt=""><figcaption></figcaption></figure>

5. Once the instance is <mark style="color:$success;">Running</mark>, open the EC2 dashboard and note the following:
   * Public IPv4 Address (e.g., `54.x.x.x`)
   * Instance ID (e.g., `i-0abcdef1234567890`)
     {% endstep %}

{% step %}

### Connect to the Web Console and sign in <a href="#connect-to-the-web-console-and-sign-in" id="connect-to-the-web-console-and-sign-in"></a>

6. Open the OvenMediaEngine Enterprise Web Console in your browser using the following:
   * <mark style="color:$primary;">**`http://`**</mark>`{Public IPv4 Address}:`<mark style="color:$primary;">**`8080`**</mark>

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/OZH4phU19cUQRfzTAGgu/image.png" alt=""><figcaption></figcaption></figure>

7. In the <mark style="color:yellow;">Password</mark> field, enter your <mark style="color:$primary;">**Instance ID**</mark>, then sign in.

{% hint style="info" %}
When you launch the Web Console, if you see a loading page such as *<mark style="color:yellow;">"Waiting for launching OvenMediaEngine Web Console,"</mark>* your instance is still booting. Please wait a moment.
{% endhint %}
{% endstep %}
{% endstepper %}

## Post-Setup Verification for OvenMediaEngine Enterprise

In this example, we used OBS Studio, one of the most widely used live encoder software tools, along with the RTMP protocol.

{% stepper %}
{% step %}

### Streaming with a Live Encoder (OBS Studio) <a href="#streaming-with-a-live-encoder" id="streaming-with-a-live-encoder"></a>

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/PsqkS2x55dv7yxeVjp30/image.png" alt=""><figcaption></figcaption></figure>

1. Launch Open Broadcaster Software (OBS) Studio.
   * If OBS Studio is not installed, download and install it from: <https://obsproject.com/download>
2. Add or select the media source you want to stream (e.g., Media Source, Camera, Screen Capture, or more).
3. Click <mark style="color:yellow;">\[Settings]</mark> in the lower-right corner of OBS.
   {% endstep %}

{% step %}

### Configure the Stream destination in OBS <a href="#configure-the-stream-destination-in-obs" id="configure-the-stream-destination-in-obs"></a>

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/HZr98FLX7rWTc4gWAnAb/image.png" alt=""><figcaption></figcaption></figure>

4. In the Settings window, select the <mark style="color:yellow;">\[Stream]</mark> tab on the left.
5. In <mark style="color:yellow;">\[Service]</mark>, select <mark style="color:yellow;">\[Custom]</mark>, then enter the Ingress URL into the <mark style="color:yellow;">Server</mark> filed.
   * Ingress URL format: <mark style="color:$primary;">**`rtmp://`**</mark>`{Public IPv4}:`<mark style="color:$primary;">**`1935`**</mark>`/{app}/{stream}`

{% hint style="info" %}
If the Ingress URL already includes the stream key, you may leave Stream Key empty.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/w6hUkntik6cUGaajdJnn/image.png" alt=""><figcaption></figcaption></figure>

6. Next, in the <mark style="color:yellow;">\[Output]</mark> tab, we recommend setting the <mark style="color:$primary;">**`Keyframe Interval`**</mark> to <mark style="color:$primary;">**1-second**</mark> and <mark style="color:$primary;">**`B-frames`**</mark> to <mark style="color:$primary;">**0**</mark> for smooth sub-second latency and low-latency streaming.

{% hint style="success" %}
Setting <mark style="color:yellow;">B-frames</mark> to <mark style="color:yellow;">0</mark> (`bframes=0`) helps reduce playback stuttering in `WebRTC` output. The example above shows the configuration when using the `x264` encoder. Depending on the selected encoder, available options and layout may vary. When using `WebRTC` as the output, <mark style="color:yellow;">setting B-frames to 0 is recommended</mark>.
{% endhint %}

7. If needed, adjust additional settings in tabs such as \[Audio] and \[Video], then click <mark style="color:yellow;">\[OK]</mark> to return to the OBS main screen.
8. Finally, click <mark style="color:yellow;">\[Start Streaming]</mark> to begin publishing.

{% hint style="info" %}
If you would like to verify basic operation using other protocols (RTSP Pull, WebRTC/WHIP, SRT, RTMP/E-RTMP, etc.), please refer to the [Publish Streams](https://ovenmediaengine-enterprise.gitbook.io/guide/exclusive/aws-marketplace/publish-streams) section.
{% endhint %}
{% endstep %}

{% step %}

### Verify stream status and playback in the Web Console <a href="#verify-stream-status-and-playback-in-the-web-console" id="verify-stream-status-and-playback-in-the-web-console"></a>

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/uvXIAs1RP6f1UQvZeuJw/image.png" alt=""><figcaption></figcaption></figure>

9. In the <mark style="color:yellow;">Web Console</mark>, confirm that the stream is created and appears in the stream list.

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/TrsMXXRXtPhDCBfzbONl/image.png" alt=""><figcaption></figcaption></figure>

10. Open the stream details page and verify:
    1. Playback status.
    2. Statistics (bitrate, FPS, etc.).
    3. Playback URL.
       {% endstep %}
       {% endstepper %}

## Play via Egress Protocol (WebRTC, LLHLS, HLS, SRT) <a href="#post-setup-verification-for-ovenmediaengine-enterprise" id="post-setup-verification-for-ovenmediaengine-enterprise"></a>

### Play with the embedded player

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/JP85PmbyIL3QlikEkpWj/image.png" alt=""><figcaption></figcaption></figure>

* On the Web Console Stream List (main page), click the <mark style="color:yellow;">\[Stream Box]</mark> you want to view in detail.

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/LXNtky62YdGxyFxgm1i9/image.png" alt=""><figcaption></figcaption></figure>

* Then, in the player provided by OvenMediaEngine Enterprise (OvenPlayer), select options such as <mark style="color:yellow;">`Playlist`</mark>, <mark style="color:yellow;">`Protocol`</mark>, and <mark style="color:yellow;">`TLS`</mark> to start playback.

### Play with an external player

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/VVPPu3S4ZKr6RHHKphg5/image.png" alt=""><figcaption></figcaption></figure>

* In the stream detail view, click the <mark style="color:yellow;">\[URLs]</mark> tab and use an <mark style="color:yellow;">\[Egress URL]</mark> from the list to play the stream in an external player.
  * Alternatively, based on the Playlist, Protocol, and TLS settings you selected under "[Play with the embedded player](#play-with-the-embedded-player)," you can use the <mark style="color:yellow;">\[Playback URL]</mark> shown at the bottom to play in an external player.

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/f2NTezDjBkUNfsXhVq95/image.png" alt=""><figcaption></figcaption></figure>

* Please test playback using an external player such as [http://demo.ovenplayer.com](http://demo.ovenplayer.com/), as shown in the example above.
  * LLHLS URL format: `http[s]://{Public IPv4 or Domain}:{Port}/{App name}/{Stream name}/{Playlist name}.m3u8`
  * HLS URL format: `http[s]://{Public IPv4 or Domain}:{Port}/{App name}/{Stream name}/ts:{Playlist name}.m3u8`
  * WebRTC URL format: `ws[s]://{Public IPv4 or Domain}:{Port}/{App name}/{Stream name}/{Playlist name}`
  * SRT URL format: `srt://{Public IPv4 or Domain}:{Port}?streamid={Host name}/{App name}{Stream name}/{Playlist name}`

{% hint style="success" %}

* When testing a **Non-TLS** URL, use: [**http://**&#x64;emo.ovenplayer.com](http://demo.ovenplayer.com/)
* When testing a **TLS** URL, use: [**https://**&#x64;emo.ovenplayer.com](https://demo.ovenplayer.com/)
  {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ovenmediaengine-enterprise.gitbook.io/guide/exclusive/aws-marketplace/getting-started-on-aws.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
