Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
salman23
Visitor

HLS segment urls (.ts) using query parameters from Base url

Hi ,
I have a roVideoScreen player, which uses HLS video urls to play videos.Since our HLS base url (.m3u8 format) has Query parameters like token and expire time along with it, the same parameters are appended to the subsequent segment urls (.ts format).This causes problem for segment forbidden error.But same url will not be having this parameters in players other than in roku.Is there any way to remove this parameters from segment urls . The highlighted are the parameters.


Base url :
https://someserver.amazonaws.com/videos/2604/13182/M45_1080p_adaptive.m3u8?AWSAccessKeyId=AKIAI2B2AD...


output:

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2500000
hls-high.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1000000
hls-medium.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=400000
hls-low.m3u8



sub url called :(may be hls-high/low/medium . here for eg :hls-medium is given)
[url]https://someserver.amazonaws.com/videos/2604/13182/hls-medium.m3u8?AWSAccessKeyId=AKIAI2B2ADZQKFHKQ&Expires=1407904225&Signature=iuLEgzwN2yo%2FoApsQNlGuU%3D&token=MgR6V+uXPoa8yjRbheI3xHHteNaBU=[/url]

output:

#EXTM3U
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-TARGETDURATION:10
#EXTINF:10,
hls-medium-00001.ts
#EXTINF:10,
hls-medium-00002.ts
#EXTINF:10,
hls-medium-00003.ts
#EXTINF:10,
hls-medium-00004.ts
#EXTINF:10,
hls-medium-00005.ts
#EXTINF:10,
hls-medium-00006.ts
#EXTINF:10,
hls-medium-00007.ts
#EXTINF:10,
hls-medium-00008.ts
#EXTINF:10,
hls-medium-00009.ts
#EXTINF:10,
hls-medium-00010.ts
#EXTINF:10,
hls-medium-00011.ts
#EXTINF:10,
hls-medium-00012.ts
#EXTINF:10,
hls-medium-00013.ts
#EXTINF:10,
hls-medium-00014.ts
#EXTINF:10,
hls-medium-00015.ts
#EXTINF:10,
hls-medium-00016.ts
#EXTINF:10,
hls-medium-00017.ts



Segment url:
[url]https://someserver.amazonaws.com/videos/2604/13182/hls-high-00010.ts?AWSAccessKeyId=AKIAI2B2ADZQKFHKQ&Expires=1407904225&Signature=iuLEgzwN2yo%2FoApsQNlGuU%3D&token=MgR6V+uXPoa8yjRbheI3xHHteNaBU=[/url]

0 Kudos
4 REPLIES 4
RokuJoel
Binge Watcher

Re: HLS segment urls (.ts) using query parameters from Base

Unfortunately, if you put it on the base URL it will go to the segment URLs as well. This was due to some requirements from some of our larger content partners who wanted every segment authenticated.

- Joel
0 Kudos
salman23
Visitor

Re: HLS segment urls (.ts) using query parameters from Base

"RokuJoel" wrote:
Unfortunately, if you put it on the base URL it will go to the segment URLs as well. This was due to some requirements from some of our larger content partners who wanted every segment authenticated.

- Joel


Oh it was a new info for me.Thanks a bunch @RokuJoel.
But i tried the same thing by parsing the video m3u8 file and using the bandwidths and sub url specified in that file (File is given below in bold).It seems to be working fine now.But i am not sure about whether it will be adaptive or not.Any suggestion from your side ?

m3u8 file :

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=240000
240k.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=440000
440k.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=640000
640k.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1040000
1040k.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1540000
1540k.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2040000
2040k.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2540000
2540k.m3u8
0 Kudos
daveyg01
Visitor

Re: HLS segment urls (.ts) using query parameters from Base url

I also am having the same issue.
Is there any way to turn this feature off that is auto populating the query string parameters on the segment URLs from the player after the manifest call is complete ?
0 Kudos
tim_beynart
Channel Surfer

Re: HLS segment urls (.ts) using query parameters from Base url

No way to turn it off, we've asked. This has broken our Akamai caching more than once.  Submit a feature request, the more people who complain the more likely it might get attention.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.