This project has moved and is read-only. For the latest updates, please go here.
Project Description
This is a Library and Demo WPF program for controlling MJPEG and HD models of Foscam IP PTZ (Pan-Tilt-Zoom) Cameras and displaying MJPEG and H.264/RTSP video


Motion and Zoom (where available) Control: both MJPEG and HD Foscam camera models

Alternative is to use ONVIF (see port settings in the camera browser-based configuration pages).
Can use OZEKI ONVIF IP Camera SDK for C# (commercial -,
or use opensource code from ONVIF Device Manager (ODM -,
or can develop your own code using Web Services (WSDL/SOAP) using the WSDL definitions available
at http:// (note that not all cameras support the latest ONVIF spec)

Video: both MJPEG and HD Foscam (using RTSP+H.264) camera models

Uses xZune.Vlc - (via NuGet package - see note below on copying the native VLC libraries from that repository for your executable to find)

MJPEG part is based on information and code from this article:


Edit MainWindow.xaml.cs:

uncomment this to use a Foscam HD Camera model instead of an MJPEG model

private const string CAMERA_URL = "http://cameraAddressAndPort";
change to IP or DNS name and port (say http://someIPaddress:somePort) for the camera

private const string USERNAME = "username";
private const string PASSWORD = "password";
change to camera username and password respectively

When using FOSCAM HD CAMERA setting, the VLC libraries have to be placed in a "LibVlc" subfolder, located in the same folder as the application executable (the bin\Debug folder when using Visual Studio).
Can override that path using an optional parameter passed to FoscamHDVideo class constructor (there is also an extra optional parameter at that class for VLC options)
That subfolder can be copied from the repository available at

Change History
  • Newer versions
by George Birbilis /
- see changes at
  • 20130604
by Chris van Beek /
- Original sample app for Foscam MJPEG models

Last edited Aug 26 at 12:52 AM by Birbilis, version 50