Wowza Community

Wowza 4.4.1: Add the custom header at right ts chunk on the playlist m3u8

Hi,

This is a bit complicated issue.

I am hoping there is a someone has a suggestion, or maybe a solution for it.

I have been testing the timing for injecting

onTextData to the rtmp then use that as a trigger for

inject a custom header to hls playlist(chunklist) m3u8.

I have read/tried this article for creating the event trigger.

and

add function to create a custom header for m3u8 based on this article

It actually will inject the custom header to the ts chunk which contains the packet where I injected onTextData( call the sendDirect() event).

However, my challenge is that I want to add the custom header to the closer ts chunk , rather then the onTextData contained chunk.

For example,

let’s say the ts chunk was segmented in 2s each(constant frame rate from publisher),

and the onTextData was called at 1.8s on that chunk,

it is more accurate to add custom header to the next ts chunk(+0.2s difference) rather than add the at the current ts chunk’s begging (-1.8s difference).

is there a better way for doing this?

Thank you

Oli

Hello Oli

In the article you referenced in creating the custom headers, it may be that IHTTPStreamerCupertinoLivePacketizerDataHandler2 could be an avenue to try to inject the metadata via the onFillChunkMediaPacket or onChunkStart event handlers. It could get tricky but seems that may be a good place to start.

Thanks,

Matt