Optimizing Your Camera for Smooth Streaming: Everything You Ever Wanted to Know in 1262 words

You’re here because you need your camera to be streaming properly. We get that, so let’s skip the usual opening chit-chat and get straight to business.

Ready? Let’s go.

When configuring your camera stream, your main goal is clear: to find the best possible streaming quality while keeping your Internet connection limits in mind and then to provide a satisfactory quality / bandwidth ratio for your viewers (note that some of them will be watching your stream on their mobile devices).

We would love to tell you that things are very much straightforward and there’s one single most important attribute of any stream that you should focus on. Unfortunately, that’s not the case.

What matters most is the purpose of the stream. Are you going to broadcast a live stream from a concert? Or are you interested in streaming “just” for security reasons? Once you’ve determined this, there are three key attributes of your stream that matter most.

Resolution

You likely know a thing or two about this, but let’s sum it up anyway. Repetition has never killed anyone, right?

The optimal resolution which delivers a high-quality stream is 1280×720 pixels. You and your viewers should be fine with that. However, if you start experiencing connection issues, lower it right away to keep the stream running smoothly – ideally to VGA resolution, which is 640×480 pixels.

If the opposite is the case, meaning you have a solid Internet connection and want viewers to enjoy higher image quality (in fullscreen, for example), switch to 1920×1080 pixels, that should do. Such resolution is particularly useful when you or your viewers will likely be zooming in when watching the recorded footage.

By now, a question might have popped up in your head. What does “solid” connection really mean? Let’s have a brief look at Internet speeds. If you’re already familiar with this subtopic, feel free to skip to the next chapter titled Compression.

Internet speeds

Your ISP (Internet Service Provider) should be able to tell you what your Internet speed should be. It always includes two numbers:

  • Download (usually the higher number)
  • Upload (usually the lower number)

If you are trying to stream your camera over the Internet, you should mainly worry about the Upload speed, as this is the speed which will limit you in how much data or camera streams you will be able to stream. It is good to measure your real-life speed, for example at www.speedtest.net.

For a 720p camera with h.264 stream, we recommend an upload speed of around 1Mbps, in order to maintain decent video quality. For each additional camera, you would have to multiply that number of course.

All clear so far? Good, let’s move on.

Compression

Compression is the second of the three key attributes of your stream. And – just to give you a heads up – it’s also the point where things start to get a bit nasty, technical jargon-wise. No worries, though, you’ll be fine!

When it comes to compression, you get to choose from three options:

  • MJPEG
  • MPEG4
  • h.264

The most suitable one? Opt for h.264. It consumes a lot less bandwidth than the remaining two while maintaining the same image quality. Interested in details? Read the compression types comparison below. If you’re fine with just knowing that the three options exist, feel free to skip it.

Compression types comparison

MJPEG

+ compatibility
+ supported by most cameras
+ low decoding demands
– consumes significantly more bandwidth than h.264
– lower quality of the stream
– not supported by our recording app
– no audio support

h.264:

+ best widely supported compression type available
+ reduces bandwidth usage
+ high quality picture
+ can include audio
+ can be used with cloud recording app
– higher hardware demands for decoding
– the picture might be temporarily corrupted when packets get lost

MPEG4

– not widely supported (like most platforms, we don’t support MPEG4 either)
– it is a compression similar to h.264 but not as efficient

Along with h.264 comparison, we also recommend you to go for either of these two options:

  • CBR (constant bitrate) set to a lower value than the upload speed of your Internet connection.
  • VBR (variable bitrate) with a fixed maximum value which won’t be exceeded.
    This way, you will decrease the bandwidth when there is no movement in the picture. That proves useful especially when streaming for security reasons.

If you use fixed quality settings, you can run into trouble with your stream when the traffic increases significantly, e.g. at night or when there’s sudden, unexpected movement in the stream, which either exceeds the upload bandwidth or the camera itself can’t handle.

Framerate

Almost there! We’ve already discussed resolution and compression, let’s close it with the third attribute of a stream – the frame rate.

Most cameras allow you to choose frame rate on a scale from 1 to 30 FPS (frames per second). The higher the frame rate (more FPS), the more fluid your streaming is.

Sounds logical, right?

