Skip to content

Latest commit

 

History

History
71 lines (49 loc) · 2.71 KB

README.md

File metadata and controls

71 lines (49 loc) · 2.71 KB

Livestream modular service

This module implements the rdk camera API in a youtube-stream model. With this model, you can provide a youtube URL as a configurable attribute to a camera component.

With this model, you can provide a URL to a video hosted on youtube or other supported websites as a configurable attribute to a camera component.

Requirements

The module executable is currently supported on linux/arm64, linux/amd64, and darwin/arm64. Make sure your machine is running on one of these architectures to avoid exec format issues.

Build and Run

To use this module, follow these instructions to add a module from the Viam Registry and select the julie:livestream:youtube-stream model from the livestream module.

Configure your camera

Note

Before configuring your camera, you must create a machine.

Navigate to the Config tab of your robot’s page in the Viam app. Click on the Components subtab and click Create component. Select the camera type, then select the julie:livestream:youtube-stream model. Enter a name for your camera and click Create.

To use this custom Viam Camera component, the following configuration is required:

Generalized Attribute Guide

{
  "video_url": "https://www.youtube.com/some_video"
}

Specific Example

{
  "video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}

Attributes

The following attributes are available for julie:livestream:youtube-stream cameras:

Name Type Inclusion Description
video_url string Required This URL specifies the livestream video that the camera will play.

Example Configuration

{
      "name": "my-youtube-stream",
      "namespace": "rdk",
      "type": "camera",
      "model": "julie:livestream:youtube-stream",
      "attributes": {
        "video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
      }
    }

Troubleshooting

If the livestream fails to load from a particular website, check if it's also available on YouTube

Ex: livestreams from San Diego Zoo live cameras may not load directly, but they are available on YouTube.

Note: Sometimes, livestreams may take a few seconds to load. If the stream doesn’t load immediately, try refreshing the page.