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