Lower frame rate results in using less bandwidth, but also for a choppy video. We recommend it when there’s not much movement in the picture because then you can save some bandwidth or use the same bandwidth to keep the stream fluid.

Higher frame rate consumes more bandwidth and, not surprisingly, results in a more fluid video. It should be your option of choice when you’re about to stream fast action and a lot of movement. In order to avoid using too much bandwidth while keeping the picture fluid, we suggest lowering the resolution or compression quality.

When streaming for security purposes, it’s usually sufficient to opt for a frame rate of 10 – 15 FPS. Some cameras will even lower the frame rate during nighttime as they increase the exposure time in order to reduce the noise in the picture.

That’s it!

Got what you came here for? Great! Need to go deeper? Leave a comment, our camera guru, Paul, will be in touch.

For those of you who are still hungry for more information, we prepared a glossary with the most widespread expressions you can possibly come across when dealing with streaming and cameras in general. We’ve covered some of them earlier in this blog post, some might be new to you.

The glossary

FPS = Frames Per Second

How many frames per second your camera encodes. It can usually be set to 1 to 30. The higher the value, the more fluid the video is.

CBR = Constant BitRate

Also known as fixed bitrate. The camera will keep the bitrate constant, thus the video quality will vary.

VBR = Variable BitRate

Also known as fixed quality. The camera will keep the quality constant, thus the video bitrate will vary.

GOP = Group Of Pictures

Also known as I-Frame interval, keyframe interval. It can be expressed and set in seconds (1/30 to 2s) or in frames (1 to 60). This value identifies how frequently the keyframe (complete picture) will be used in comparison with predictive frames (incomplete pictures, carrying only data which differ from the keyframe)

More frequent keyframes are used for videos with a lot of motion, which reduces a potential chance of frame corruption. Less frequent keyframes are used for more static videos, where it can significantly reduce the bandwidth or improve image quality while maintaining the bandwidth.

GOV = GOP Compression

Image quality can be set in percentage (0-100) or in steps from low to high. It influences the overall image quality and bandwidth usage.

High value = high quality, high bandwidth usage.

Low value = blocky / blurry image, low detail, low bandwidth usage.

Powerline frequency

It reduces flickering when used in combination with artificial light (fluorescent lamp). 50/60Hz (EU/US), anti-flicker.

OK, now that really is it. We hope we’ve made things clearer to you!

How to save bandwidth without lowering stream quality

There are numerous ways to save bandwidth when streaming video. Most of them, however, have a direct negative impact on the quality of the stream (e.g. lowering bit rate, frame rate or resolution).

Luckily, you can seek out more sophisticated forms of saving bandwidth, ones that have no or very little negative consequences.

The most well known technology is Zipstream by AXIS. It’s supposed to save about 50% of transferred data without lowering the quality of your stream. And our own tests confirm that you can really achieve these savings with AXIS.

Zipstream turns out to be most useful for night scenes and static scenes.

You can turn it on in your camera settings via the Video Stream Settings / Zipstream section. Turn H.264 bitrate reduction to High and turn on Dynamic GOP (Zipstream can only be used with newer camera models).

Other camera manufacturers certainly don’t want to be left behind, so you can check out technologies like Vivotek Smart Stream, Hikvision Smart H.264 and Arecont Bandwidth Saving Mode.

Port Forwarding: The Solid Guide You’ve Been Looking for

It can be a tricky thing, this port forwarding! No worries, though, with this guide you’ll manage to set it up on your camera before your coffee cools down.

Let’s start with a bit of theory to get you warmed up.

It’s your router that matters

Every device, which is a part of your local network, has its own local IP address. To make things interesting (meaning more confusing), this address only works within your local network. Should you want to access your camera remotely, you’ll need a different one. Configuring your router is step number one. Your router has a unique IP address, assigned to you by your Internet Service Provider (ISP).

All incoming communication ends in the router, and if you want to access any device from your local network remotely, you will need to tell the router which device should the request go to.

You guessed correctly: this process is called port forwarding. The following guide will help you get it up and running.

The guide itself

We covered the theoretical basics of port forwarding, now let’s move on and put it into practice. The first thing you need to know is that apart from the IP address, there is an additional form of identification called the port number. It looks like this: 192.168.1.1:554.

