DIY Security Camera Guide

How to Stream Your Outdoor Security Cameras Live on Your Website Using YouTube, Motion Detection, and Starlink

Not long ago, setting up a live security camera stream at a rural property was either impossibly expensive or technically out of reach for most homeowners. You either paid for a professional monitoring service, dealt with satellite internet too slow to push a video stream, or simply went without.

That has changed. Today a combination of affordable wireless cameras, free live-streaming infrastructure from YouTube, and the arrival of Starlink’s high-speed satellite broadband means that anyone — even someone living miles from the nearest cable line — can build a fully functional, live-streaming outdoor security system and embed it directly on their own website. With modern motion detection software layered on top, you get smart alerts the moment something moves rather than hours of empty footage to review.

This guide walks you through the entire setup from start to finish: mounting and configuring your wireless cameras, getting motion detection running, pushing a live stream through Starlink to YouTube, and embedding that stream in an iframe on your website so you can check in from anywhere in the world.


1. What You’ll Need

Before you start drilling holes and running cables, here is a full inventory of everything you need.

Cameras

You need at least one wireless outdoor security camera that supports RTSP — Real Time Streaming Protocol. This is the standard that lets third-party software pull a video feed directly from the camera without relying on the manufacturer’s cloud app. Good options that support RTSP out of the box include Reolink RLC-810A or RLC-823A, which offer excellent value and are available in both wired PoE and wireless versions. Amcrest IP8M series cameras are solid, widely compatible devices. Hikvision DS-2CD series cameras are professional grade and very popular in DIY setups. Dahua IPC-HDW series are a reliable alternative to Hikvision.

Avoid cameras that are exclusively app-controlled with no RTSP access — many cheap brands on Amazon fall into this category. Check the manufacturer’s spec sheet before buying.

Streaming Computer

You need an always-on device to act as the bridge between your camera and YouTube. A spare Windows or Mac desktop works fine. A Raspberry Pi 4 is the most popular choice for this job because it draws very little power and runs quietly around the clock. A mini PC like an Intel NUC is another solid option. If you plan to run multiple cameras or use AI-based motion detection, a more capable machine gives better results — though adding a Google Coral USB TPU to a Raspberry Pi 4 dramatically improves AI detection performance at low cost.

You need the Starlink dish and an active subscription. The Gen 2 round dish and Gen 3 rectangular dish both work well for this setup. Any residential plan is sufficient. A UPS battery backup connected to your dish and router is worth having — it keeps your stream alive during brief power outages that would otherwise kill the connection.

Networking

Your existing Wi-Fi router connected to Starlink is all you need for most setups. If cameras are far from the router, a Wi-Fi range extender or mesh node fills the gap. An optional NAS drive, USB hard drive, or SD card gives you local storage for motion-triggered clips. A 4G LTE backup router like the GL.iNet Spitz is worth considering for truly critical setups — it auto-fails over to mobile data if Starlink drops.

Software and Accounts

OBS Studio is free and available at obsproject.com — it handles streaming with a graphical interface and is the recommended tool for most people. FFmpeg is a free command-line alternative better suited to headless setups like a Raspberry Pi. For motion detection, Frigate NVR is the recommended option and runs in Docker. Motion is a lightweight Linux alternative. VLC Media Player is needed to test your camera streams locally before setting up anything else. You also need a YouTube account with live streaming enabled, and a website running WordPress where you will embed the stream.


Before configuring anything, it is worth spending a few minutes understanding what Starlink can and cannot do in this context. Setting the right expectations will save you frustration later.

Starlink upload speeds typically run between 10 and 40 Mbps, which is more than sufficient for a 1080p stream at 4,000 to 6,000 Kbps. Latency sits around 20 to 60 milliseconds — dramatically lower than older geostationary satellite services that ran at 600ms or more. Most importantly for this project, outbound connections work perfectly. YouTube’s RTMP ingest is a push-based protocol, meaning your system initiates the upload to YouTube. Nothing about Starlink’s network architecture interferes with this.

CGNAT — The One Thing You Need to Know

