# How can we or you fix a bug about HLS keyframe-only playlist 404 errors?

**URL:** <https://community.wowza.com/t/how-can-we-or-you-fix-a-bug-about-hls-keyframe-only-playlist-404-errors/96022>\
**Category:** Wowza Streaming Engine\
**Tags:** media-players-and-devices\
**Created:** [March 30, 2023, 12:37pm UTC](https://community.wowza.com/t/how-can-we-or-you-fix-a-bug-about-hls-keyframe-only-playlist-404-errors/96022 "2023-03-30T12:37:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shigeyf](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/shigeyf/32/1283_2.png) [@shigeyf](https://community.wowza.com/u/shigeyf)\
**Post date:** [March 30, 2023, 12:37pm UTC](https://community.wowza.com/t/how-can-we-or-you-fix-a-bug-about-hls-keyframe-only-playlist-404-errors/96022/1 "2023-03-30T12:37:56Z")

</div>

Hi Wowza Support Community,

I tried to enable keyframe-only playlists for HLS on ‘vod’ (single server) app, according to Wowza doc article:  
“_Create keyframe-only playlists for Apple HLS streams_”. But I got a problem as below.  
I don’t know if this problem is a known bug in WSE.  
This problem can be found in WowzaStreamingEngine-4.8.21+6.

Please advise what is the best way to use the keyframe-only playlists for HLS.

Best regards,  
-Shige

## Problem details

When enabled Keyframe-only playlist, I got the following playlists against the default sample.mp4.  
Please see Playlists section below.  
This HLS VOD stream is provided with 10 sec chunk (segment) length.  
The stream chunks are 64 chunks (from #0 to #63).

When I tried to get chunks of keyframe-only playlist, I got HTTP 404 errors as below.  
The errors start from #64 chunk to the last chunk. The keyframe-only playlist has 318 chunks.

```bash
wget https://wowza-01.stream.liveinstantly.cloud/vodapp/mp4:sample.mp4/media_w1379371641_ko_64.ts
2023-03-30 21:11:41 ERROR 404: Not Found.
   :
wget https://wowza-01.stream.liveinstantly.cloud/vodapp/mp4:sample.mp4/media_w1379371641_ko_316.ts
2023-03-30 21:11:41 ERROR 404: Not Found.
wget https://wowza-01.stream.liveinstantly.cloud/vodapp/mp4:sample.mp4/media_w1379371641_ko_317.ts
2023-03-30 21:11:41 ERROR 404: Not Found.

```

## Problem Analysis

Even with 10 sec video chunk length HLS streaming, the interval of keyframe-only chunks is 2 sec, which is consistent with the keyframe interval of the default sample video (`content/sample.mp4`).  
So, the number of keyframe-only chunks are aligned with the number of keyframes in the video file.  
But, the number of video chunks (segments) are aligned with chunk length (segment length).  
This mismatch seems to raise these 404 errors when getting keyframe-only chunks.

When changing `cupertinoChunkDurationTarget` to 2000 (2 sec (2000ms) chunk length), all keyframe-only chunks can be obtained WITHOUT 404 errors. There is no problem with the chunk-length configuration.

## References

### Playlists

- Master playlist (playlist.m3u8)

```nohighlight
#EXTM3U
#EXT-X-VERSION:4
#EXT-X-STREAM-INF:BANDWIDTH=868638,CODECS="avc1.42c015,mp4a.40.2",RESOLUTION=512x288
chunklist_w1379371641.m3u8
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=875,CODECS="avc1.42c015",URI="chunklist_w1379371641_ko.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=116046,CODECS="mp4a.40.2"
chunklist_w1379371641_ao.m3u8

```

- Chunk playlist (chunklist\_w1379371641.m3u8)

```nohighlight
#EXTM3U
#EXT-X-VERSION:4
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:10.0,
media_w1379371641_0.ts
#EXTINF:10.0,
media_w1379371641_1.ts
     :
#EXTINF:10.0,
media_w1379371641_61.ts
#EXTINF:10.0,
media_w1379371641_62.ts
#EXTINF:4.633,
media_w1379371641_63.ts
#EXT-X-ENDLIST

```

- Keyframe-only Playlist

```nohighlight
#EXTM3U
#EXT-X-VERSION:4
#EXT-X-TARGETDURATION:2
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-I-FRAMES-ONLY
#EXTINF:2.0,
#EXT-X-BYTERANGE:999624@376
media_w1379371641_ko_0.ts
#EXTINF:2.0,
#EXT-X-BYTERANGE:999624@376
media_w1379371641_ko_1.ts
    :
#EXTINF:2.0,
#EXT-X-BYTERANGE:999624@376
media_w1379371641_ko_315.ts
#EXTINF:2.0,
#EXT-X-BYTERANGE:999624@376
media_w1379371641_ko_316.ts
#EXTINF:0.633,
#EXT-X-BYTERANGE:999624@376
media_w1379371641_ko_317.ts
#EXT-X-ENDLIST

```

### Application Configurations

conf/vod/Application.xml are as below.  
Other parts of the file are as-is from default.

```xml
    :
                <HTTPStreamer>
                        <Properties>
                                <Property>
                                        <Name>cupertinoChunkDurationTarget</Name>
                                        <Value>10000</Value>
                                        <Type>Integer</Type>
                                </Property>
                                <Property>
                                        <Name>cupertinoExtXVersion</Name>
                                        <Value>4</Value>
                                        <Type>Integer</Type>
                                </Property>
                                <Property>
                                        <Name>cupertinoFloatingPointDurations</Name>
                                        <Value>true</Value>
                                        <Type>Boolean</Type>
                                </Property>
                                <Property>
                                        <Name>cupertinoCodecStringFormatId</Name>
                                        <Value>2</Value>
                                        <Type>Integer</Type>
                                </Property>
                                <Property>
                                        <Name>cupertinoAutoCreateMultibitratePlaylist</Name>
                                        <Value>true</Value>
                                        <Type>Boolean</Type>
                                </Property>
                                <Property>
                                        <Name>cupertinoCreateKeyFrameOnlyPlaylist</Name>
                                        <Value>true</Value>
                                        <Type>Boolean</Type>
                                </Property>
                        </Properties>
                </HTTPStreamer>
   :

```

---

<div class="post-metadata">

**Author:** ![Vihari\_Kumar](https://avatars.discourse-cdn.com/v4/letter/v/87869e/32.png) [@Vihari\_Kumar](https://community.wowza.com/u/Vihari_Kumar)\
**Post date:** [April 18, 2023, 11:24am UTC](https://community.wowza.com/t/how-can-we-or-you-fix-a-bug-about-hls-keyframe-only-playlist-404-errors/96022/2 "2023-04-18T11:24:48Z")

</div>

It would be best to open a support ticket to have one of our Support Engineers review this HLS issue:

[https://portal.wowza.com/account/support](https://portal.wowza.com/account/support)

---

<div class="post-metadata">

**Author:** ![c8d94be6bd6204f4fb18](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@c8d94be6bd6204f4fb18](https://community.wowza.com/u/c8d94be6bd6204f4fb18)\
**Post date:** [June 18, 2023, 12:54pm UTC](https://community.wowza.com/t/how-can-we-or-you-fix-a-bug-about-hls-keyframe-only-playlist-404-errors/96022/3 "2023-06-18T12:54:03Z")

</div>

Verify that the URLs tiktokdownloads.online and file paths specified in the playlist file are accurate and accessible. Ensure that the paths to the keyframe files are correct and that the files exist in the specified locations.

---

<div class="post-metadata">

**Author:** ![25ee4d475151fff2167a](https://avatars.discourse-cdn.com/v4/letter/2/34f0e0/32.png) [@25ee4d475151fff2167a](https://community.wowza.com/u/25ee4d475151fff2167a)\
**Post date:** [August 9, 2023, 12:15pm UTC](https://community.wowza.com/t/how-can-we-or-you-fix-a-bug-about-hls-keyframe-only-playlist-404-errors/96022/4 "2023-08-09T12:15:31Z")

</div>

igured out a workaround with OBS Studio on Mac. You’ll need to set your keyframe interval manually (ex. 1s) in the output settings; the default is 0 (auto). That solved the issue for me.
