Embed YouTube Live Stream on Website – Setup & Troubleshooting

Stream your IP camera to YouTube Live with webcam.io. This guide covers everything from basic setup to advanced configurations like MJPEG transcoding and multiple simultaneous streams.

Overview

What You Can Do

YouTube streaming features
Feature Description
24/7 Live Streaming Continuous streaming to YouTube
Unlimited Viewers YouTube handles all viewer traffic
Transcoding Convert MJPEG/Mobotix to H.264
Multiple Streams Run several cameras on one YouTube account
Website Embedding Embed live stream on your website
Auto-Delete Archives Remove old stream recordings automatically

Requirements

Requirements
Requirement Details
webcam.io Plan LIVE (H.264) or LIVE+ (transcoding)
YouTube Account With live streaming enabled
Camera IP camera with RTSP/HTTP stream
Bandwidth Minimum 1 Mbps upload (2+ recommended)

Camera Compatibility

Camera compatibility
Camera Type Codec webcam.io Plan Transcoding
Modern IP cameras H.264 LIVE Off (copy)
Older IP cameras MJPEG LIVE+ Required
Mobotix cameras MxPEG LIVE+ Required
HEVC cameras H.265 LIVE+ Required

Quick Start: H.264 Cameras

For modern cameras with H.264 support, follow these steps:

Step 1: Get Your Camera Stream URL

Find your camera’s RTSP URL. Common formats:

rtsp://IP-ADDRESS:554/Streaming/Channels/101      (Hikvision)
rtsp://IP-ADDRESS:554/cam/realmonitor?channel=1   (Dahua)
rtsp://IP-ADDRESS/live/ch00_1                     (Axis)
rtsp://IP-ADDRESS:554/videoMain                   (Foscam)
Finding Your Camera’s URL

Check your camera manual, or search “[your camera model] RTSP URL”. The iSpy camera database is also helpful.

If your camera requires authentication:

rtsp://USERNAME:PASSWORD@IP-ADDRESS:554/path

Step 2: Make Camera Accessible

Your camera must be accessible from the internet:

  1. Port Forwarding: Forward port 554 (RTSP) to your camera’s local IP
  2. Dynamic DNS: Set up DDNS if you don’t have a static IP (e.g., DynDNS, No-IP)

Example URL after setup:

rtsp://myrouter.dyndns.org:554/Streaming/Channels/101

Test with VLC:

  1. Open VLC → File → Open Network
  2. Enter your external RTSP URL
  3. If video plays, your camera is accessible

Step 3: Set Up YouTube Live

  1. Open YouTube Studio
  2. Click Go Live (upper right)
Don’t Use “Stream Tab”

The default “Stream Tab” causes problems with 24/7 streaming. Use Scheduled Streams instead (see below).

  1. Click Manage tab (left sidebar)
  2. Click Schedule Stream (upper right)
  3. Configure your stream:
    • Title: Your webcam name
    • Visibility: Public, Unlisted, or Private
    • Category: Travel & Events (or appropriate)
  4. Click Create
  5. Open your scheduled stream from the list
  6. Copy the Stream URL and Stream Key

YouTube Stream URL format:

rtmp://a.rtmp.youtube.com/live2

Stream Key format:

xxxx-xxxx-xxxx-xxxx-xxxx

Step 4: Configure webcam.io

  1. Go to webcam.io Dashboard
  2. Click Add Webcam → Select Live Stream
  3. Configure:
Field Value
Input URL Your camera’s RTSP URL
Input Type default
Output URL rtmp://a.rtmp.youtube.com/live2/YOUR-STREAM-KEY
Transcoding Off (copy stream)
  1. Check Enable Streaming
  2. Click Save

Step 5: Go Live

  1. Return to YouTube Live Control Room
  2. Wait for “Receiving data” status (30-60 seconds)
  3. Click Go Live
  4. Your stream is now live!

MJPEG Cameras (Transcoding)

Older cameras that only output MJPEG require transcoding to H.264 for YouTube.

Plan Requirement

MJPEG transcoding requires LIVE+ plan.

Finding Your MJPEG URL

MJPEG URLs typically look like:

http://IP-ADDRESS/video.cgi
http://IP-ADDRESS/mjpg/video.mjpg
http://IP-ADDRESS/cgi-bin/video.cgi

Example (Trendnet TV-IP200):

http://192.168.1.100/cgi/mjpg/mjpg.cgi

