Wowza Community

h264 & axis's compressor lag?

Hi folks.

I’ve been testing an AXIS Q1755 recently as part of getting up to speed with Wowza. One of the things that surprised me was then when testing the h264 stream - by either camera’s own live viewer or via RTSP with QuickTime/VLC, there is a lag of about 4 seconds (as is the audio, synced). This is even when looking at it locally. Switch back to MJPEG and it’s virtually instant.

I wrote to AXIS and they gave me this reply:

“There will be a slight delay usually between 1 - 5 seconds involved in pushing H.264 video streams onto a web browser. Whereas, Motion JPEG requires little to no compression and therefore requires much less processing, however more bandwidth compared to H.264.”

I’ve seen another post somewhere on this forum that seemed to imply that they were getting lag of less than 1 second - even having gone through a Wowza server - using an AXIS camera and h264 (I think).

Should I be expecting this amount of lag in order to generate the live h264 stream? Are certain AXIS camera’s faster than others?

What’s the general benchmark for h264 compression lag, if any?

Looking forward to a response.

FW

It is typically a Flash player issue. If you set any length of NetStream.setBufferTime(secs)) in the player with H.264 you will get between 2-3 seconds of latency. If you set it to zero then it will drop down to about a second but you may experience playback issues. Playing with no buffer at all does not produce smooth video. Do be sure to use the live-lowlatency stream type if you test with a zero buffer. It should produce more fluid video but if there are network issues there still could be problems.

Charlie

I get 2-3 seconds latency with my Axis M1031-W. I’ve seen an Axis P3301 in action and the latency is the same.

One thing I’ve noticed is if I limit the FPS and bit rate in the M1031-W, the latency gets bad (up to 8 seconds). I think the camera’s CPU has to do extra work to limit the FPS & bit rate. This problem doesn’t seem to exist on the P3301. I suspect this is due to the faster CPU and larger RAM in it.

Are you limiting the FPS & bit rate in the camera? If you are, try setting it to unlimited. FYI, the Q1755 has the same CPU but larger RAM compared to the P3301. However, it’s maximum resolution is much higher than the M1031-W & P3301. So, maybe it really does take some time to encode the H.264 vide.

-Bruce

Hi Charles.

Thanks for the reply.

I’m getting this lag before even going anywhere near Flash. This is happening when I’m using QuickTime or VLC to view an RTSP stream from the camera locally. Doesn’t happen however if I switch to MJPEG instead.

Can I assume this is not considered normal? AXIS seemed to imply that it just takes time to compress into an h264 stream, and I should expect it, but on this forum no-one seems to have mentioned anything like this…

FW.

hey Charlie,

I am using Axis P7214 video encoder for live streaming using raspberry pi through omxplayer. I am getting latency of 800-900ms after reducing the buffer size of player. but i need more optimization near about 300-400ms. Is there any possibility to set delay through software of Axis- IPUtility or any other method to reduce latency of Axis video encoder.

thanks in advance

-Ritesh