How to Stream Foscam on WordPress

This guide walks you through how to stream Foscam on WordPress using plugins, HTML embedding, and third-party tools. Whether you’re setting up a security dashboard or sharing live footage, you’ll find clear, actionable steps to get your camera feed online fast.

Key Takeaways

  • Choose the right method: Use WordPress plugins, HTML embedding, or third-party streaming services depending on your technical skill and needs.
  • Ensure camera compatibility: Most Foscam models support RTSP or MJPEG streams, which are essential for integration.
  • Use a reliable plugin: Plugins like WP Video Lightbox or Video Embed & Thumbnail Generator simplify embedding live feeds.
  • Optimize for performance: Streaming video can slow down your site—use caching and limit frame rates to maintain speed.
  • Secure your stream: Always password-protect your camera and avoid exposing admin credentials in public code.
  • Test across devices: Check your stream on mobile, tablet, and desktop to ensure compatibility.
  • Troubleshoot common issues: Problems like black screens or lag often stem from network settings or incorrect URLs.

Introduction: Why Stream Foscam on WordPress?

If you own a Foscam security camera, you already know how powerful these devices are for home or business monitoring. But what if you could view that live feed directly on your WordPress website? Whether you’re running a security blog, managing a property, or just want to share real-time footage with clients or family, streaming your Foscam camera to WordPress opens up exciting possibilities.

In this guide, we’ll show you exactly how to stream Foscam on WordPress—step by step. You don’t need to be a coding expert. With the right tools and a little patience, you can embed a live video feed into any WordPress page or post. We’ll cover multiple methods, from simple HTML embedding to using specialized plugins, and even touch on advanced options like RTMP streaming.

By the end of this guide, you’ll have a working live stream from your Foscam camera displayed on your WordPress site. We’ll also help you troubleshoot common issues and keep your setup secure and fast.

Understanding Foscam Camera Streams

How to Stream Foscam on WordPress

Visual guide about How to Stream Foscam on WordPress

Image source: i.ytimg.com

Before diving into WordPress, it’s important to understand how Foscam cameras deliver video. Most Foscam models (like the FI9900P, FI9805W, or R4/R5 series) support two main streaming formats:

  • MJPEG (Motion JPEG): A simple, widely supported format that sends a series of JPEG images. Easy to embed but uses more bandwidth.
  • RTSP (Real-Time Streaming Protocol): A more efficient protocol for live video, often used with VLC or media servers. Requires more setup but offers better performance.

To stream your Foscam on WordPress, you’ll need the correct stream URL. This usually looks something like:

http://[CAMERA_IP]/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=[USERNAME]&pwd=[PASSWORD]

or for RTSP:

rtsp://[USERNAME]:[PASSWORD]@[CAMERA_IP]:554/onvif1

Note: Replace [CAMERA_IP], [USERNAME], and [PASSWORD] with your actual camera details. You can find these in the Foscam app or web interface under network settings.

Method 1: Embedding Foscam Stream Using HTML

The simplest way to stream Foscam on WordPress is by embedding the video directly using HTML. This method works best with MJPEG streams and doesn’t require any plugins.

Step 1: Get Your Foscam Stream URL

Log in to your Foscam camera’s web interface (usually by typing its IP address into a browser). Navigate to the video settings and locate the MJPEG stream URL. It should look like the example above.

Test the URL in a browser first. If you see a live video feed, you’re good to go.

Step 2: Add HTML to Your WordPress Page

In your WordPress dashboard:

  1. Go to Pages > Add New (or edit an existing page).
  2. Switch to the Code Editor (click the “” button in the block editor).
  3. Paste the following HTML code:
<img src="http://[CAMERA_IP]/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=[USERNAME]&pwd=[PASSWORD]" 
alt="Live Foscam Feed" 
style="width:100%; max-width:640px; height:auto;">

Replace the URL with your actual stream link.

Step 3: Adjust Size and Styling

You can customize the appearance using CSS. For example, to center the video and add a border:

<div style="text-align:center; margin:20px 0;">
  <img src="YOUR_STREAM_URL" 
       alt="Live Foscam Feed" 
       style="width:100%; max-width:640px; height:auto; border:2px solid #ccc; border-radius:8px;">
</div>

Step 4: Publish and Test

Click Publish or Update, then view the page on your site. You should see the live feed from your Foscam camera.

Tip: If the image appears broken, double-check the URL and ensure your camera is accessible from the internet (see troubleshooting section).

Method 2: Using a WordPress Plugin

If HTML embedding feels too basic or you want more control, plugins can help. They offer better performance, mobile support, and additional features like lightbox popups.

Recommended Plugin: WP Video Lightbox

WP Video Lightbox lets you embed videos in a popup window, which is great for keeping your page clean.

Step 1: Install and Activate the Plugin

Go to Plugins > Add New in WordPress. Search for “WP Video Lightbox,” install it, and activate.

Step 2: Configure the Plugin

After activation, go to Settings > WP Video Lightbox. You can adjust default settings like player size and autoplay, but the defaults usually work fine.

Step 3: Embed the Stream

In your page or post, add the following shortcode:

[wpvl_video url="http://[CAMERA_IP]/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=[USERNAME]&pwd=[PASSWORD]" 
width="640" height="480" 
autoplay="false" 
controls="true"]

