Beds Garden Wildlife

Technical - HD Cameras

From late 2014 I have began to introduce HD cameras into the garden to gradually replace the analogue cameras I’ve been using for a number of years. The case for HD cameras is simply quality, they give much better pictures! However, up until recently the costs (for me) have been prohibitive but, as with most technology, prices tend to drop in time and now HD cameras are available as cheaply as analogue ones. That said, ‘brand’ name cameras are still expensive so I have tended to look to eBay to keep my costs down.

 

I currently have 4 HD cameras connected to my system – bird bath, bird table, bird feeder and night feeder. These are all connected by 30/40m Cat 5 cables to my PC router. My mouse camera is not currently HD but I plan to make it HD soon.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Most HD cameras will come with software which will need to be installed on your PC to enable basic monitoring of your camera. This is all you will need in its simplest form. This packaged software is often rather simple and crude, I use a more sophisticated CCTV monitoring package called Blue Iris to record images from my cameras - it's available here.

 

If you want to put your cameras on the internet like I have, it’s not so simple! I don’t pretend to be an expert and it’s been a long learning curve which I’m still on, but here are a few things I’ve learnt along the way! I’m afraid it’s not a step by step installation guide and it is not exhaustive, but I hope it will help reduce the time it took me to get this far!

 

So, a few tips -

 

1. Make sure you get a suitable camera – 720p is HD, full HD is 1080p. 1080 gives the highest quality but uses more internet data and is mostly suitable for fastest internet connections. I have decided 720p is a fine compromise. I have 3 of theses and one 1080p. Compression MUST be h.264 to be compatible with JW player.

 

2. You’ll need to know your cameras IP address - this is either on a label, in the documentation or visible via the software that comes with the camera.

 

3. The camera will send the out the video data in a stream call an RTSP string. This will be in a format similar to this –

rtsp:// 192.168.1.121:554/user=’admin’_password=’password’/live1.264

 

Where 192.168.1.121 will be your cameras IP address, and ‘admin’ and ‘password’ will be the user and password names for the camera

 

Note: this string will NOT work for your camera!!

Each camera manufacturer comes with its own unique rtsp string format. If you chose a ‘brand’ name like Vivotek this will come with the documentation – simple! If you (like me) you choose cheaper cameras you’ll need to search the internet. A good source I’ve found is Ispy’s IP camera database avaiable here.

 

4. Test your rtsp string using VLC player – available here. Once installed, click ‘Media’ then select ‘open network stream’ type in your rtsp string precisely and hit play! If it plays well done! If it doesn’t check the string or try a new one! Until this works there is no point in proceeding.

 

5. To display your stream live on your website you’ll need to embed a player. The universally used one is JW player – we’ll discuss this later. Unfortunately, and some may say, ‘of course’ JW player like most players won’t accept the rtsp format from your camera! They need RTMP format! So you’ll need to download a converter program. The one I use is Unreal Media Server – available here. It allows 5 free streams to be broadcast. To set up Unreal Media Player use this link here. This program will run in the background of your PC. To make your streams available 24/7 you’ll need to make sure your PC is always on and the power settings are set to never sleep. Note Unreal Media Server plays on port 5119 by default. Unreal Media server will need to be allowed through your firewall (inbound), this is done by control panel - security and settings - firewall - allow program through firewall. Port 5119 will also need to be 'port forwarded' to allow access beyond your network. This can be done through your router settings.

 

6. JW player publisher wizard is available here. Enter your rtmp string from your Unreal Media Player and press the play button. All being well, it should play. To get the embed code you’ll need to sign up to JW player. The simple version is free to use. Once you have the embed code it is simply a case of embedding the full code into your website using your website editor (no need to install in the root/header of your website). Note the IP address in your rtmp string will need to be changed from your local IP address (192.*.*.*) to your internet IP address (find it by typing ‘my ip address' into Google search) also note that if your IP address is dynamic (as opposed to static) it may or will change. Therefore you’ll need to set up a dynamic DNS name – available here.

 

Here is a sample of the code in my set up -

 

<script src="http://jwpsrv.com/library/NPUWGtRzEeOA+iIACi0I_Q.js"></script>

<div id='playerfZAIMfFjVEli'></div>

<script type='text/javascript'>

   jwplayer('playerfZAIMfFjVEli').setup({

       file: 'rtmp://youripaddress:80/live/livestream',      *see note below about this line

       width: '640',

       height: '360',

       primary: 'flash'

   });

jwplayer().onReady(function(){

setTimeout(function(){

jwplayer().setControls(false);

jwplayer().stop();

},600000);

});

</script>

 

*note - youripaddress = your internet ip address or dynamic DNS name, 80 is the player port from Unreal Media Server if changed from the default of 5119, /live is necessary to tell jw player it's a live stream, /livestream is the live broadcast alias you set in Unreal Media Server.

 

This code includes a 10 minute time out loop whereby the stream will cease. This stops anyone from leaving the stream running indefinitely consuming your bandwidth. They will have to refresh the page to resume. The variable for 10 minutes is 600000, that is 300000 will give 5 minutes etc.

IMAG0095 IMAG0094 IMAG0090 IMAG0091

Bird bath cam

Bird feeder cam

Bird table cam

Night cam

I have recently updated my camera streams to run using HLS. This allows my cameras to be viewed across all platforms i.e. PCs, Ipads, mobiles and tablets. It also allows my cameras to be viewed by PCs behind a proxy server which a lot of coporate organisations use. I hope to update this page soon to show how I achieved this.

March 2016.