Wowza Community

Remove query parameters from HLS chunk URLs?

Currently the behavior of the HLS packetizer is that it will append any query parameters passed on the playlist.m3u8 to the returned chunklist.m3u8 URLs as well as passing any query string parameters on the chunklist.m3u8 to the returned media.ts URLs. For example, given a URL like “http://example.com/myapp/ngrp:mystream_all/playlist.m3u8?foo=bar” the playlist returned will have chunklists like “chunklist_b264000.m3u8?foo=bar”. Requesting this chunklist will then return chunks like “media_b264000_1.ts?foo=bar” etc.

We are using CDN caching for our HLS delivery (which ignores query parameters for caching purposes), and because of this behavior incidental query params that get passed by clients end up polluting the cached chunklists, which is causing problems with other clients that don’t expect the chunk URLs to have parameters that keep changing.

I briefly attempted to call IHTTPStreamerSession.setQueryStr("") in onHTTPSessionCreate(), but this didn’t seem to have any affect on the generated chunk URLs. Is there any way to have query parameters not propagated into returned .m3u8 contents?

I hear you pain, as I’ve been there :slight_smile:

We have workaround different ways when trying to do this, as I’ve been feeding CDN with Wowza for over years even before Wowza had the option of HTTP Origin. Unfortunately, HTTP Origin doesn’t work when you need query strings

you can either ask your CDN to remove the query string when passed to your Origin and ignore the queries in the requests. I’ve done this with 2 CDN which accepted to do so.

Other option I also did was to create our own responder to CDN, which run on a different port. For instace, port 8080 … When CDN calls Wowza on port 8080, we retrieve the HLS manifest and chunks from 1935, and stripped off everything we don’t need to go out to CDN

In case anyone is still having this issue, I found that as of version 3.6.2 there are new Application config parameters which can solve this issue:

Added HTTPStreamer/Properties string properties (listed below) which is a pipe (|) delimited list of query parameters that will not be carried to the media URLs if they are present in the manifest/playlist URL
    httpQueryStrRemoveList (Removed from all forms of HTTP streaming)
    cupertinoQueryStrRemoveList (Removed from Apple HLS streaming)
    sanjoseQueryStrRemoveList (Removed from Adobe HDS streaming)
    smoothQueryStrRemoveList (Removed from Microsoft Smooth streaming)
    mpegdashQueryStrRemoveList (Removed from MPEG-DASH streaming)

As of version 4.4.0, these settings also enable wildcard (*) characters:

  • (remove all query strings)

name* (remove query strings that start with)

*name (remove query strings that end with)

1 Like