Giter Club home page Giter Club logo

cameraproxy's Introduction

Camera Proxy

Camera Proxy is a Windows Service which acts as a "smart" proxy for IP network cameras. Uses the .NET framework and parts of the VLC media player libraries.

The service runs a simple embedded HTTP(S) server and is compatible with practically any browser.

Camera Proxy

Who is it for?

The service is for programmers and very computer literate people who want:

  • a single point of access to view all their network cameras either locally or via the internet
  • to provide live webcam views to others on the internet without giving them direct access to any cameras. Many IP network cameras have serious security flaws and should not be publicly accessible.
  • to reduce the network and CPU load of a camera that has multiple simultaneous viewers (the proxy service only creates one user's worth of load on the camera)

A readme file is included in the source and binary distributions to aid in initial setup, but most setup is done through the web interface.

What cameras does it support?

  • Most cameras that can provide jpeg still images or an mjpeg stream via HTTP are supported natively and very efficiently. Http authentication is supported.
  • Using the vlc_transcode camera type, you can add virtually any camera to the system as long as it is viewable in VLC media player. This option uses much more CPU and memory, however. It is best to use jpeg or mjpeg based inputs whenever possible.
  • Experimental support for proxying full rtsp / h264 streams using live555 and the VLC web plugin. Results may vary.

What PTZ cameras can it control?

  • Nearly any PTZ camera can be controlled by using Custom PTZ Profiles.
  • A small handful of PTZ cameras have PTZ support already built in.

Can I password protect the service?

Yes. A simple (and optional) authentication scheme is in place. Cameras have a permission level from 0 to 100 and so do user accounts. If the user's permission level is less than the camera's permission level, the user cannot view the camera.

What else can it do?

  • The base functionality (not including h264 / rtsp options) now works under Linux with the Mono framework.

  • The service can re-encode imagery on-the-fly to JPG, PNG, and even WebP formats at any size and quality you specify in the URL. Note that re-encoding images requires quite a lot of CPU time. Here is a Guide to Image URLs.

Why?

Most software NVRs can do everything this does and a lot more. The difference is this is free and open source. It is also very efficient with CPU and memory if your cameras support jpg or mjpg transmission via HTTP, as almost no image processing will be required.

How to Use

Download from here: https://github.com/bp2008/cameraproxy/releases

Then, please see the Setup Guide

How to Build

If you want to build from source, use Visual Studio 2017. You'll also need my BPUtil library on your PC.

cameraproxy's People

Contributors

bp2008 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cameraproxy's Issues

HTTPS Setup

Hi, I'm trying to get https set up.
I had it set up for 1.3.8 but updating to 1.7 I'm not sure where to set it in the config (in the cfg file?).

Would appreciate it if there could be pointers. Many thanks.

RTSP streams requiring password

Is there a way to specify a password required for an RTSP stream? I have some IP cameras to integrate to that won't seem to do unauthenticated RTSP streams

If camera doesn't support Mjpeg or jpeg can use other?

Sorry bother, not sure where to ask this, I know there is no new development happening, but I'm excited to try this program out. I've been unsuccessful in adding my hikvision or dahau cameras using Jpeg snapshot or mjpeg, not sure if they support it, can I use the RTSP instead? More overhead for the CPU right? how about for clients connecting to the cameraproxy, will the output be only jpeg or mjpeg, there is no other output stream available, correct?

Thanks so much
Jerry

Global Throttled Stream


Exception thrown at 16.09.2017 19:12:46
System.IO.IOException: In die Übertragungsverbindung können keine Daten geschrieben werden: Eine vorhandene Verbindung wurde vom Remotehost geschlossen. ---> System.Net.Sockets.SocketException: Eine vorhandene Verbindung wurde vom Remotehost geschlossen
bei System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
bei System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
bei System.Net.Security._SslStream.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
bei System.Net.Security._SslStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
bei System.Net.Security.SslStream.Write(Byte[] buffer, Int32 offset, Int32 count)
bei BPUtil.SimpleHttp.GlobalThrottledStream.ThrottlingManager.ThrottledWrite(GlobalThrottledStream stream, Byte[] buffer, Int32 offset, Int32 count) in C:\Users\brpea\Source\Repos\BPUtil\BPUtil\SimpleHttp\GlobalThrottledStream.cs:Zeile 342.
bei BPUtil.SimpleHttp.GlobalThrottledStream.Write(Byte[] buffer, Int32 offset, Int32 count) in C:\Users\brpea\Source\Repos\BPUtil\BPUtil\SimpleHttp\GlobalThrottledStream.cs:Zeile 76.
bei System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
bei System.IO.StreamWriter.Flush()
bei MJpegCameraProxy.MJpegServer.handleGETRequest(HttpProcessor p)


Exception thrown at 16.09.2017 19:12:47
System.IO.IOException: In die Übertragungsverbindung können keine Daten geschrieben werden: Eine vorhandene Verbindung wurde vom Remotehost geschlossen. ---> System.Net.Sockets.SocketException: Eine vorhandene Verbindung wurde vom Remotehost geschlossen
bei System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
bei System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
bei System.Net.Security._SslStream.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
bei System.Net.Security._SslStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
bei System.Net.Security.SslStream.Write(Byte[] buffer, Int32 offset, Int32 count)
bei BPUtil.SimpleHttp.GlobalThrottledStream.ThrottlingManager.ThrottledWrite(GlobalThrottledStream stream, Byte[] buffer, Int32 offset, Int32 count) in C:\Users\brpea\Source\Repos\BPUtil\BPUtil\SimpleHttp\GlobalThrottledStream.cs:Zeile 342.
bei BPUtil.SimpleHttp.GlobalThrottledStream.Write(Byte[] buffer, Int32 offset, Int32 count) in C:\Users\brpea\Source\Repos\BPUtil\BPUtil\SimpleHttp\GlobalThrottledStream.cs:Zeile 76.
bei System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
bei System.IO.StreamWriter.Flush()
bei MJpegCameraProxy.MJpegServer.handleGETRequest(HttpProcessor p)

Unable to get Pan/Tilt functioning with Amcrest Cam and CustomPTZProfile

Hey,

I've been trying to get the Pan/Tilt to work on an Amcrest Camera (model: IP2M-841) on and off for the last couple weeks. I can make the camera move with via the 'API' calls in a browsers, but not with a CustomPTZProfile.

It always fails with this:

Exception thrown at 6/4/2017 11:53:10 PM
Additional information: SimpleProxy URL: http://192.168.0.101/cgi-bin/ptz.cgi?action=start&channel=1&code=Up&arg1=0&arg2=1&arg3=0
System.Net.WebException: The remote server returned an error: (401) Unauthorized.
   at System.Net.HttpWebRequest.GetResponse()
   at MJpegCameraProxy.SimpleProxy.GetResponse(HttpWebRequest webRequest)
   at MJpegCameraProxy.SimpleProxy.GetData(String url, String user, String password, Boolean keepAlive, Boolean allowErrorLogging)

Working API call is:

http://192.168.0.101/cgi-bin/ptz.cgi?action=start&channel=1&code=Up&arg1=0&arg2=1&arg3=0

After sending the above line in a browser, it asks for authentication details.

Do you have any suggestions regarding this?

Thanks!

System.Net.Sockets.SocketException on Mono

I'm attempting to get this working through Mono in a docker container, but get a continuous stream of exceptions like the one below. Functionality is fine, but the constant error logging is sucking up memory over time.

Exception thrown at 04/29/2017 01:11:28
System.IO.IOException: Write failure ---> System.Net.Sockets.SocketException: Connection reset by peer
  at System.Net.Sockets.Socket.Send (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags) <0x40f64820 + 0x000e7> in <filename unknown>:0 
  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) <0x40f64630 + 0x000a7> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) <0x40f64630 + 0x0011f> in <filename unknown>:0 
  at System.IO.StreamWriter.Flush (Boolean flushStream, Boolean flushEncoder) <0x2af3d3e3fda0 + 0x000fa> in <filename unknown>:0 
  at System.IO.StreamWriter.Flush () <0x2af3d3e3fd70 + 0x0001f> in <filename unknown>:0 
  at MJpegCameraProxy.MJpegServer.handleGETRequest (SimpleHttp.HttpProcessor p) <0x40f3dda0 + 0x00c1a> in <filename unknown>:0 