This port number lets you access different services (for example a web server, mail server, FTP server, servers for online games, chat clients, etc.) and even more devices (for example different computers within your local network) with the same service using just one public IP address. With an IP camera, you are most likely to encounter HTTP port (80) for configuration access and MJPEG streaming, and RTSP port (554) for RTSP streaming. If your camera supports RTSP (you can find it in its specification sheet), lucky you – it’s the only port you will need to use.

Setting up port forwarding step by step

  • Look up your router brand and model. Each brand and type has a slightly different user interface.
  • Here’s where you find guides for the majority of routers. Just select the brand, the model and correct service type (RTSP for h.264 cameras or HTTP for MJPEG cameras). Feeling lost? You’ll find dozens of video tutorials on YouTube when you search for “port forwarding BRAND MODEL”
  • Generally speaking, the first thing you need to find is your router’s IP address. This is usually to be found on 192.168.1.1; 192.168.0.1; 192.168.0.254; 192.168.11.1, 10.0.0.1. Just simply enter this address into your web browser while you’re connected to your local network, a login screen should pop up. Can’t find it? Please check your network settings. The router address should be defined as “gateway address”.
  • After you’ve logged in to the configuration interface, look up a tab named “Port forwarding”, “Virtual server”, “NAT” or “Firewall”. In this tab you’ll need to specify the following:- public port: 554 (or 554-554 when a range is required)
    – internal port: 554 (or 554-554 when a range is required)
    protocol: TCP and UDP (or ANY, BOTH)
    – IP address: the private IP address of your camera (192.168.x.x or 10.x.x.x)

    Please note that for MJPEG cameras you’ll need to use port 80 instead of 554. Should you be using multiple cameras in one location, each camera will need to have its own unique port. Feel free to contact our support team if this is the case, we’ll do our best to help you out.

  • When you’re done with these configurations, it’s time to verify that everything’s fine and whether the port is open. You can do it in this open port check tool
  • If you’ve managed to open the port (and we certainly believe you have), your camera should now be detected automatically.

Experiencing any kind of problems during the port forwarding configuration process? Feel free to reach out, we’re always here for you!

Streaming and recording images and sound? Of course.

When an IP camera allows for the streaming of sound, it usually uses G.711 audio codec (also known as A-Law or μ-Law). This whole concept has just one little downside — no mobile devices and hardly any desktop devices can play these audio codecs.

The IP camera might have been streaming sound, but you had no way to hear it.

We wanted to do something about this, so we improved the angelcam streaming platform and eliminated the problem. The sound track from your IP camera now automatically transcodes to a codec, which is compatible with all mobile and desktop devices.

Whichever camera you connect to angelcam, you’ll have no problem hearing the sound.

What is the difference between MJPEG and H.264?

 

If your IP camera supports both H.264 and MJPEG, you might be asking yourself: which format should I choose?

Let us help.

The technical side of things
The main difference between H.264 and MJPEG is that MJPEG only compresses individual frames of video, while H.264 compresses across frames.

MJPEG is the compilation of separately compressed JPEGs in a sequence, which leads to high quality outcome in terms of resolution.

With H.264, on the other hand, only some frames are compressed by themselves, while most of them only record changes from the previous frame. This can save a significant amount of bandwidth compared to MJPEG (which encodes each frame as new), but results in a video of lower quality.

H.264 pros/cons
+ reduces bandwidth and storage consumption significantly
+ adaptive video quality based on bandwidth
+ suitable for storage
+ / –  complexity setup – sometimes tricky to set up – streaming quality, frame rate and i frame rate. GOP, VBR, CBR etc.

MJPEG pros/cons
+ consistently great image quality
+ robustness, if one frame is dropped, then it does not affect the video
– no sound
– consumes much more bandwidth and storage
– no storage support at angelcam

In conclusion, when it comes to deciding whether to use MJPEG or H.264, it always comes down to what the consumer is looking for and where the camera is being installed. Although H.264 will be the preferred way for many, MJPEG may be a format of choice for those who seek higher quality with crisp details, but can’t support the H.264 stream.

 

Quick tips on how to set up your camera

 

I was wondering what should be the first thing worth mentioning when installing a camera and then something crossed my mind. The main thing is to plan the installation before you buy any camera because there are different aspects that might render some cameras useless for your application.

So here are the main aspects you should consider when installing a camera:

