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

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.

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)
#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)
#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
#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.

    :
                <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>
   :

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

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.

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.