Configure webcam.io for MJPEG

  1. Create a Live Stream webcam entry
  2. Configure:
MJPEG configuration
Field Value
Input URL Your MJPEG URL
Input Type MJPEG
Output URL Your YouTube RTMP URL
Transcoding 720p / 5-15 fps (recommended)
  1. Enable streaming and save

Transcoding Settings

Transcoding options
Setting Best For
720p / 5 fps Low bandwidth, old cameras
720p / 15 fps Standard quality
1080p / 15 fps High quality, good bandwidth
1080p / 30 fps Maximum quality
Note

Higher transcoding settings use more server resources. If you have a very low resolution camera, contact support for plan adjustments.


Mobotix Cameras (MxPEG)

Mobotix cameras use proprietary MxPEG codec, which requires transcoding.

Plan Requirement

Mobotix streaming requires LIVE+ plan.

Finding Your Mobotix URL

Mobotix stream URLs typically:

http://IP-ADDRESS/control/faststream.jpg?stream=MxPEG

Important parameters:

  • stream=MxPEG — Required for video stream
  • Image adjustment parameters to reduce bandwidth

See Mobotix documentation for your specific model.

Configure webcam.io for Mobotix

Mobotix configuration
Field Value
Input URL Your Mobotix URL with stream=MxPEG
Input Type Mobotix (MxPEG)
Output URL Your YouTube RTMP URL
Transcoding 720p / 15 fps (recommended)

Port Forwarding for Mobotix

Forward port 80 (HTTP) to your Mobotix camera’s local IP address.


Embedding on Your Website

Requirements

Before embedding, ensure:

  1. Live streaming enabled in YouTube Features
  2. Embed live streams enabled in YouTube Features
  3. Stream visibility set to Public or Unlisted
  4. AdSense account linked (may be required)
Embedding Issues?

If you can’t enable “Embed live streams” in YouTube, try Twitch instead — it’s easier to embed.

Get Your Channel ID

  1. Go to YouTube Advanced Settings
  2. Copy your Channel ID (not User ID!)
    • Format: UCxxxxxxxxxxxxxxxxxx

Embed Code (Permanent URL)

Use the channel-based embed for a permanent link that always shows your live stream:

<iframe 
  width="560" 
  height="315" 
  src="https://www.youtube.com/embed/live_stream?channel=YOUR_CHANNEL_ID" 
  frameborder="0" 
  allowfullscreen>
</iframe>

Replace YOUR_CHANNEL_ID with your actual Channel ID.

Video-Specific Embed

If you prefer to embed a specific stream:

<iframe 
  width="560" 
  height="315" 
  src="https://www.youtube.com/embed/VIDEO_ID" 
  frameborder="0" 
  allowfullscreen>
</iframe>
Video ID Changes

If your stream ends and restarts, the Video ID changes. Use the Channel ID method for permanent embeds.

Responsive Embed

For responsive websites:

<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
  <iframe 
    src="https://www.youtube.com/embed/live_stream?channel=YOUR_CHANNEL_ID" 
    style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" 
    frameborder="0" 
    allowfullscreen>
  </iframe>
</div>

Multiple Streams

Run multiple cameras on one YouTube account using Scheduled Streams.

Why Scheduled Streams?

Stream Tab vs Scheduled Stream
Feature Stream Tab Scheduled Stream
Multiple cameras ❌ One only ✅ Unlimited
Auto-reconnect ❌ Manual ✅ Automatic
24/7 streaming ❌ Problematic ✅ Recommended
Reusable settings ❌ No ✅ Yes

Setup Multiple Streams

For each camera:

  1. Go to YouTube Live → Manage tab
  2. Click Schedule Stream
  3. Configure title, visibility
  4. Click Create
  5. Copy the unique Stream Key
  6. Create a webcam entry in webcam.io with this Stream Key

Repeat for each additional camera.

Stream Keys

Each scheduled stream has a unique Stream Key:

Camera 1: rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-1111
Camera 2: rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-2222
Camera 3: rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-3333

webcam.io Plans for Multiple Streams

Each live stream requires a LIVE or LIVE+ plan:

Plan requirements for multiple streams
Streams Plans Needed
1 1× LIVE
3 3× LIVE (use Qty. field at checkout)
5 H.264 + 2 MJPEG 5× LIVE + 2× LIVE+

Auto-Delete Archives