Starlink places most residential users behind Carrier-Grade NAT, known as CGNAT. This means you share a public IP address with many other Starlink users and cannot receive inbound connections from the internet. Standard port forwarding does not work on Starlink.

This matters if you want to access your Frigate dashboard or camera feeds remotely from outside your home. It does not affect streaming to YouTube at all, because that connection is outbound — your system calls YouTube, not the other way around.

Good news for this project
For the primary use case in this guide — streaming to YouTube and viewing via iframe embed — CGNAT is completely irrelevant. You only need outbound internet access, which Starlink handles perfectly.

Brief Disconnections

Starlink occasionally has brief drop-outs of a few seconds, typically caused by dish obstructions or software updates. Your streaming setup needs to handle these gracefully. In Section 8 we configure automatic reconnect loops in FFmpeg and OBS specifically to deal with this.

Any residential plan works for this project. The standard Residential plan is the most cost-effective for a permanent home installation. The Roam plan suits seasonal properties or vehicles. The Priority plan offers higher guaranteed speeds if you are running several high-bitrate camera streams at the same time.


Physical Installation

Getting dish placement right is the most important factor in Starlink reliability. The dish needs a completely unobstructed view of the sky — a single branch can cause regular dropouts. Before mounting anything permanently, download the Starlink app and use the built-in obstruction checker. Point your phone’s camera at the sky where you plan to mount the dish and the app shows you exactly which parts of the sky need to be clear. Do this before drilling a single hole.

Mount the dish as high as practically possible. Rooftop mounts are ideal. Run the Starlink cable into your home carefully using weatherproof grommets or conduit where it passes through walls. Avoid sharp bends in the cable. On first boot, give the dish 10 to 15 minutes to acquire satellites and update its firmware before testing anything.

Network Configuration

By default, Starlink uses its own router. You can use it as-is for this project, which works fine. However, putting Starlink into bypass mode and using your own router gives you more control over DHCP reservations and quality of service settings. To enable bypass mode, open the Starlink app, tap the menu, go to Settings, then Router, then Bypass Mode. Connect your own router’s WAN port to the Starlink router’s LAN port.

Assign static local IP addresses to your cameras using DHCP reservation in your router settings. Find each camera’s MAC address — usually printed on the device or listed in your router’s connected devices page — and pin it to a fixed IP like 192.168.1.100, 192.168.1.101, and so on. This ensures your streaming software can always find the cameras even after a router reboot.

If your router supports Quality of Service rules, set one that prioritizes outbound traffic on port 1935 from your streaming computer. Port 1935 is the RTMP streaming port. This ensures your camera stream doesn’t drop frames when someone else on the network is downloading large files or streaming video.

Remote Access Through CGNAT

If you want to access your Frigate dashboard or camera feeds from outside your home — not just via the YouTube embed — you need to work around CGNAT. The recommended free solution is Tailscale, which creates an encrypted private mesh network between your devices. Install it on your streaming computer at home and on your phone or remote laptop. Both devices appear in your Tailscale admin panel with private IP addresses you can use to reach local services from anywhere, with no port forwarding required and no CGNAT issues. Setup takes about five minutes at tailscale.com.

Cloudflare Tunnel is a free alternative that lets you expose a local web service like the Frigate interface to the internet through Cloudflare’s network. It takes a bit more configuration but is useful if you want to share access with others or use a custom domain.


4. Setting Up Your Wireless Cameras

Choosing Mounting Locations

Good camera placement is as important as good hardware. Before mounting anything permanently, walk your property with the goal of covering all entry points: front door, back door, garage, and side gates. Position cameras high enough to capture faces clearly — 8 to 10 feet is the sweet spot — but not so high that you only see the tops of heads. Avoid pointing cameras directly into sunrise or sunset, which will wash out the image. For motion detection to work well, cameras covering open areas like driveways perform best when subjects move across the frame rather than directly toward the lens.

Connecting to Wi-Fi

