H.264 Feed & No recompression = MUCH bigger Video file

peter
edited October 2013 in SecuritySpy
We have SS enabled with a number of Vivotek IP8362 cameras using the JPEG stream with good results. Now that we are on SS v/3.x, I decided to try the H.264 feed & no recompression feature on one camera to try and reduce CPU load. No go. The saved files are now much larger (8.2 GB H.264 vs 1.7 GB with JPEG in one example) and I have now started receiving "Warning: the computer cannot keep up with capturing temporally-compressed video data for the camera "xxxxx", you may see data corruption in the captured footage" in the SS log and via email. I have not been able to see any video corruption, but it looks to me like I have gotten exactly the opposite results I expected. Have I missed anything obvious? SS is v/3.0.4, and the feed format in SS is set to "H.264 RTSP" if that helps. Thanks.

Comments

  • Hi, there is a quirk here due to the temporally-compressed nature of the H.264 format, which is that when you tell SecuritySpy to save the H.264 video without recompression, it cannot adjust the frame rate (as this would require re-encoding the stream).

    Conversely, with JPEG, SecuritySpy can capture at a different frame rate than what is being received from the camera, because each JPEG frame is a self-contained entity.

    So with H.264, what you will need to do is reduce the frame rate of the video stream in the camera's settings to the fps that you actually want captured to the final movie files. Connect to the camera using a web browser to adjust its settings.
  • Thank you for your response. Actually, I did think of this and set both the camera and Security spy the same. I checked again this morning, and yes, both are set to 8 fps. If you would like to see the actual settings screens, please have a look at

    http://psc-consulting.ca/ss_uploads/SecSpy_3oct13.html

    Have I missed anything else I need to set? One thing I do note: Security Spy offers two upload formats for h.264. I am using "H.264 RTSP". Should I be using the other, "H.264 RTSP-over-HTTP" instead?

    Any other suggestions most welcome. Peter
  • Ben
    Ben
    edited October 2013
    Hi Peter,

    Thanks for your screenshots, this is very helpful.

    You have an 8fps frame rate and also an "intra frame period" setting of a quarter of a second. This is like a key frame rate setting (sometimes called GOV length), and has a big impact on the data rate.

    Key frames are self-contained images, and therefore the largest in terms of data size. Your settings will result in a key frame every other frame, which is an unnecessarily high key frame rate. This, combined with the "detailed" compression quality setting, is probably what is causing your high bit rate.

    I would recommend using a Intra frame period of 2 or 4 seconds, and a quality setting of "Good". This should give you a nice low frame rate while still maintaining good quality.

    It doesn't really matter whether you use RTSP or RTSP-over-HTTP (the latter is useful for connecting over the internet as it is more firewall- and proxy-friendly).

    Hope this helps.
  • Morning Ben,

    Yes, it did - very much. As you have no doubt determined, I am a bit of a newbie when it comes to H.264 and it's application. I made the changes you recommended, going to an intra-frame period of 4 seconds (longest the camera supports) and am now collecting video, at 15 fps, that are substantially no larger than the 5 fps JPEG videos I was gathering previously. Result is much less jerky video and fewer dropouts, both of which please my client.

    Thank you very much for your assistance. You offer an excellent package, and the support is up there with the best I have ever encountered in 30 years in the IT business

    Peter
  • Hi Peter - great news. Thanks for reporting back. It's surprising that the default setting on the camera was so low, this is unusual. An intra-frame period of 4 seconds is a good setting to use. All the best.
  • Morning Ben,

    I don't quite understand that camera default either. But, now I know. Thanks for the tutelage.

    Now that I have that issue resolved, I am experimenting with other settings in the hope of enhancing the video recording quality. One thing I did notice was that the Security Spy camera setting for sensitivity appears (to me) to be non-linear. For this environment, I have it set at 55 which seems to work well. However if I set it higher (foe example, to 70) the motion recording seems to go non-stop. Can you confirm this non-linearity for me.

    Thank you

    Peter
  • Hi Peter,

    You're right that the motion sensitivity value is non-linear. High sensitivity values will make it extremely sensitive to any motion in the frame. Values in the fifties are normally good for general purpose.