1. Think of the reason of your camera system, plan in advance, buy cameras later. Simply avoid the troubles with bad choice. Angelcam recommends everyone to consider the conditions first and purchase suitable cameras afterwards. Once you appear in the last step “Purchase the camera” you can check our page with recommended cameras.

2. Identifying your camera on the network is easy when you purchase a camera from a well established manufacturer. You get a tool which will scan your network and find the cameras. In other cases you can check if your camera wasn’t detected as a network device (cameras with UPnP presentation enabled) and if you can’t find it, the you would have to scan your network with for example angry IP scanner.

  • For users who are not using a DHCP server to assign IP addresses automatically in the network, each camera should come with a default IP address which should be specified in the user manual.

3. Always install the camera facing the entrance point (door, windows), having a footage of someone’s back won’t help you with the identification.

  • Be careful though, when monitoring windows and doors, you will usually discover that it is not that simple as it might sound. Usually, inside a building it is quite dark while you get a direct beam of light through the windows or when someone opens the door and most cheap cameras don’t handle scenes with high contrast really well.
  • The easiest option is to look for cameras which do come with WDR (Wide Dynamic Range, also called HDR). The problem is that cheap cameras only have a software WDR which has extremely limited capabilities, simply put, the picture is post processed which makes some objects slightly more visible. So either check if this function is acceptable for your installation or get a camera with hardware WDR. Every experienced security company should be able to point you in the right direction in their portfolio. Here is an example of the difference in Axis cameras.

 

 

  • If you still want a cheap camera, there is a solution as well. After you install the camera, go into the image settings and look for for something like exposure settings. You should be able to leave it in automatic mode and select just the area where the window/door is and exclude it. The camera will then correct the exposure settings only to match the light conditions inside the room and when someone enters it, part of the image will be over-exposed but you will see the face instead of just a dark silhouette. Of course it won’t be perfect, you won’t see anything through the window for example.
  • You can use the exposure configuration in all other cases to force the camera to match only the light conditions in the important areas.

4. Don’t install the cameras too high, always make sure you are clearly able to see a person’s face, not just the head, again, it won’t help you with the identification.

  • When you have selected the position for each camera, measure the horizontal angle of view (you don’t have to cover the whole room, just the important areas. Choose your camera according to your measurements, most cheap cameras come with a lens with a fixed focal length, but you can usually pick from 2-4 specific versions of the same camera, each with a different lens and different view angle. A nice online tool for illustration is here: http://www.theiatechnologies.com/calculator.php

 

You already know how to install an IP camera, here are some tips related to camera settings:

1. Resolution: for most indoor applications, you don’t need more than a 1 MPx (720p) camera, you don’t need to pursue the highest resolution, look for a good image quality instead (light sensitivity in Lux in color and B/W mode).

  • Cameras with higher resolution are usually worse in low light conditions, the same amount of light going through the lens is divided to more pixels. It isn’t the universal truth however, budget cameras with higher resolution tend to use next generation sensors, so keep an eye on the datasheet.

2. Frame rate: if it is possible, use the highest available frame rate, lower the framerate only in case you have some bandwidth/storage limitations, in that case, 15 fps is still enough for security purposes, it won’t limit you when identifying a walking/running person.

3. Flickering is also associated with the frame rate, it is caused by difference in the power line frequency (60 or 50Hz depending on the country you live in) and the frame rate and shutter times. Anti-flicker modes sync these values so the picture is not degraded. Be careful, some cameras come in different versions, so not every camera will be able to sync with your powerline frequency.

4. IR illumination: There are not many configuration options in this case, so when installing the camera with an IR illumination, check if there aren’t any surfaces reflecting the IR light back to the camera.

  • Another challenge might arise when a person comes in front of a camera with an IR light on, the face might be overexposed which limits the chance of identifying the person. There isn’t any settings which would help with this, but some more advanced cameras can dynamically reduce the IR light output in the affected cameras making the object in the front more less overexposed.

5. Blurry image at night, in this case the camera is increasing the exposure time too much, making the picture clearer (allowing more light through to the sensor during longer time) but making any movement blurry. Simply decrease the maximum exposure time to 1/15s or so and you shouldn’t get any more blur. Also note that longer exposure time also reduces the framerate (with some exceptions)

6. Streaming settings is usually set to quite a high quality from factory, you just might want to check if the compression is set to h264, that the I-frame (keyframe) frequency is set to roughly 1s (1x the framerate value=usually 30 or 25). If you’re experiencing some issues, it is a good idea to set a maximum bitrate so that the camera doesn’t send too much data, for example at night. For cloud solutions, it is good to keep the maximum around 1500-2000 kbps for a 720p or 1080p camera, for local storage it might be 4000-6000. These are the common values, you need to take into account your connection speed and your storage capacity as well.

7. Connection quality is pretty much connected with the bitrate, most cameras can handle only up to 10 concurrent connections (depending on the stream quality settings), any new connections are refused once this happens. This is however the maximum value, if your stream quality is high, you can observe increased delay, choppy image or even connection loss with as low as 5 connected viewers.

  • This issue can be easily managed by using angelcam live streaming app. Angelcam creates only one connection to your camera and all the other viewers do connect to angelcam servers only.

8. Outdoor/indoor cameras, this basic division just distinguishes which cameras can be mounted outside, in cold/hot environment, working in rainy or dusty conditions. The most common standard for such cameras is called IP66. Cameras marked as IP66 can be mounted outside, but it is still a good idea to check the operating temperature of each camera, the differences can be quite dramatic.

  • When installing an outdoor camera, don’t forget to protect the cable as well, most connectors in cheap camera are not water resistant. Also, any cables should always face downwards, otherwise you risk the water droplets getting into your camera and damaging it.
  • Clearly visible outdoor cameras act as a prevention system, when someone notices that the house is being monitored, he is likely to find another object which is less risky getting into. Having said that, always make yourself familiar with your local laws, in some countries, you’re not allowed to monitor public areas.

All clear, but don’t have a camera yet? Feel free to check our recommended cameras.

I hope this helped, however if you should have any questions, feel free to contact me or our team via our Live chat. We are ready & happy to help!

Important product updates

Thanks to your input we’re constantly improving our product. Usually it’s a bunch of minor changes each week that you probably didn’t even notice. But we’ve just released a handful of improvements which will positively affect your experience with angelcam, so please check these out.

  • Live View – another reason to connect all your cameras
  • Responsive video player
  • Sound on mobile devices
  • New player design

Read on for the full scoop!

 

Live View – ANother reason to connect all your cameras

With Angelcam, now you can view live streams from all cameras, no matter what brand or device. So go ahead and connect all your cameras and then choose one or more of the apps from our app-store: broadcasting, cloud storage, time-lapse and more.

angelcam liveview

We’re gradually rolling out a following updates over time to all users. If you still don’t have these features accessible and you desperately need any of these them, please don’t hesitate to contact us and we’ll upgrade your account preferentially.

Responsive VIDEO player

For live streaming app users: Your player will never be wider than the screen, because it will change size automatically. Especially useful on mobile devices. But on the other side, it could have exactly the same width as the screen.

Sound on mobile devices

In the past, we only supported sound streaming on desktops. Now you can hear your security camera’s sound across all mobile devices.

Player design

During these days we will change the design of all streaming players. If you have any questions, please contact our support.

 

As always, let us know what you think. We’d love to hear from you.

There’s more on the way…

Three industry trends from the biggest security show ISC West in Las Vegas

About ISC

ISC is a traditional security show focused on security, especially video surveillance, access control systems and devices related to security & automation

The event is organized on three different locations worldwide, we attended three times already. This time we had our own stand accompanied with our excited team on ISC West Las Vegas.

It was simply huge. Over 1,000 exhibitors had their booth there. It seemed like all important and wanna-be-important companies were there. I visited most of the booths and my team talked to more than two hundred visitors at our booth too. Here are our thoughts.

Three trends from ISC West 2015

  1. More solutions increasing efficiency of video compression

Internet upload connectivity means still some limitation for higher adoption of pure cloud based video platforms. This is also the reason why angelcam is focused to customers with up to 10-20 cameras on one location. We can see two main solutions for this pain:

  • Zipstream by AXIS
  • h.265

Both promising up to 50% increase in video compression efficiency. This means that same video quality with lower bandwidth or higher video quality with the same bandwidth consumption. We’ll cover these technologies later on our blog [subscribe for updates here] in more detail, so for now I’ll say only:

Zipstream is on the market for some time. It works with selected AXIS camera models, supports all existing solutions (inc. angelcam) and video players supporting h.264. To be mentioned Zipstream smarter bandwidth consumption works just when used with h.264 codec.

We saw tons of h.265 supported cameras at the show. When h.265 is so great why it’s still not widely adopted by the ecosystem? Crucial is the video player compatibility for web and mobile devices. It’s 2015 – Flash should be gone by now, right? 🙂 Despite that we believe in h.265 and have plans on supporting it in the near future.

 zipstream (1)   DSC_9952DSC_9966

 

 

 

 

 

 

  1. More Korean camera manufacturers

Chinese guys “owned the show”! Countless booths of small manufacturerst and OEMs and big successful brands like Dahua and Hikvision flooded the show. What was visible too is plenty of new Korean producers entering the market. Partially because of the support from Korean government. Chinese and Korean manufacturers often offer very similar range of products and both usually do the same mistakes: their booths are pretty similar, boring and most importantly – staff’s English & excitement definitely doesn’t stand to US standards ;(

It’s a bit sad as we see a decent demand from our resellers and customers for more affordable cameras.

06 (1)

  1. More products supporting industry standards

People want to use different hardware and software suppliers. They want to combine them as one can be great at something where others have weaknesses. Something like that was not possible when manufacturer decided to avoid industry standards. They were basically trying to lock customer to their products. One famous example in our industry is Dropcam. We’re happy that more and more manufacturers chose the opposite way and decided to become open to other products & platforms (e.g. Mobotix is opening their cameras).

At ISC West we were pleased to see that almost every device has an open API or other industry standards for communication with the rest of the world: RTSP, ONVIF, Zigbee. The last two named have their own standalone booths as well:

DSC_0006

ONVIF is an industry standard that helps platforms and recording devices communicate with cameras (from technical perspective it’s just API). Zigbee is a communication standard that allows devices to communicate with each other, particularly useful for home automation.

At Angelcam we are continuously looking for opportunities within these standards and machine to machine (M2M) integrations. To provide an example, one of the most requested features from our customers is turning off the video recording when specific people are present in the house/office. This requires integration between alarm system and recording device. We are currently working on a prototype for this specific use case. Stay tuned for more info soon.

These were my three spotted trends from ISC West in Vegas. I would be happy to hear your observations about current trends.

Happy recording! 🙂

PS: We’re heading to one of the top computer vision conferences, CVPR in Boston. Schedule a meeting with us or subscribe for the blog updates so you get notified when we cover this story.

 

Peter Ocasek

CEO, Angelcam

peter@angelcam.com

Mobotix is opening their cameras to make integration with open platform systems easier

mobotix logo

I was excited to hear that new Mobotix CEO announced they’ll finally open their cameras. This will make Mobotix camera owners definitely happier. Today you can find their customers complaining on support forums. And few of them, the most experienced, are sharing the horrific procedures hacking the lack of industry standards h.264 & RTSP. Soon they’ll be able to use any open platform, including Angelcam, to get more value from their cameras using any application from any developer.

Klaus Gessman, who became Mobotix CFO in 2013 and CEO in February 2014, comment his decision:

“It is a complete strategy change for Mobotix. We used to say that we didn’t care about H.264, ONVIF and so on – we’ll go our own way with Mobotix, including with our outstanding video codec. But then you have to convince customers who have already invested in a huge way in – let’s say Avigilon Vision or analogue systems – get rid of those and use only Mobotix systems. … We would take care of H.264 on all cameras. … I want to be open in the market.”
 

Our company always have “openness” as one of our values. The ability to connect any hardware to any software can mean more competition for suppliers, but we strongly believe that it brings many new opportunities for them too. It’s not only about providing freedom to your customers to change the supplier anytime. Today with the world of connected devices (and APIs and platforms like IFTTT or Zapier), openness is mainly about letting users to do with their cameras much more than any closed system will ever offer.

Just imagine some really useful use cases. Switching on Philips’s WiFi enabled light when camera detects movement during night hours? Switching off the video recording when you come to your office? Receiving a push notification to your smartphone, when a car with unknown car-plate number parked on your reserved parking lot? There are thousands of different use cases any company can make a use of.

I’m very happy that our team is part of this huge movement.