# HLS from live camera

**URL:** <https://community.wowza.com/t/hls-from-live-camera/37404>\
**Category:** Wowza Streaming Engine\
**Created:** [October 17, 2011, 1:22pm UTC](https://community.wowza.com/t/hls-from-live-camera/37404 "2011-10-17T13:22:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gary\_Coulbourne](https://avatars.discourse-cdn.com/v4/letter/g/3da27b/32.png) [@Gary\_Coulbourne](https://community.wowza.com/u/Gary_Coulbourne)\
**Post date:** [October 17, 2011, 1:22pm UTC](https://community.wowza.com/t/hls-from-live-camera/37404/1 "2011-10-17T13:22:13Z")

</div>

I am streaming from a camera, live, transcoded to H.264, and sent via RTMP to Wowza. RTSP seems to work just fine, but HLS has a significant delay. The stream is live and will not be rewound, I would like to try and minimize the delay. I tried to change the duration to one second

```auto
<Name>cupertinoChunkDurationTarget</Name>
	<Value>1000</Value>

```

This resulted in unreliable video and streaming on the client would occasionally abort. Is there any way I can reduce how long HLS needs to buffer before it begins to stream? Thanks!

---

<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:** [October 17, 2011, 10:14pm UTC](https://community.wowza.com/t/hls-from-live-camera/37404/2 "2011-10-17T22:14:02Z")

</div>

Changes to cupertinoChunkDuration have to done in conjunction with key frame frequency, as described in the note in the cupertino settings article:

[https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming](https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming))

It is a high latency type of streaming. These settings and key frame frequency can help, but might take some experimenting.

Richard

---

<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:** [October 19, 2011, 6:26pm UTC](https://community.wowza.com/t/hls-from-live-camera/37404/3 "2011-10-19T18:26:57Z")

</div>

If you set it chunkDurationTarget to 1000 but key frame frequency is 10 seconds, chunk size will still be 10 seconds. Change key frame frequency to 1 second. Because Wowza has to start a chunk on key frame. There is a note in the article.

Richard

---

<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:** [October 19, 2011, 6:45pm UTC](https://community.wowza.com/t/hls-from-live-camera/37404/4 "2011-10-19T18:45:49Z")

</div>

Use -r and -g. Theses ffmpeg examples

[https://www.wowza.com/docs/how-to-encode-video-on-demand-content](https://www.wowza.com/docs/how-to-encode-video-on-demand-content)

Use “-r 24” and “-g 48” for a 2 second key frame frequency.

Richard

---

<div class="post-metadata">

**Author:** ![Gary\_Coulbourne](https://avatars.discourse-cdn.com/v4/letter/g/3da27b/32.png) [@Gary\_Coulbourne](https://community.wowza.com/u/Gary_Coulbourne)\
**Post date:** [October 19, 2011, 12:59pm UTC](https://community.wowza.com/t/hls-from-live-camera/37404/5 "2011-10-19T12:59:27Z")

</div>

One thing I found strange is that even when I change the cupertinoChunkDurationTarget, it still gives me ten second chunks. Wowza doesn’t seem to care if I set it to 1000 ms, I still get 10kms. Is this a limitation of the software?

---

<div class="post-metadata">

**Author:** ![Gary\_Coulbourne](https://avatars.discourse-cdn.com/v4/letter/g/3da27b/32.png) [@Gary\_Coulbourne](https://community.wowza.com/u/Gary_Coulbourne)\
**Post date:** [October 19, 2011, 1:39pm UTC](https://community.wowza.com/t/hls-from-live-camera/37404/6 "2011-10-19T13:39:10Z")

</div>

I’m using ffmpeg for the transcoding and had set the GoP to 15, which I thought would give me 500ms/key frame, but I was still getting 10s. I’ll do more research. Perhaps ffmpeg is not generating the output I am expecting.