No idle timout

Is there any way to have the web page not timeout and show the video indefinitely?

Session Length?

Hi - I have this installed and running well. I had a query around Session Length - I have set this for a user to 0 which means that it shouldn't persist beyond the current request. For a simple .html page which shows the camera feed - permission is set to 100. I can authenticate and view this, closing the browser off or accessing it again, loads the page without login. Any reason why or do you have a pointer on how to handle this? Thanks

VLC transcode generating slightly corrupted images

Hi, once again :)

I'm testing a windows based CameraProxy setup (both 1.6.4 & 1.7) reading a 1280x720 rtsp h264 stream from a Hikvision DS-2CD2622FWD-IZNS camera.

The problem is that some images (occurs sometimes, not always) get a slight but still annoying shift, particularly on moving objects.

The camera connects directly to the PC via a dedicated ETH interface. The PC running CameraProxy is a Intel Core i5 4200U - 4GB and the proxy & camera setup is as follows:

CameraProxy camera settings
Hikvision Settings

Examples images (Check the cars):
http://imgur.com/a/WyU0W
http://imgur.com/a/kFF4W
http://imgur.com/a/jCG4x

I tried to increase the buffer time and lowering transcode frame rate limit but had no luck with these.

Any ideas on what could be causing this behaviour ?

Sorry for every report, I think this project is a great contribution to the open source community and that's why I care about it and want it to be better every day.

