Hello I’m trying to ingest HLS as described here: https://www.wowza.com/docs/how-to-publish-and-play-a-live-stream-apple-hls
but I’m getting an error:
empty TagReaderTargetDuration #EXT-X-TARGETDURATION No pattern match for Duration from ‘#EXT-X-TARGETDURATION:1.2’
in the logs.
ffmpeg, vlc, safari all handle the stream fine.
Not clear what wowza is complaining about? If something is wrong with the playlist formatting or the target duration tag it’s not clear what this error is referring to.
Thanks,
David
Hi @David_Ibbitson and welcome to our forums!
That error usually has to do with the keyframe rate, frames per second (FPS) and packetization error. Wowza requires this: the chunk duration can’t be smaller than the keyframe interval, as a keyframe is required to create a chunk.
Troubleshooting:
The Apple HLS packetization article mentions this and gives examples on what the keyframe interval should be for a 10 second chunk duration.
https://www.wowza.com/forums/content.php?88-How-to-configure-Apple-HLS-packetization-(cupertinostreaming)
Note that we recommend a keyframe between 1-4 seconds for all streams so the encoding on the source stream should be changed.
Try to check that the FPS is 30, some encoders do not send it correctly to wowza and it will default to 29.97. You can try this as a test and see if it works: 30fps, 1 keyframe every 90 frames (3 s), target duration = 6s.
There are so many variables, we can only best determine the issue in a support ticket and I would suggest that so we can review your config and logs.
Here is a doc to provide some guidance in the meantime on some of those settings:
https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming?88-How-to-configure-Apple-HLS-packetization-(cupertinostreaming)
Hi @Rose_Power-Wowza_Com,
Thanks for the response.
The incoming stream is verified 30 fps and there is a keyframe every 6 frames, so this should meet all the criteria. Every segment starts with a keyframe. Here is what my playlist.m3u8 looks like:
#EXTM3U
#EXT-X-TARGETDURATION:1.2
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:512
#EXT-X-INDEPENDENT-SEGMENTS
#EXTINF:1.2,
chunk512.ts
#EXTINF:0.8,
chunk513.ts
#EXTINF:1.2,
chunk514.ts
#EXTINF:0.8,
chunk515.ts
#EXTINF:1.2,
chunk516.ts
#EXTINF:0.8,
chunk517.ts
Is there something wrong with the TARGETDURATION tag that Wowza does not like?
Thanks,
David
After some testing it seems like wowza does not like a decimal value “1.2” for TARGETDURATION. I had to round it up to the nearest integer “2” for wowza to accept it. This seems like a bug, as it’s against HLS spec.
Would appreciate if somebody could look into this one thanks!
David
This is not a bug, The chunk duration should be a multiple of the keyframe interval. That is just how it is set up in Streaming Engine and is a requirement… Glad you got it working though.
Also keep this in mind: File segments must start on a keyframe, so in your encoder, make sure to use a keyframe interval that’s a factor of the segment duration. For example, if HLS segment duration is 10 seconds, use a keyframe interval of 2, 2.5, 5, or 10 seconds. If your segment duration is 6 seconds, use a keyframe interval of 2, 3, or 6 seconds.
https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming