# Persistent delay (latency) in live streaming on localhost

**URL:** <https://community.wowza.com/t/persistent-delay-latency-in-live-streaming-on-localhost/38559>\
**Category:** Wowza Streaming Engine\
**Created:** [April 24, 2012, 11:19pm UTC](https://community.wowza.com/t/persistent-delay-latency-in-live-streaming-on-localhost/38559 "2012-04-24T23:19:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saurav\_Sengupta](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Saurav\_Sengupta](https://community.wowza.com/u/Saurav_Sengupta)\
**Post date:** [April 24, 2012, 11:19pm UTC](https://community.wowza.com/t/persistent-delay-latency-in-live-streaming-on-localhost/38559/1 "2012-04-24T23:19:42Z")

</div>

I have been trying to stream live video from my laptop’s webcam through Wowza Media Server on localhost. However, trying to view the stream through the LiveVideoStreaming example or VLC always causes a few seconds’ delay in the video playback. I have tried the following instructions: -

- [https://www.wowza.com/docs/how-to-set-up-low-latency-applications-in-wowza-streaming-engine-for-rtmp-streaming](https://www.wowza.com/docs/how-to-set-up-low-latency-applications-in-wowza-streaming-engine-for-rtmp-streaming)

- [https://www.wowza.com/docs/how-to-configure-adobe-hds-packetization-sanjosestreaming](https://www.wowza.com/docs/how-to-configure-adobe-hds-packetization-sanjosestreaming)

- [https://www.wowza.com/docs/how-to-turn-on-an-rtp-jitter-buffer-and-packet-loss-logging-rtp-and-mpeg-ts](https://www.wowza.com/docs/how-to-turn-on-an-rtp-jitter-buffer-and-packet-loss-logging-rtp-and-mpeg-ts)

- [https://www.wowza.com/docs/troubleshoot-live-streaming#reduceDelay](https://www.wowza.com/docs/troubleshoot-live-streaming#reduceDelay)

- [https://www.wowza.com/docs/how-to-use-ffmpeg-with-wowza-media-server-mpeg-ts](https://www.wowza.com/docs/how-to-use-ffmpeg-with-wowza-media-server-mpeg-ts)

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [April 24, 2012, 10:32pm UTC](https://community.wowza.com/t/persistent-delay-latency-in-live-streaming-on-localhost/38559/2 "2012-04-24T22:32:48Z")

</div>

That first link is what we know about this. A few seconds indicates low FPS h.264 video in Flash RTMP client with NetStream.bufferLength \> 0. You can increase FPS. You should test locally to eliminate network latency, which you cannot control really.

Richard

---

<div class="post-metadata">

**Author:** ![Randall\_Auriemma](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@Randall\_Auriemma](https://community.wowza.com/u/Randall_Auriemma)\
**Post date:** [April 25, 2012, 4:59am UTC](https://community.wowza.com/t/persistent-delay-latency-in-live-streaming-on-localhost/38559/3 "2012-04-25T04:59:02Z")

</div>

Hello sauravsengupta,

I see you have performed some good troubleshooting steps, trying different encoders, etc.

“I will be very grateful if someone can help me achieve a zero or near-zero latency.”

A good test for you would be to install the videochat example using the install script:

[Wowza]\examples\VideoChat\install.bat

Then run \examples\VideoChat\client\videochat.html

Publish and connect to the same stream. You should see only ~200ms latency.

---

<div class="post-metadata">

**Author:** ![Saurav\_Sengupta](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Saurav\_Sengupta](https://community.wowza.com/u/Saurav_Sengupta)\
**Post date:** [April 25, 2012, 10:15am UTC](https://community.wowza.com/t/persistent-delay-latency-in-live-streaming-on-localhost/38559/4 "2012-04-25T10:15:26Z")

</div>

I have increased the FPS, but to no avail. I don’t have access to ActionScript to change NetStream.bufferLength, but the issue occurs with VLC as well, with caching set to zero. I have also tried passing bufferlength=0 in flashvars, as shown [here](https://www.wowza.com/docs/how-to-use-longtail-jw-player-4-with-wowza-media-server). I am testing on localhost, so network latency is not present.
