How do I serve a .m3u8 file on Linode Object Storage and control access to specific users?
I am creating streaming video and want to upload it Linode Object Storage. The file my software creates is in .m3u8 format and it has a bunch of .ts files with it.
I'd like to control who has access to my video.
1 Reply
I'll be glad to try and point you in the right direction. From what I understand, an m3u file is a text file that describes a playlist. If an 8 is added to the end of the extension, this means that the text of the file can be expected to be in UTF-8 encoding.
You will need to make sure that any videos in that playlist are accessible and that the playlist points to where they will be located. The links inside the m3u8 file can be either relative to the m3u8 file, or they may be an absolute path to the content on the internet or your local hard drive. If you created the m3u8 file on your local computer, you will want to verify that it is not referencing the directory structure of your local hard drive, as it will then still work for you, but no one else will be able to access the associated media because the paths in the .m3u8 file will not make sense for them.
.ts files are transport stream files. You may need to convert them to a more commonly used format if you want them to be usable without your audience needed special software to view them. If you do convert them, you will need to update your m3u8 file to provide links relative to the m3u8 file to find the converted files.
How do I provide access control to my video?
You will want to refer to https://www.linode.com/docs/platform/object-storage/how-to-use-object-storage-acls-and-bucket-policies/#subdirectory-access-policy for more information about how to setup access policies.
Currently there is no way to setup additional users to grant specific access to different people (unless they have their own Linode customer accounts). Access can be granted to be public, by your "canonical ID", or another Linode Customer's "canonical ID".
I hope this is helpful.