Replace the URL with your Foscam stream. The video will appear as a clickable thumbnail that opens in a lightbox.

Alternative Plugin: Video Embed & Thumbnail Generator

This plugin automatically generates thumbnails and supports multiple formats. It’s useful if you want a polished look without manual image uploads.

Install it the same way, then use the block editor to add a “Video” block. Paste your stream URL, and the plugin will handle the rest.

Method 3: Using a Third-Party Streaming Service

For better performance, security, and mobile compatibility, consider using a streaming service like YouTube Live, Restream, or a dedicated IP camera platform.

Why Use a Third-Party Service?

  • Better performance: Offloads bandwidth from your server.
  • Mobile-friendly: Most services auto-optimize for phones and tablets.
  • Reliability: Less likely to crash during high traffic.
  • Security: Avoids exposing your camera’s IP and credentials.

Step 1: Set Up a Stream on YouTube Live

YouTube Live supports RTMP streaming, which works with many Foscam models.

  1. Go to YouTube Studio > Create > Go live.
  2. Click Stream and copy the Stream key.
  3. In your Foscam camera settings, find the RTMP or streaming section.
  4. Enter the YouTube RTMP server URL (usually rtmp://a.rtmp.youtube.com/live2) and your stream key.
  5. Save and start the stream.

Step 2: Embed the YouTube Live Stream on WordPress

Once your stream is live, YouTube provides an embed code. Copy it and paste into your WordPress page using the HTML block:

<iframe width="640" height="360" 
src="https://www.youtube.com/embed/YOUR_VIDEO_ID" 
frameborder="0" 
allowfullscreen></iframe>

Replace YOUR_VIDEO_ID with the actual ID from your YouTube stream URL.

Alternative: Use Restream.io

Restream allows you to broadcast to multiple platforms at once. It also offers a WordPress plugin for easy embedding.

Sign up at Restream.io, connect your Foscam via RTMP, and use their embed code or plugin to display the feed on your site.

Optimizing Your Foscam Stream for WordPress

Streaming video can slow down your website. Here’s how to keep things running smoothly.

Reduce Frame Rate and Resolution

High-resolution streams use more bandwidth. In your Foscam settings, lower the resolution to 720p or 480p and reduce the frame rate to 15 fps. This improves loading times without sacrificing too much quality.

Use Caching Plugins

Install a caching plugin like WP Super Cache or W3 Total Cache. These reduce server load and speed up page delivery, especially important if you have multiple visitors.

Limit Access to the Stream

If your stream is public, anyone can access it—including bots. To protect your camera:

  • Use a strong password for your Foscam admin account.
  • Enable HTTPS if your camera supports it.
  • Consider using a private page with password protection in WordPress.
  • Avoid displaying the stream URL in plain text if possible.

Use a CDN for High Traffic

If you expect many viewers, use a Content Delivery Network (CDN) like Cloudflare. It caches your content globally, reducing load on your server.

Troubleshooting Common Issues

Even with the best setup, problems can happen. Here’s how to fix the most common issues.

Black Screen or Broken Image

  • Check the URL: Make sure it’s correct and includes username/password if required.
  • Test in browser: Open the stream URL directly. If it doesn’t work, the issue is with the camera, not WordPress.
  • Firewall/router settings: Ensure port forwarding is set up if accessing from outside your network.

Stream Loads Slowly or Buffers

  • Lower resolution/frame rate: As mentioned earlier, reduce video quality.
  • Check internet speed: Your upload speed must support the stream. Use a speed test tool.
  • Use a third-party service: Offload streaming to YouTube or Restream.

Mobile Devices Can’t View the Stream

MJPEG streams don’t always work well on mobile. Solutions:

  • Use RTSP with a plugin that supports HTML5 video.
  • Switch to a third-party service like YouTube, which auto-adapts to devices.
  • Test with different browsers (Chrome, Safari, Firefox).

Camera Disconnects Frequently

  • Check power supply: Use a stable power adapter.
  • Update firmware: Visit Foscam’s website for the latest firmware.
  • Reduce Wi-Fi interference: Move the camera closer to the router or use Ethernet if possible.

Security Best Practices

Streaming your camera online comes with risks. Follow these tips to stay safe.

Never Expose Admin Credentials

Avoid putting your camera’s username and password in public HTML. If you must, use a proxy server or third-party service to hide the real URL.

Use Strong Passwords

Change the default login for your Foscam camera. Use a mix of letters, numbers, and symbols.

Enable Two-Factor Authentication (if available)

Some newer Foscam models support 2FA. Enable it for extra protection.

Regularly Update Firmware

Foscam releases updates to fix bugs and security flaws. Check for updates monthly.

Monitor Access Logs

Review your camera’s access logs to spot unauthorized login attempts.

Conclusion: Get Your Foscam Stream Live on WordPress

Streaming your Foscam camera to WordPress is easier than you think. Whether you use simple HTML, a plugin, or a third-party service, you now have the tools to display live video on your site. Start with the method that matches your technical comfort level—HTML for beginners, plugins for more control, or streaming services for the best performance.

Remember to prioritize security, optimize for speed, and test across devices. With a little setup, you’ll have a reliable, professional-looking live feed that enhances your website’s functionality.

Don’t forget to bookmark this guide for future reference. And if you run into issues, the troubleshooting section has you covered. Now go ahead—get that Foscam stream live and start sharing your world in real time.