News:

Registered a URL and setup a forum as the IPCam stuff really needed its own site vs my irregular blog posts about IPCam hacking at http://www.computersolutions.cn/blog

Author Topic: Foscam CGI Examples For H.264 and MJPEG based Cameras and Clones  (Read 38850 times)

  • ***
February 01, 2014, 03:48:12 am
Any IP Camera owner can optionally easily get and use All my many different IP Camera examples bundled together with one hour of one-on-one support to implement them. Save Time and Money Click Here!

These are ALL FREE and easy to modify and change as needed. They can also easily be modified to work with different IP Camera brands and models and clones as well.

References

Current MJPEG and Older Foscam H.264 Camera Models CGI SDK ("FI9820W and before"):

http://foscam.us/forum/cgi-api-sdk-for-mjpeg-h-264-camera-t2986.html#p13630

Current H.264 Camera Models CGI SDK ("FI9821W and after"):

http://foscam.us/forum/cgi-sdk-for-hd-camera-t6045.html#p28979

Foscam Firmware Download Page:

http://www.foscam.com/down3.aspx

Note: It's always best to make sure whatever Foscam IP Camera you will be using for these examples has the most current firmware installed. There maybe performance issues with cameras that are not running the most current firmware for a Foscam Camera model. So, you may wish to check what firmware your Foscam Camera currently has installed and see if it's the latest for that Foscam Camera model and hardware version of that model.

Foscam U.S. Demo Cameras:

http://foscam.us/live_demo

Foscam China Demo Cameras:

http://www.foscam.com/links.aspx

Note: Any of the examples below, can also be used with the Foscam demo cameras show above. So that if you wish to see how one Foscam IP Camera model compares to other Foscam IP Camera models. You can "Try Before You Buy". By simply using the IP Address or DDNS and port for the camera in question, with the User Id and Password shown at the Foscam demo pages above, with any of the examples below.

This allows you to not only test the Foscam IP Camera models Standard User Interface from the above demo cameras, but to also be able to test the Snapshot quality, Video and Audio quality of real-time access and recording qualities of specific Foscam IP Camera models. Prior to purchase, as well as using these examples, for IP Cameras you already have.

FFMPEG:

http://ffmpeg.org

Example #1 For ALL Foscam MJPEG Cameras and Clones

Works with All Foscam MJPEG camera models or their clones. Using any Internet browser capable device including computers, tablets, phones, TVs, which are using any operating system and any browser. It has many features and configuration options. Different controls show for different Camera User Levels. Admin, Operator and Visitors. The below Live Demo shows all Camera Operator User Id Level Controls Enabled. Any control can be disabled, using configuration options. Controls are only displayed when the Cameras User Id Level is Operator or Admin.



Please Click on the images above and below or here for more details and a Live Demo: http://foscam.us/forum/free-generic-browser-interface-for-foscam-ip-mjpeg-cameras-t2522.html#p10970

Example Sized To Fit Here - Click Picture for Live Demo

Example Sized To Fit Here - Click Picture for Live Demo

The above, can also be located on a website as well and also be used to display multiple cameras, at the same time. By simply creating a copy of the above, for each camera and inserting it into a IFRAME in the same webpage. With specific configuration options for each copy.
 
Please note: The FPS rate is more a throttle of a maximum to not exceed then a promise that the camera can reach that rate. This allows you to better control bandwidth. The FPS rate can be a default and hidden or selectable based on your configuration settings of the Interface.

Infinite Zoom. Simply left-click on the IP Cameras image to zoom and double left-click to reset to normal image size. Zoom percentage, per click, is a configurable option and zoom can be disabled as well. The above Live Demo is using a 50 percent Zoom per click percentage.

Statistics for FPS ("Frames Per Second") and BPS ("Bytes Per Second") rate displays, can be enabled/disabled in configuration options.

Prompt for logon credentials can be used or auto-logon can be used as a configuration option.
 
There is also an optional timer. So that after x time, anyone using this, is sent to another web page. This feature is used and set to 5 minutes, in the above Live Demo.

You can make many copies using different configuration options for specific devices and or uses. For the same or different cameras.

Example #2 For ALL Foscam Currently Being Sold H.264 Cameras

Works with All Foscam H.264 camera models, which are currently being sold. Using any Internet browser capable device including computers, tablets, phones, TVs, which are using any operating system and any browser.


 
Please Click on the images above and below or here for more details and a Live Demo: http://foscam.us/forum/free-generic-browser-interface-for-foscam-fi9821w-cameras-t4341.html#p20338

Example Sized To Fit Here - Click Picture for Live Demo

Example Sized To Fit Here - Click Picture for Live Demo

The above can be set to the resolution of your choice, FPS ("Frames Per Second") rate of your choice and any controls shown can be disabled by configuration options to display or not display. Controls will only work when the Cameras User Id Level is Operator or Admin.

The above, can also be located on a website as well and also be used to display multiple cameras, at the same time. By simply creating a copy of the above, for each camera and inserting it into a IFRAME in the same webpage. With specific configuration options for each copy.

Please note: The FPS rate is more a throttle of a maximum to not exceed then a promise that the camera can reach that rate. This allows you to better control bandwidth. The FPS rate can be a default and hidden or selectable based on your configuration settings of the Interface.

Infinite Zoom. Simply left-click on the IP Cameras image to zoom and double left-click to reset to normal image size. Zoom percentage, per click, is a configurable option and zoom can be disabled as well. The above Live Demo is using a 50 percent Zoom per click percentage.

Statistics for FPS ("Frames Per Second") and BPS ("Bytes Per Second") rate displays, can be enabled/disabled in configuration options.

There is also an optional timer. So that after x time, anyone using this, is sent to another web page. This feature is used and set to 5 minutes, in the above Live Demo.