Most wireless cameras use a companion smartphone app for initial setup. Download the manufacturer’s app, create an account, and follow the pairing steps — this typically involves holding the camera near your phone and scanning a QR code. Connect cameras to your 2.4GHz Wi-Fi band rather than 5GHz. The 2.4GHz band has better range, which matters for cameras at the far corners of your property. The lower bandwidth is not a problem — camera streams only use a few megabits per second.

Watch out if using bypass mode
If your Starlink router is in bypass mode and you are using your own router, make sure cameras connect to your router’s network and not any residual network the Starlink router may still be broadcasting.

Enabling RTSP

RTSP access lets software like OBS, Frigate, and FFmpeg pull a direct video stream from your camera. The process differs by brand. On Reolink cameras, open the camera in the Reolink app, go to Device Settings, then Network, then Advanced, and enable RTSP. The default URL format is rtsp://username:password@[camera-ip]:554/h264Preview_01_main. On Amcrest cameras, open the web interface, go to Setup, then Network, then RTSP. On Hikvision cameras, use the web interface under Configuration, Network, Advanced Settings, Integration Protocol.

Testing Your Stream Locally

Before setting up any streaming software, test the RTSP stream in VLC. Open VLC, go to Media, then Open Network Stream, and enter your camera’s RTSP URL. You should see a live feed within a few seconds. If VLC shows a black screen or errors, double-check the IP address, username, password, and that RTSP is enabled. Getting this working in VLC first will save significant troubleshooting time later.


5. Motion Detection — Your Options Explained

Motion detection is what separates a passive camera from an active security system. There are three main approaches, each with different trade-offs.

Option A — Camera’s Built-In Motion Detection

Most wireless cameras include onboard motion detection. This is the simplest option and requires no additional software. You configure sensitivity, detection zones, and notification settings directly in the camera’s app. The camera detects motion using either pixel-difference analysis or a PIR sensor that detects heat signatures — better cameras use both. The main limitation is that it is tied to the manufacturer’s cloud ecosystem and cannot classify what triggered the alert. Everything that moves sends an alert, including blowing leaves and passing headlights.

Option B — Software-Based Motion Detection

Running dedicated motion detection software on your local computer or Raspberry Pi gives you far more control and eliminates dependence on manufacturer cloud services entirely. Frigate is the recommended option — it is an open-source Network Video Recorder with built-in AI object detection that can identify people, cars, and animals specifically, which dramatically reduces false alerts. Motion is a lightweight Linux application better suited to older or lower-powered hardware. iSpy and its successor Agent DVR are Windows GUI options for users who prefer to avoid the command line.

Option C — Webhook or IFTTT Trigger

If you only want a simple email or SMS when your camera’s built-in detection fires, you can skip dedicated software entirely. Most cameras support sending an HTTP webhook or email on motion trigger. Connect this to IFTTT or an email-to-SMS service and you have a no-code notification pipeline. This works perfectly over Starlink — it is plain outbound HTTP traffic, nothing special required.


6. Setting Up Frigate Motion Detection

This section walks through setting up Frigate, the recommended option for most people. Frigate runs inside a Docker container, so the first step is installing Docker on your streaming computer.

On Ubuntu or Raspberry Pi OS, install Docker with: sudo apt update && sudo apt install docker.io docker-compose. On Windows or macOS, download Docker Desktop from docker.com.

Creating the Configuration File

Create a folder called frigate and inside it create a file called config.yml. Here is a starter configuration for a single camera:

mqtt:
  enabled: false

cameras:
  front_door:
    ffmpeg:
      inputs:
        - path: rtsp://admin:password@192.168.1.100:554/h264Preview_01_main
          roles:
            - detect
            - record
    detect:
      enabled: true
      width: 1280
      height: 720
      fps: 5
    motion:
      threshold: 30
      contour_area: 100
    objects:
      track:
        - person
        - car
        - dog
    record:
      enabled: true
      retain:
        days: 7
      events:
        retain:
          default: 14

Add additional camera blocks by duplicating the front_door block with different names and RTSP URLs for each camera.

Launching Frigate

In the same folder, create a file called docker-compose.yml:

