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
| 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
| 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 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)
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:
- Port Forwarding: Forward port 554 (RTSP) to your camera’s local IP
- 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:
- Open VLC → File → Open Network
- Enter your external RTSP URL
- If video plays, your camera is accessible
Step 3: Set Up YouTube Live
- Open YouTube Studio
- Click Go Live (upper right)
The default “Stream Tab” causes problems with 24/7 streaming. Use Scheduled Streams instead (see below).
- Click Manage tab (left sidebar)
- Click Schedule Stream (upper right)
- Configure your stream:
- Title: Your webcam name
- Visibility: Public, Unlisted, or Private
- Category: Travel & Events (or appropriate)
- Click Create
- Open your scheduled stream from the list
- 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
- Go to webcam.io Dashboard
- Click Add Webcam → Select Live Stream
- 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) |
- Check Enable Streaming
- Click Save
Step 5: Go Live
- Return to YouTube Live Control Room
- Wait for “Receiving data” status (30-60 seconds)
- Click Go Live
- Your stream is now live!
MJPEG Cameras (Transcoding)
Older cameras that only output MJPEG require transcoding to H.264 for YouTube.
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
- Create a Live Stream webcam entry
- Configure:
| Field | Value |
|---|---|
| Input URL | Your MJPEG URL |
| Input Type | MJPEG |
| Output URL | Your YouTube RTMP URL |
| Transcoding | 720p / 5-15 fps (recommended) |
- Enable streaming and save
Transcoding Settings
| 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 |
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.
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
| 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:
- Live streaming enabled in YouTube Features
- Embed live streams enabled in YouTube Features
- Stream visibility set to Public or Unlisted
- AdSense account linked (may be required)
If you can’t enable “Embed live streams” in YouTube, try Twitch instead — it’s easier to embed.
Get Your Channel ID
- Go to YouTube Advanced Settings
- Copy your Channel ID (not User ID!)
- Format:
UCxxxxxxxxxxxxxxxxxx
- Format:
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.
Permanent Link
Direct link to your live stream:
https://www.youtube.com/channel/YOUR_CHANNEL_ID/live
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>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?
| 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:
- Go to YouTube Live → Manage tab
- Click Schedule Stream
- Configure title, visibility
- Click Create
- Copy the unique Stream Key
- 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:
| 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
- Go to webcam.io Dashboard → Integrations
- Click Authorize in the YouTube section
- Grant webcam.io permission to manage videos
- Edit your live stream webcam
- Go to Advanced Settings
- Enter a search term that matches your archived video titles
- Check Enable auto-delete
- Save
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:
- Switch to Scheduled Streams (recommended)
- 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:
- Enable Backup Stream in webcam.io (keeps stream alive during camera downtime)
- Use Scheduled Streams (better reconnection handling)
- If stream ends, recreate in Manage tab → reuse previous settings
Stream Won’t Start
| 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
| 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:
| Latency Setting | Typical Delay |
|---|---|
| Ultra-low | 3-5 seconds |
| Low | 8-15 seconds |
| Normal | 15-30 seconds |
To reduce latency:
- In YouTube Live Control Room, set Latency to “Ultra-low” or “Low”
- Note: Lower latency may affect stability
Duplicate Content Warnings
Cause: YouTube archives your live streams as videos.
Solutions:
- Enable Auto-Delete
- Manually delete archives in YouTube Studio
- 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
Recommended Settings
YouTube Settings
| Setting | Recommended Value |
|---|---|
| Stream type | Scheduled Stream |
| Latency | Normal |
| DVR | Off |
| Auto-start | Off |
| Auto-stop | Off |
webcam.io Settings
| Setting | H.264 Camera | H.265 Camera | MJPEG | Mobotix |
|---|---|---|---|---|
| Input type | default | default | MJPEG | Mobotix |
| Transcoding | Off (copy) | 1080p/15fps | 720p/15fps (low) | 720p/15fps |
| Backup stream | On | On | On | On |
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
- Live Streaming Setup – Basic camera connection guide
- Twitch Streaming – Alternative to YouTube
- Streaming FAQ – Common questions
- Pricing – Compare LIVE and LIVE+ plans