Atom Feed
Comments Atom Feed

Similar Articles

2015-01-04 14:50
DBPower (MayGion) 720p P2P IP Camera with Linux & Zoneminder
2009-09-19 20:14
CCTV IR Illuminators on the cheap
2008-11-23 09:11
Photography HOWTO 2: Understanding Exposure
2016-01-21 10:37
Orvibo S20 (Wifi Power Socket) Utility
2018-05-15 16:48
Raspberry Pi Camera, IR Lights and more

Recent Articles

2019-07-28 16:35
git http with Nginx via Flask wsgi application (git4nginx)
2018-05-15 16:48
Raspberry Pi Camera, IR Lights and more
2017-04-23 14:21
Raspberry Pi SD Card Test
2017-04-07 10:54
DNS Firewall (blackhole malicious, like Pi-hole) with bind9
2017-03-28 13:07
Kubernetes to learn Part 4

Glen Pitt-Pladdy :: Blog

TENVIS Camera with ZoneMinder (Linux or Mac setup)

TENVIS produce a range of IP cameras with Wifi and some with PT (no Z), but what is most extraordinary is the prices - they really are low. You can get a basic fixed Wifi IP camera at 640x480 resolution for around £35 all in on eBay.

If you have worked with the high resolution AXIS IP cams then don't expect the same quality. Build quality is respectable with TENVIS, but the optics and size of the sensors, plus the high resolutions available with AXIS put them a cut abover everyone else. If you are monitoring a large area and want to be able to identify a complete stranger at a distance from the cameras then high end AXIS cams are the way. If you want to check who's been at your front door or which of the neighbour's cats is coming through the cat flap then cheap TENVIS cams may well do the job. With Wifi they are also ideal for putting where it would be inconvenient to run network cables like in garden sheds, carports, etc.

Initial Camera setup.... without Windows

The manual says that you need to use their Windows only setup tool, but if you do not have a Windows box then they are relatively simple to setup with only a browser. This can also be done with Windows where security and stability concerns of installing third party software are to be avoided.

TENVIS cams do not seem to be configured for DHCP out the box so just checking the DHCP logs isn't going to help though the manual seems to have some conflicting information on that so maybe some models do use DHCP. They come configured on a static IP of on the wired network so the easiest thing to do is to configure a machine (I used a laptop) on another address on that network, say with a netmask of and connect it directly to the camera with a suitable cable.

The next thing to note is that there is nothing listening on port 80 (normal web/http port) so when you point your web browser at the IP address, you get nothing. The web interface in fact runs on port 81 so you need to put into the browser at which point you should get the login box pop up. Depending on the model, Username and Password by default are both admin (all lower case), or Password may be blank, at which point you should be able to choose "Server Push Mode" for or "VLC plug-in Mode" (requires VLC plugin) and then you can configure the Wifi or wired network to an appropriate address.

To stream the video without having to use the admin credentials it's also worth adding a user under "Users Settings" - I added a user of "view" with no password as a Visitor which allows access to the video stream, but you could set a password for the video if you want extra security. Obviously, it's also a good idea to set a suitably strong admin password.

Once you have the device configured for your network and can get into the web interface on it's final address and configuration, it's time to move onto configuring ZoneMinder to use the cam.

Configuring ZoneMinder for TENVIS cam

Rather easy actually! TENVIS provide two resolutions and a number of frame rates to use.

The base URL for MJPEG is http://IPofCam:81/videostream.cgi and we then need to authenticate so add parameters for user and pwd like:


If you have no password then just leave ...&pass= in but with no password after the "=".

Next there are two resolutions to choose from, 640x480 or 320x240. For that add the next argument of resolution with a value of either 8 or 32. For the full resolution our URL now looks like:


Now we need to choose the framerate we want to use and append a rate parameter. There are several speeds to choose from:

0 = full speed
1 = 20 fps
3 = 15 fps
6 = 10 fps
11 = 5 fps
12 = 4 fps
13 = 3 fps
14 = 2 fps
15 = 1 fps
17 = 1 frame every 2s
19 = 1 frame every 3s
21 = 1 frame every 4s
23 = 1 frame every 5s

So for 5 fps which is often enough for basic CCTV usage our URL now looks like:


Put that into your browser and you should get the video stream from the camera.

Neil Martin (see below) points out that using JPEG snapshots is more reliable, and having tested this I am inclined to agree with him For this you can leave out the video specific stuff (FPS) and use snapshot.cgi instead:


Next get Zoneminder Configured - Click "Add New Monitor" and start filling it in:

  • Give it a name
  • Select Remote as the Source Type
  • Choose your function, if you want a motion detected recording then "Mocord"
  • You most probably want the camera Enabled
  • Set the Maximum FPS which is the rate that you will be recording at when idle (no motion detected)
  • Set the Alarm Maximum FPS which is likely to be the same as the rate setting you chose for the URL - this is the rate that it will record at when something exciting is happening
  • You can change the Image Blend as needed depending on your frame rates and application. For applications where there are brief events (eg. someone running past down a corridor) then you may want to shorten this to detect far more brief events

TENVIS Wifi IP Camera ZoneMinder General Setup

Then onto the Source Tab:

  • Remote Protocol of HTTP
  • Remote Mothod of Simple
  • Remote Host Name - put in the Host part of the addres (eg. IP of the camera), with no port
  • Remote Host Port is 81
  • Then the rest of the URL in Remote Host Path, so using our example: /videostream.cgi?user=view&pwd=complexpassword&resolution=8&rate=11
  • Remote Image Colours is 24 bit colour
  • Choose Width and Height matching the resolution chosen - so 640 and 480 for our example

TENVIS Wifi IP Camera ZoneMinder Source Setup

At that point you should have a working TENVIS Wifi IP camera, but beware the usual catches with ZoneMinder of not having sufficient shared memory or free memory for buffers.

The remaining setup is generic stuff that is common to all cameras like the motion detection zone etc.

JPEG errors in logs

One thing that seems to happen if you use the JPEG mode (snapshot.cgi) is loads of errors logged like this:

zmc_m6[6223]: WAR [Corrupt JPEG data: 1 extraneous bytes before marker 0xd9]

These are a hit on performance (extra disk activity - one line per frame per camera) and waste loads of space, not to mention making finding relevant stuff in logs more difficult.

With recent distros that use rsyslogd you can create a config for Zoneminder (say /etc/rsyslog.d/local-zoneminder.conf) with the following in it:

:msg,contains,"extraneous bytes before marker 0xd9" ~

That will cause rsyslogd to ignore lines with the matching text.


Neil Martin Image  2011-12-04 11:43 :: Neil Martin


I have had much better success using snapshot.cgi instead of videostream.cgi as a source image feed. More stable video and less network traffic. Resolution and rate arguments can't be used with snapshot.cgi (set resolution up in the camera's own interface and limit the frame rate with ZM). Essentially ZM repeatedly fetches the image instead of it being pushed out by the camera (or both happens if you're limiting frame rate in ZM and things get messy!). I record/monitor at 2fps and then the alarm FPS is unlimited. When I use videostream.cgi, the saved events would have a lot of frames missing between the idle and alarm states, meaning it was impossible to actually see what triggered the alarm properly or what it was doing for a second or so after being triggered.

If you're limiting the frame rate at the camera end (with the rate argument and videostream.cgi) and don't set a frame rate limit in ZM, I don't think this is as much of an issue.

Marcus Image  2012-02-18 05:57 :: Marcus

Hi Glen,
Which model(s) used in this description?

Glen Pitt-Pladdy Image  2012-02-18 10:10 :: Glen Pitt-Pladdy

I believe the model I have is 319W though so far as I can tell at least many other TENVIS models seem to be running the same firmware so are likely to work the same - see their download page. Firmware version is with UI version on my cam.

JMC Image  2012-05-06 18:40 :: JMC

How do I get ZoneMonitor running on the Mac.  There only seems to be windows versions

Glen Pitt-Pladdy Image  2012-05-06 20:10 :: Glen Pitt-Pladdy

I'm not familiar with any "ZoneMonitor" - this article describes using the camera with ZoneMinder. ZoneMinder works great on Linux and I believe there have been some successes building it for Mac (see though I'm not sure it's useful for anyone other than expert Mac users at this stage.

Chris F Image  2012-05-10 15:35 :: Chris F

Hi Glen,

I recently picked up one of these Tenvis cameras from eBay to use with an iCatcher CCTV installation. The rest of the system is Axis cameras but for £35 for a PT (no Z!) camera I had to have a go! Image quality is pretty good for general use - certainly far better than you have any right to hope for for £35.

One thing is though that iCatcher struggles to pull images from it any faster than 0.5-1fps. I've not (and can't) use Zoneminder but have you had similar issues? I'm using videostream.cgi and the system is receiving images from the Axis cameras (14 of them) at around 5fps or more.

Any ideas?

Glen Pitt-Pladdy Image  2012-05-10 19:00 :: Glen Pitt-Pladdy