version: '3.9'
services:
  frigate:
    container_name: frigate
    image: ghcr.io/blakeblackshear/frigate:stable
    restart: unless-stopped
    volumes:
      - ./config.yml:/config/config.yml
      - ./storage:/media/frigate
    ports:
      - '5000:5000'
      - '1935:1935'

Start Frigate with docker-compose up -d. Open a browser and go to http://[your-computer-ip]:5000 — you should see the Frigate web interface with your camera feeds and real-time detection overlays.

Configuring Detection Zones

In the Frigate web interface, click on a camera and then open the zones editor. Draw polygons over the areas of the frame where you want detection to be active. For a driveway camera you might draw a zone covering the driveway and parking area but deliberately exclude the road behind it, which would otherwise generate constant false alerts from passing traffic.

Email Alerts on Motion

Frigate publishes detection events via MQTT. For standalone email alerts without Home Assistant, you can run a small Python script that subscribes to Frigate’s MQTT output and sends an email whenever a person or vehicle is detected. Use Gmail’s App Password feature — available under Google Account, Security, App Passwords — rather than your main account password in the script.

Using Motion Instead of Frigate

If Frigate is more than you need, install Motion with sudo apt install motion, then edit /etc/motion/motion.conf. Set netcam_url to your RTSP URL, set target_dir to where you want clips saved, and adjust threshold — the number of changed pixels that triggers detection, where higher values mean less sensitivity. Enable the daemon and start it with sudo systemctl start motion.


7. Setting Up YouTube Live Streaming

Enabling Live Streaming

YouTube requires account verification before you can go live. Sign in, click your profile picture, go to YouTube Studio, then in the left sidebar click Create and then Go Live. If you have not streamed before, you will be prompted to verify via phone number. After verification there is a mandatory 24-hour waiting period before live streaming is available.

Plan for the 24-hour delay
Do not assume you can enable streaming and go live on the same day. Enable your account at least a day before you intend to go live.

Creating a Live Stream and Getting Your Stream Key

In YouTube Studio, click Create, then Go Live, then select Stream at the top. Click New Stream and fill in a title — something like Front Driveway Live Security Feed works fine. Set visibility to Unlisted so the stream does not appear publicly in search results or on your channel. Click Create Stream and on the next screen you will see two values you need: the Stream URL, which is typically rtmp://a.rtmp.youtube.com/live2, and the Stream Key, which is a long unique alphanumeric string.

Keep your stream key private
Anyone with your stream key can broadcast to your YouTube channel. Do not post it publicly or include it in code you share.

Set latency to Ultra-low latency — this reduces the delay between what the camera sees and what appears on your website from 30 seconds down to 2 to 5 seconds. Choose 1080p resolution if your Starlink upload is consistently above 8 Mbps, or 720p for more variable connections. Run a speed test in the Starlink app before your first stream to confirm your upload headroom.


8. Bridging Your Camera to YouTube

This is where everything connects. Your streaming software pulls video from the camera via RTSP and pushes it to YouTube via RTMP. You have two main options.

Option A — OBS Studio

OBS Studio has a graphical interface and is the recommended option for most people. To add your camera as a source, open OBS, click the plus button in the Sources panel, select Media Source, uncheck Local File, and enter your RTSP URL in the Input field. Check Reconnect Delay and set it to 5 seconds — this handles brief Starlink dropouts automatically.

To configure YouTube output, go to File, Settings, Stream. Set Service to YouTube – RTMPS and paste your Stream Key. Go to Settings, Output and set Video Bitrate to 4,000 Kbps for 720p or 6,000 Kbps for 1080p. Enable the option to dynamically change bitrate to manage congestion — this is particularly important for Starlink, which has variable upload speeds. Set a minimum bitrate floor of 1,000 Kbps so the stream does not cut out entirely during brief speed dips. Also enable auto-reconnect under Settings, Stream so OBS automatically re-establishes the connection after a Starlink dropout.

To start streaming, click Start Streaming in OBS, then open the YouTube Live Control Room and confirm you see a green indicator and a live preview after 20 to 30 seconds.