You can make many copies using different configuration options for specific devices and or uses. For the same or different cameras.

Example #3 For ALL MJPEG & H.264 Foscam Cameras Currently Being Sold For - Windows FFMPEG Play/Record Cameras

Using FFMPEG. Can Play in Real-Time, Play recorded files and also Record using ANY combination during playing or recording of: Video Only, Video and Audio, Audio Only. For ALL Foscam camera models using FFMPEG which is included, using a single click. VLC and NO other Media Player is required. A copy of FFMPEG is included with this tool. There is nothing else required to install to use this tool.

Please Click on the image below or here for more details: http://foscam.us/forum/free-tools-that-work-with-all-foscam-camera-models-t7258.html#p34609

Example Sized To Fit Here - Click Picture for Details

Example Sized To Fit Here - Click Picture for Details

Easy setup. Simply configure Cameras IP Address or DDNS with Cameras Port, Cameras User and Password and it's INSTANTLY ready to use for ANY Real-Time Camera Play or Recording use, in both cases, using any combination of Video Only, Video with Audio or Audio only, for ANY Foscam camera Models both MJPEG and H.264 models. Using a single click on the appropriate .bat file to play or record from the camera Video Only, Video with Audio or Audio only.

Detailed logging is provided for recordings so that you can troubleshoot issues if needed.

Logs and recording files are automatically reused so that there is no file clutter and file management required. Most recent log for type of recording and most recent recording for type of recording is saved. This minimizes folder cleanup.

You can copy the folders and create a folder for each camera if needed and create Instant shortcuts on your desktop to record and play each camera you have, using a single click. Retaining most recent logs and recordings, per camera, per recording type.

Of course, you can modify this to retain all logs and recordings, if needed very easily.

This concept can be easily ported to Linux or Mac using the appropriate scripting languages for them. Since this is based on Windows .bat files and cmd.exe. Since there are FFPMEG versions for Linux and Mac.

Note: VLC is based on FFMPEG. IMHO FFMPEG has more command line options as well as less system overhead. Which makes this more easily modified as needed and uses less system resources when used.

See Attachment: You must be logged in here to see the attachment in this post. Normally Foscam MJPEG cameras don't save recorded video with audio. Seek can also be used to move backwards/forwards in the video as well. Which is NOT possible when using the videostream.asf CGI command with the Foscam MJPEG cameras when using VLC as an example to save a recording. The tool enhances audio automatically when recording by using a better audio codec.

Again. The tool can also record video only and audio only as well. For both H.264 and MJPEG Foscam camera models.

File recording size when using FFMPEG to record IP Cameras, is very small. As small as 1.8 MB for video with audio per 30 seconds of recording time at a 640*480 MJPEG camera resolution. The attachment included in this post ("Which you must be logged in here to see") shows a MJPEG camera .mpg recording file that was recorded with both video and audio using this tool. No real sound was present at the time of the recording. So all you will hear is some background noise. But at least you can see and/or hear, what's possible when using this tool. For your Foscam MJPEG and H.264 IP Cameras.

While this tool handles both H.264 and MJPEG Foscam camera models. This is just one example of the power of these tools. The tool also supports using both the Main and Sub video streams for Foscam H.264 cameras.
 
Don

About Me: http://airforce.togetherweserved.com/usaf/servlet/tws.webapp.WebApp?cmd=ShadowBoxProfileByName&displayName=TheUberOverLord
« Last Edit: December 28, 2014, 09:35:06 am by TheUberOverLord »

  • ***
July 13, 2015, 09:36:33 pm
Live demonstrations of using Hikvision Network IP Cameras in web pages on websites with PTZ ("Pan/Tilt/Zoom") and Preset controls. Which are compatible with any Internet browser capable devices using any Operating System and browser. No browser plugins or media players are required to ever be downloaded and/or installed at anytime.

Two new Hikvision live demonstrations using this Interface:



Nothing about the Network IP Cameras are exposed when using any of the examples below. No IP Address, No DDNS, No Port or User Credentials.

Time limits can also optionally be imposed to use a button to prompt to continue after a set period of viewing time of your Network IP Cameras has been reached and/or to jump to another web page on your website. To better help limit bandwidth usage and/or abuse.

Two Hikvision live examples with PTZ, Presets and Zoom lenses: Indoor Outdoor ("Using 4 and 3 second interval delays respectively")

You can also optionally require mandatory User credentials using the values of your choice to access the Network IP Cameras on your website by your website visitors. Same Network IP Cameras and delays as above, User: admin Password: admin Indoor Outdoor

HTTPS vs. HTTP can be used as well. Please note that the test server being used for these examples is using a self-signed certificate so you will see a warning when using these example HTTPS links. Same IP Cameras and delays as above:

Secure Indoor Secure Outdoor

User: admin Password: admin Secure Indoor Login Required Secure Outdoor Login Required

Example: Google is now ranking websites that use HTTPS higher than websites that use HTTP:

Google Starts Giving A Ranking Boost To Secure HTTPS/SSL Sites

The total number of lines of code is less than 200 lines for both the client ("Browser side") and web server side combined, to provide all the functionality you see shown here using these examples.

Of course the delays being used in the examples can be removed and the default Network IP Camera images can be larger than the examples used here. You can use the PTZ and Preset controls with live full-motion video or use automatic refreshed images as the examples are using here in your web pages on your websites.

Any Hikvision Network IP Camera that has a RS485 interface can also use add on horizontal pan brackets for Hikvision Network IP Cameras that don't/didn't support PTZ when you purchased it. Like these examples:

http://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20150530165206&SearchText=camera+bracket+Electrical+Rotating+255+degree+RS485
« Last Edit: July 20, 2015, 08:52:37 pm by TheUberOverLord »