I have switched to using the JPEG output (see Neil Martin's comment) which does seem to work better with ZM, but no problem sustaining ~5fps. If you can sustain the frame rate to a browser then it's not the cam to blame. I would suggest doing some basic tests like checking the browser can stream ok, and if you are running the cam on a WLAN then you need to make sure that is configured right as this is a sustained data stream and a flaky network could easily cause disruptions having to re-connect over and over.

Chris F Image  2012-05-11 11:25 :: Chris F


Sound advice re. the JPEG output - I'll give it a try thanks. The camera is on a wired connection - I've found wireless cams to be far too flaky for reliable use in the past - I'll only use them if it's impossible to run ethernet!

I'll report back later.

Chris F Image  2012-05-13 13:37 :: Chris F

Update: Must have been something about how I had the URL setup, or the system it was feeding. I'm now getting a sustained 5.5fps from the camera which is plenty. Just wish it had a wider view angle now...

Great page by the way - info on these cameras on the 'net is relatively sparse.


Glen Pitt-Pladdy Image  2012-05-13 14:07 :: Glen Pitt-Pladdy

That's good news. Glad to hear you found the article useful.

Niranjan Image  2012-12-11 15:32 :: Niranjan

Thanks this worked wonderfully with iSpy as well... I was looking to overcome the motion detection restrictions  with the OOB solution from Tenvis

John Penrod Image  2013-01-01 03:30 :: John Penrod

Thanks for the info Glen.  Used it to setup a couple Tenvis cameras tonight.

Drew J Image  2013-06-03 18:49 :: Drew J


I am having lots of issues trying to get this to work on ZM, I have tried both snapshot and video neither work.

2013-06-03 19:47:39.074420        zmdc        2638        ERR        'zmc -m 1' exited abnormally, exit status 255        
2013-06-03 19:47:39.072084        zmc_m1        4428        ERR        Failed to capture image from monitor 1 (0/1)        zmc.cpp        263
2013-06-03 19:47:39.071885        zmc_m1        4428        ERR        Unable to decode jpeg        zm_remote_camera_http.cpp        1107
2013-06-03 19:47:39.071573        zmc_m1        4428        ERR        Invalid JPEG file structure: two SOI markers        zm_jpeg.cpp        40

Any ideas? I get status idle 0fps


Glen Pitt-Pladdy Image  2013-06-04 06:26 :: Glen Pitt-Pladdy

I would suggest verifying things stage-by-stage. If you put the URL you are using into a browser (make sure you aren't already logged into the camera), do you get an image? Also, what firmware are you using. I'm on the latest firmware for all my cameras, but I believe that there is a new series of firmware (possibly on newer hardware) so there may be something different on that. Break the problem down and verify each part - that's the normal way I solve these thigns.

Drew J Image  2013-06-04 10:08 :: Drew J

Hi Glen,

Thanks for your reply, I have done most things step by step, I have tried everything I can think of. The firmware version I am running is very recent its 1 version off the latest, the url with the user/pass etc works great at all resolutions the snapshot and video stream but for some reason zoneminder wont pick it up. its really odd, I wonder if there are some settings or permission in zoneminder which need adjusting to make it work.

How is your zoneminder setup?


Drew J Image  2013-06-05 19:47 :: Drew J

I have just noticed the vlc part, I don't have server push mode?

Glen Pitt-Pladdy Image  2013-06-05 20:11 :: Glen Pitt-Pladdy

It is possible your user interface is different to my older cameras, but the only thing that matters here is that you can get one the snapshot.cgi (simpler) or videostream.cgi URLs working. As I mentioned, you should just be able to paste the URL you created into a "just started up" browser and get an image immediately, then try requesting it with wget on the zoneminder server. Does it save a valid image file? Does it give an error? What error?

Once you have a URL that you can get a valid JPEG image (or MJPEG video) from the camera then it's very likely that will work with Zoneminder.

Drew j Image  2013-06-09 07:24 :: Drew j

Hi Glex,

Thanks for taking your time to respond. Turns out you were originally correct the latest firmware (1 version up from mine) supports vlc streaming which allows zoneminder to work with the tenvis cams. I managed to get it to work with 1 cam, the other cam bricked itself during he firmware upgrade. Not sure what to do with it as its on the wall and the cables are sealed in the wall :/


John Image  2013-11-21 15:04 :: John


I have tried to use your instructions to configure my IP Camera with no success. I think it might be the ip Camera it self. It uses ActiveX to record thru IE..

Do you know if this will work?

PS I know this Captcha reduces spam but seriously I cant even read the damm thing..

Glen Pitt-Pladdy Image  2013-11-23 09:33 :: Glen Pitt-Pladdy

Hi John,
The Tenvis cams I have seen have 3 ways of accessing the image - ActiveX, Server Push and VLC Plugin. The URLs used here are based on docs from Tenvis at the time of writing, and also match what is used in the Server Push method pages. If your cam doesn't do the Server Push mode like others then yours might not have the URLs to get video/images.

After you have working images from the cam (can be tested in a browser), it's just up to the recording software (in this case Zoneminder) to do it's job.

PS: Yes, I know the Captcha is difficult, but the gap between machines and humans has narrowed. Without it quieter pages like this one would would just be solid spam.

Mahesh Image  2013-11-30 01:23 :: Mahesh

Hi Glen,

First of all, thanks for sharing good information. Have you set-up PTZ control working from zoneminder. By default it lists Axis, Panasonic only. How can we control Tenvis camera from ZM, I mean move etc ?


Glen Pitt-Pladdy Image  2013-12-01 18:38 :: Glen Pitt-Pladdy

I believe there are URLs that can be called for operating the PT (no Z on these cams), but beyond that I've never looked into what is necessary to make PT work.

Bob H Image  2014-02-22 00:20 :: Bob H

I've got a 319W camera with the latest firmware (3.7.20). Like Drew J, I get errors in the log and after a few minutes on mocord or record the video stream goes away and the 'source' turns red. I can switch to monitor and back to mocord and usually the camera works for a few more minutes before quitting again. Browsing directly to the cameras IP the video is there and working fine. What I found is that the problems occur when using 'snapshot.cgi'. I used the following string in 'remote host path' and it works fine although at a max of about 5fps: /videostream.cgi?user=[user]&pwd=[password]&resolution=32&rate=3 (change the user and password to whatever you use). This forces the camera video to 640x480 and even though the 'rate=3' should be 15fps the best I see is an actual 4-and-change fps. Good enough for what I need it for and no jpeg errors in the log.

Glen Pitt-Pladdy Image  2014-02-22 08:28 :: Glen Pitt-Pladdy

My experience with Zoneminder suggests it is fussy with cams. Problems seem to vary - eg. seen CPU struggling with high-res cams, IO seems to always be a sensitive area, and lots of cams and/or high-res cams need lot of memory for buffers and kernel parameters need tweaking to make that work properly.

With myself and friends I've seen massively varying behaviour with Tenvis cams (same model numbers but hardware and firmware is different). Both videostream.cgi and snapshot.cgi work for me, but snapshot.cgi is definitely more reliable for me. I have had to make some optimizations - Zoneminder has needed to be on a separate physical drive initially. Now I have faster drives in RAID10 which works comfortably.

I've also found the choice of filesystem critical - I've had success with Zoneminder on reiserfs for a long time, but some newer filesystems might be better now.

Collin Image  2014-05-26 09:53 :: Collin

Didi you get pan-Tilt configured and working?

Glen Pitt-Pladdy Image  2014-05-26 12:38 :: Glen Pitt-Pladdy

I've not looked at PT functionality (nor have I reason to right now), but looking at the control page with Firebug it looks like via Javascript decoder_control.cgi does the work. Not completely sure what is needed on the ZM side to hook that up, but I'm guessing based on what is there for others it with a little Perl experience (perhaps none if you can mod an existing script) it should be straight forward to implement yourself.

Chris F Image  2014-07-21 20:04 :: Chris F

For what it's worth the software I'm using (iCatcher Console) will operate the PT functionality if you tell it that the Tenvis is a Foscam.

MrC Image  2014-12-23 20:49 :: MrC

Great tutorial, however all I get is a blue video feed and a zoneminder log full of 'Invalid response status 401: Unauthorized'.  
Anyone else see this?

Glen Pitt-Pladdy Image  2014-12-23 22:19 :: Glen Pitt-Pladdy

Blue normally means no signal, and the fact you are getting "Unauthorized" errors suggests that possibly credentials are the problem. Make sure you have a "view" user and make sure you put the password where it says "complexpassword" in the URLs.

You should also be able to just visit the URL in a browser to test before configuring it in Zoneminder.

Massimo Image  2015-01-13 13:13 :: Massimo


I apologize if my post may be off topic. In this case I would appreciate if you could point me to the right forum if you know.

By mistake I uploaded a meaningless file at the location of the webUI the result was that I could not accede to my cam any longer from a web browser. However, the FW is still there and I can see the image if I use the app from my mobile or even the link you mention above ( http://IPofCam:81/videostream.cgi?user=view&pwd=complexpassword)

Is there any other way to upload the webUI?


Glen Pitt-Pladdy Image  2015-01-13 22:47 :: Glen Pitt-Pladdy

It is probably better to ask the manufacturer or check if they have a recovery tool. But since this may be interesting to other visitors, if you are sufficiently technical then, I do have a little experience on another cam that is easy to get into (open telnet). These cameras seem similar so there is a chance this might work.

The "firmware" on the other camera is in fact just the application that controls the camera and web server and if that failed the camera would likely be bricked. The UI (or HTML) on the other camera is just html files and images for the web interface.

The updates are done by uploading (POST) a file (input type "file" and name "file") to "upgrade_firmware.cgi?next_url=reboot.htm" for firmware/application or "upgrade_htmls.cgi?next_url=reboot.htm" for UI/html. If you are sufficiently technical and don't mind taking a risk of breaking things worse then you could use curl (or similar) to simulate the file uploads.

Note: Identity details will be stored in a cookie. Posts may not appear immediately