Option B — FFmpeg on Raspberry Pi or Headless Computer

FFmpeg does the same job as OBS but runs entirely from the command line, making it ideal for a Raspberry Pi you manage via SSH. The core command to stream a camera to YouTube is:

ffmpeg \
  -rtsp_transport tcp \
  -i rtsp://admin:password@192.168.1.100:554/stream \
  -c:v libx264 \
  -preset veryfast \
  -b:v 3000k \
  -maxrate 3500k \
  -bufsize 6000k \
  -pix_fmt yuv420p \
  -g 60 \
  -c:a aac \
  -ar 44100 \
  -b:a 128k \
  -f flv \
  rtmp://a.rtmp.youtube.com/live2/YOUR_STREAM_KEY

Replace the RTSP URL and stream key with your own values.

Because Starlink occasionally disconnects briefly, wrap the FFmpeg command in a shell script that automatically restarts the stream when it drops:

#!/bin/bash
while true; do
  echo "[$(date)] Starting stream..."
  ffmpeg \
    -rtsp_transport tcp \
    -reconnect 1 \
    -reconnect_at_eof 1 \
    -reconnect_streamed 1 \
    -reconnect_delay_max 10 \
    -i rtsp://admin:password@192.168.1.100:554/stream \
    -c:v libx264 -preset veryfast -b:v 3000k \
    -c:a aac -ar 44100 -b:a 128k \
    -f flv rtmp://a.rtmp.youtube.com/live2/YOUR_STREAM_KEY
  echo "[$(date)] Stream ended. Reconnecting in 10 seconds..."
  sleep 10
done

Save this as stream.sh, make it executable with chmod +x stream.sh, and run it with ./stream.sh.

Auto-Starting on Boot with Systemd

To have the stream start automatically whenever your Raspberry Pi or Linux computer boots, create a systemd service file at /etc/systemd/system/camera-stream.service with the following content:

[Unit]
Description=Camera Live Stream to YouTube
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/home/pi/stream.sh
Restart=always
RestartSec=10
User=pi

[Install]
WantedBy=multi-user.target

Then enable and start the service:

sudo systemctl daemon-reload
sudo systemctl enable camera-stream
sudo systemctl start camera-stream

Check that it is running with sudo systemctl status camera-stream.


9. Embedding the Live Stream on Your Website

With your stream running on YouTube, the final step is embedding it on your site using an iframe.

Getting the Embed URL

In YouTube Studio, open your Live Control Room, click Share, then Embed, and copy the iframe code provided. For a persistent stream you reuse rather than creating a new event each time, you can also use your channel’s live URL in this format: https://www.youtube.com/embed/live_stream?channel=YOUR_CHANNEL_ID.

Basic iframe Code

Paste this into your WordPress page using a Custom HTML block:

<div class="video-container">
  <iframe
    src="https://www.youtube.com/embed/LIVE_VIDEO_ID?autoplay=1&mute=1"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media;
           gyroscope; picture-in-picture"
    allowfullscreen>
  </iframe>
</div>
Add mute=1 to the URL
Most browsers block autoplaying videos that have audio. Adding mute=1 to the embed URL allows the video to autoplay silently when someone opens your page.

Making the Embed Responsive

Add this CSS to your WordPress theme’s Additional CSS panel under Appearance, Customize to make the video scale correctly on all screen sizes:

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

Adding to WordPress

In the WordPress block editor, add a Custom HTML block and paste the iframe div code into it. Switch to Preview to confirm the video appears. If the video does not show, check whether your security plugin is blocking iframe embeds — Wordfence and similar plugins sometimes do this. Whitelist youtube.com as a trusted iframe source in the plugin settings.

Set the YouTube video itself to Unlisted if you do not want it discoverable in search. Unlisted means anyone with the direct link — including your embedded page visitors — can watch it, but it will not appear in YouTube search results or on your public channel page.


10. Tips, Troubleshooting and Security