Still maintaining this?

Hi there, do you still maintain this? Or know of a better solution if not? Looking for this exact thing. :-) thx

System.Net.Sockets.SocketException

Server was running exceptionally for a week or so. rebooted the cameraproxy service after rebooting computer, and it crashes every time I try to start it now.

This is the error that I am getting, and it errors out with "unhandled exception" for both the GUI and the cmd applet.

System.Net.Sockets.SocketException (0x80004005): Only one usage of each socket address (protocol/network address/port) is normally permitted.

BPUtil Assembly missing

Hey!
I´m trying to run cameraproxy with mono in ubuntu 16.04, but when running mono MJpegCameraProxyCmd.exe I get an assembly missing error

I saw the notice to add BPUtils for building CameraProxy from source, but as I´m just trying to run it, I think something is missing. Shouldn't this assembly be included in the release?

Here's the error
$ mono MJpegCameraProxyCmd.exe Unhandled Exception: System.TypeLoadException: Could not load type of field 'MJpegCameraProxy.MJpegWrapper:httpServer' (1) due to: Could not load file or assembly 'BPUtil, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. assembly:BPUtil, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null type:<unknown type> member:<none> [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type of field 'MJpegCameraProxy.MJpegWrapper:httpServer' (1) due to: Could not load file or assembly 'BPUtil, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. assembly:BPUtil, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null type:<unknown type> member:<none>

What do you think? Thanks!

JQuery reference not from inside the project

Hi, I tried to compile the project to fix a jquery reference problem, but was unable to compile the project.

So is it possible to reference the jquery from inside the *.cam class to the scripts folder as it was intended for this purposes?

The line that needs to change is:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script>

The reason for this is, I like to use it in a close environment which does not have internet access. And needs to reference the jquery that is stored in the directory.. and not to the one on the web.

Can someone please help me with this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.