YouTube automatically creates archive videos of your live streams. These can cause:

  • Duplicate content warnings
  • Copyright issues
  • Storage clutter
  • Risk of losing streaming privileges

Enable Auto-Delete

  1. Go to webcam.io Dashboard → Integrations
  2. Click Authorize in the YouTube section
  3. Grant webcam.io permission to manage videos
  4. Edit your live stream webcam
  5. Go to Advanced Settings
  6. Enter a search term that matches your archived video titles
  7. Check Enable auto-delete
  8. Save
Be Careful!

The search term matches all videos in your YouTube account. If it matches other videos you want to keep, they will be deleted permanently!

Test first: Go to YouTube Video Manager and search for your term to see what matches.

How It Works

  • Runs once per day (around midnight UTC)
  • Deletes videos matching your search term
  • Videos in “Processing” state are skipped
  • You can revoke access anytime in Google App Permissions

Troubleshooting

Stream Shows “Offline” but webcam.io Shows “OK”

Cause: YouTube interface changed. “Stream Tab” no longer auto-reconnects.

Solution:

  1. Switch to Scheduled Streams (recommended)
  2. Or manually visit YouTube Stream Tab, then restart in webcam.io

Stream Keeps Ending

Cause: YouTube may end streams after hours of inactivity or issues.

Solutions:

  1. Enable Backup Stream in webcam.io (keeps stream alive during camera downtime)
  2. Use Scheduled Streams (better reconnection handling)
  3. If stream ends, recreate in Manage tab → reuse previous settings

Stream Won’t Start

Stream startup issues
Symptom Likely Cause Solution
“Restarting” loop Input format not recognized Contact support
No data received Camera not accessible Check port forwarding, test with VLC
Invalid stream key Wrong YouTube credentials Copy Stream Key again
Transcoding required Non-H.264 camera Enable transcoding, upgrade to LIVE+

Poor Video Quality

Video quality issues
Issue Solution
Pixelated video Increase camera bitrate
Choppy playback Reduce resolution/framerate
Buffering Check upload bandwidth (need 1.5× bitrate)
Dark/overexposed Adjust camera exposure settings

High Latency (Delay)

YouTube Live always has some delay:

YouTube latency settings
Latency Setting Typical Delay
Ultra-low 3-5 seconds
Low 8-15 seconds
Normal 15-30 seconds

To reduce latency:

  1. In YouTube Live Control Room, set Latency to “Ultra-low” or “Low”
  2. Note: Lower latency may affect stability

Duplicate Content Warnings

Cause: YouTube archives your live streams as videos.

Solutions:

  1. Enable Auto-Delete
  2. Manually delete archives in YouTube Studio
  3. Set stream to “Unlisted” to reduce detection

Best Practices

For 24/7 Streaming

✅ Use Scheduled Streams (not Stream Tab)
✅ Enable Backup Stream in webcam.io
✅ Enable Auto-Delete for archives
✅ Use Channel ID embed (permanent URL)
✅ Set Normal latency (most stable)
✅ Monitor stream health weekly

For Multiple Cameras

✅ Create separate Scheduled Stream for each
✅ Use descriptive titles
✅ Consider separate YouTube channels for different locations
✅ Document your Stream Keys somewhere safe

For Embedding

✅ Use Channel ID method (permanent)
✅ Test in incognito/private browser
✅ Ensure "Embed live streams" is enabled in YouTube
✅ Link AdSense if required

FAQ

Can I stream to YouTube for free?

YouTube Live is free. You need a webcam.io LIVE or LIVE+ plan for the streaming service.

How many viewers can watch?

Unlimited. YouTube handles all viewer traffic — that’s the main advantage of streaming through YouTube.

Can I use a USB webcam?

No. webcam.io requires an IP camera with network streaming capability. For USB webcams, use OBS or similar software to stream directly to YouTube.

Can I also do time-lapse?

Yes, but you need a separate webcam entry of type “Time-lapse”. Reading images from the live stream directly is not yet supported.

What’s the maximum stream quality?

YouTube accepts up to 4K/60fps. However, most IP cameras output 1080p/30fps or less. Match your transcoding settings to your camera’s capability.

Why does my stream URL use RTSP but output uses RTMP?

  • RTSP (Real Time Streaming Protocol): How webcam.io reads from your camera
  • RTMP (Real Time Messaging Protocol): How webcam.io sends to YouTube

webcam.io handles the conversion automatically.


Next Steps

Back to top