Run a speed test in the Starlink app before your first stream. If upload is below 5 Mbps, lower your OBS bitrate to 2,500 Kbps and drop resolution to 720p. Check the Starlink app’s obstruction map periodically — trees grow, and a clear sky path in spring may be blocked by summer foliage. A UPS battery backup on your Starlink dish and router keeps your stream alive during brief power outages; a small 600VA unit provides 20 to 30 minutes of runtime for the dish. Starlink performs scheduled maintenance reboots, usually between 2 and 4am local time — if you need guaranteed uptime during those hours, note the window and factor it in.

Motion Detection Tuning

If you are getting too many false alerts from wind-blown foliage, raise Frigate’s motion threshold from 25 to 40 or 50, or draw tighter detection zones that exclude the foliage. Night-time false alerts are often caused by insects flying close to the camera’s IR illuminators. Lowering the IR brightness in your camera settings, or adding a physical shield around the lens, reduces insects being attracted to the light. For driveways, set a minimum object size in Frigate so small animals like cats and squirrels do not trigger person or vehicle alerts.

Security

Change the default username and password on every camera immediately after setup. Default credentials are publicly documented and are the most common way cameras get compromised. Never use the same password across multiple cameras. Keep camera firmware updated — manufacturers patch security vulnerabilities regularly. Never open RTSP ports to the internet via port forwarding. RTSP has no encryption and is actively scanned for by automated bots. All camera traffic should stay on your local network, with only the RTMP output going outbound to YouTube. Use Tailscale or Cloudflare Tunnel for remote access rather than direct port forwarding.

Review your local privacy laws regarding outdoor cameras. In many places you are required to post visible notices if cameras capture public spaces or neighboring properties.

Common Problems and Fixes

If your stream keeps dropping, check your Starlink upload speed. If it is below 5 Mbps or highly variable, reduce the bitrate in OBS. Confirm the FFmpeg reconnect loop or OBS auto-reconnect is active. Check the Starlink obstruction map for new blockages.

If VLC plays your RTSP stream but OBS shows a black screen, add -rtsp_transport tcp as a custom FFmpeg option in OBS under Settings, Output, Advanced. Some cameras default to UDP for RTSP which is unreliable over Wi-Fi.

If the iframe on your website shows Video Unavailable, the YouTube stream is simply offline. The embed only shows a live video when the stream is actively running. Confirm your OBS or FFmpeg process is running and that the YouTube Live Control Room shows a green Live indicator.

If autoplay does not work on your page, ensure you have both autoplay=1 and mute=1 in the embed URL. If it still does not autoplay, the browser requires a user gesture first — consider showing a prominent Play button overlay on top of the iframe using CSS and a small JavaScript click handler.

If Frigate is consuming too much CPU, lower the detect fps in your config to 2 or 3 frames per second. Detection does not need to run at full frame rate to be effective. Adding a Google Coral USB TPU offloads AI inference to dedicated hardware and dramatically reduces CPU load.


Wrapping Up

What you have built is a complete, professional-grade live security camera system streaming continuously to the internet and viewable on your own website — built from off-the-shelf hardware and free software. The full pipeline from cameras on your local network through motion detection, out via Starlink, up to YouTube, and delivered to any visitor through an iframe embed would have cost thousands of dollars professionally just a few years ago. Today the hardware cost is a few hundred dollars and the software is entirely free.

Starlink deserves specific credit here. For anyone outside fiber or cable coverage, it has unlocked possibilities that genuinely did not exist before. The combination of adequate upload speeds, low latency, and wide rural availability makes it a solid backbone for an always-on streaming setup.

The obvious next steps from here are adding more cameras, exploring the Frigate and Home Assistant integration for smart automation — imagine your exterior lights triggering automatically when a person is detected at 2am — or self-hosting the stream with Nginx RTMP if you want to remove YouTube from the pipeline entirely.

If you have questions about your specific camera model, Starlink setup, or anything else in this guide, drop them in the comments below. And if this saved you time, sharing it is the best thanks.


Download the Full PDF Guide
Save this article as a PDF for offline reference, printing, or sharing with a friend.

Filed under: “>AlanDeRossett.com