Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions src/ac_training_lab/picam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,61 @@ cp my_secrets_example.py my_secrets.py

Fill in the necessary information (e.g., via `nano my_secrets.py`). Keep in mind this will store the credentials in plain-text format, so try to keep your Pi login secure and restrict the access scope for the credentials as much as possible.

### Required Configuration Variables

#### `LAMBDA_FUNCTION_URL`
The AWS Lambda Function URL for the YouTube streaming service. This Lambda function handles YouTube API authentication and stream management.

**Setup Steps:**
1. Deploy the [streamingLambda](https://github.com/AccelerationConsortium/streamingLambda) service to your AWS account
2. The deployment will provide you with a Function URL that looks like: `https://your-unique-id.lambda-url.region.on.aws/`
3. Use this URL as your `LAMBDA_FUNCTION_URL`

**Note:** The Lambda function requires YouTube API credentials to be set up in AWS (stored in S3). See the streamingLambda repository for detailed deployment instructions.

#### `CAM_NAME`
A descriptive name for this specific camera device. This appears in YouTube broadcast titles and helps identify individual cameras when you have multiple devices.

**Examples:** `"PiCam-01"`, `"LabCam-A"`, `"MainCamera"`

#### `WORKFLOW_NAME`
**CRITICAL:** This must be **unique** across all your streaming devices to prevent conflicts.

The workflow name is used to:
- Create and organize YouTube playlists
- Identify which streams to end/restart
- Group related video streams

**Requirements:**
- Must be unique across all devices (see [Issue #290](https://github.com/AccelerationConsortium/ac-dev-lab/issues/290))
- Keep it concise due to YouTube character limits
- Use descriptive names for your experimental setup or location

**Examples:** `"SDLT-Toronto-001"`, `"MyLab-Setup-A"`, `"AC-Synthesis-Bench"`

#### `PRIVACY_STATUS`
Controls the visibility of your YouTube live stream:
- `"private"` - Only you can view (requires YouTube account login)
- `"public"` - Anyone can find and view the stream
- `"unlisted"` - Anyone with the link can view, but it won't appear in search results

**Recommendation:**
- Use `"unlisted"` for lab monitoring. This provides controlled access while keeping streams discoverable by your team.
- If you use `"private"`, you must provide access by adding a Google account for each person.
- Each person added to the channel will be able to see all videos in the channel.
- With `"unlisted"`, you can share specific playlists or videos individually.

#### Camera Orientation Settings
- `CAMERA_VFLIP` - Set to `True` to flip the camera image vertically
- `CAMERA_HFLIP` - Set to `True` to flip the camera image horizontally

Adjust these based on your camera mounting orientation to ensure the video appears right-side-up.

### Related Resources
- [streamingLambda Repository](https://github.com/AccelerationConsortium/streamingLambda) - AWS Lambda service for YouTube streaming
- [Issue #290](https://github.com/AccelerationConsortium/ac-dev-lab/issues/290) - Workflow name uniqueness requirements
- [YouTube Hardware Streams](https://www.youtube.com/@ac-hardware-streams) - Example of equipment monitoring streams



## Dependencies
Expand Down
26 changes: 24 additions & 2 deletions src/ac_training_lab/picam/my_secrets_example.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
# AWS Lambda Function URL - Required for YouTube streaming
# This URL is obtained by deploying the streamingLambda service to AWS.
# See: https://github.com/AccelerationConsortium/streamingLambda
# The Lambda function handles YouTube API calls to create and manage live streams.
LAMBDA_FUNCTION_URL = "your_Lambda_function_url"

# Camera Name - Used for identifying this specific camera device
# This appears in the YouTube broadcast title alongside the workflow name and timestamp.
# Examples: "PiCam-01", "LabCam-A", "MainCamera"
CAM_NAME = "your_camera_name"

# Workflow Name - Used for organizing streams into playlists
# IMPORTANT: This must be UNIQUE across all devices to avoid conflicts.
# The workflow name is used to:
# - Create/find YouTube playlists
# - End streams for this specific workflow
# - Organize videos by experimental setup or location
# Keep it short (YouTube has character limits) and descriptive.
# Examples: "SDLT-Toronto-001", "MyLab-Setup-A", "AC-Synthesis-Bench"
# Related issue: https://github.com/AccelerationConsortium/ac-dev-lab/issues/290
WORKFLOW_NAME = "your_workflow_name"

# YouTube Privacy Status - Controls who can view the live stream
# Options: "private" (only you), "public" (anyone), "unlisted" (anyone with link)
# For lab monitoring, "unlisted" is often preferred for controlled sharing.
PRIVACY_STATUS = "private" # "private", "public", or "unlisted"

# Camera orientation settings
# Set to True to flip the camera image vertically
# Set to True to flip the camera image vertically (rotate 180° around horizontal axis)
CAMERA_VFLIP = True
# Set to True to flip the camera image horizontally
# Set to True to flip the camera image horizontally (mirror image)
CAMERA_HFLIP = True
Loading