Playing m3u8 using signed urls

Viewed 153

I want to stream an m3u8 file from Google Cloud Storage using signed URLs. I tried to generate a signed URL for the manifest.m3u8 file; however, this didn't work since the different streams don't have a valid signed URL either.

I'm trying to come up with a solution to give a client access to all the needed segments when reading out the manifest.m3u8.

Is it possible to swap out the different streams in the manifest.m3u8 file with signed URLs to each stream? Am I missing something?

Manifest.m3u8

#EXTM3U
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="Test Language",DEFAULT=YES,AUTOSELECT=YES,URI="audio-hls-fmp4.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=774348,AVERAGE-BANDWIDTH=530950,RESOLUTION=1920x1080,AUDIO="audio",CODECS="hvc1.1.4.L123.90,mp4a.40.2"
video-hd-hls-fmp4.m3u8 <-- SWAP THIS WITH SIGNED URL
#EXT-X-STREAM-INF:BANDWIDTH=762873,AVERAGE-BANDWIDTH=507776,RESOLUTION=1280x720,AUDIO="audio",CODECS="hvc1.1.4.L123.90,mp4a.40.2"
video-sd-hls-fmp4.m3u8 <-- SWAP THIS WITH SIGNED URL

The only helpful resource I found online was this post, however, this technique seemed fairly cumbersome to me. In the meantime, are there other methods to accomplish this since this post is from 8 years ago?

PS: I'm using Google's NodeJS Cloud Storage library


Objective

In essence, I'm searching for a solution to stream/serve manifest.m3u8 without having to go through my own server. I'm trying to minimize the load on my server as much as possible. This can be done using signed URLs.

The GCP docs use signed URLs, however they set all the m3u8 resources publicly available in order to successfully stream it. AWS uses something like signed cookies, which solves the problem. However GCP only has this feature available within Cloud CDN, not Cloud Storage.

What are some other methods to successfully stream an m3u8 file?

0 Answers
Related