Do the various HLS files have to be stored in separate folders? - amazon-s3

Background:
The HLS RFC doesn't seem to mention anything about this. I'm creating a script that generates a 720p.m3u8 file for a series of 720p resolution .ts files. Then it uses FFMPEG to generate 480p .ts files using the 720p .ts files and generates a 480p.m3u8 file.
Then it generates a master playlist.m3u8 file which points to the 720p.m3u8 and 480p.m3u8 files.
Master:
#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=3145728,RESOLUTION=1280x720"
720p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1572864,RESOLUTION=854x480"
480p.m3u8
Question:
Is it ok to have all the .ts files of all resolutions stored in the same folder along with their respective m3u8 files and the master m3u8 file? Or should the .ts and .m3u8 files of each resolution be stored in separate folders and the master m3u8 be in the parent folder? Like this:
#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=3145728,RESOLUTION=1280x720"
720p_folder/720p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1572864,RESOLUTION=854x480"
480p_folder/480p.m3u8
The multivariant playlist here shows m3u8 locations as full URL's http://example.com/low/index.m3u8. Is that how it should be, or can it be a relative folder path like I've shown above (480p_folder/480p.m3u8)?
This is for accessing via VideoJS from various client browsers across the world, and the .ts and .m3u8 files will be stored on an AWS S3 server.

Folders for the different renditions are commonly used but there is absolutely no requirement for it.
All URLs in a Multivariant playlist (used to be called master playlist) and in the different variant playlists can be relative or absolute, without really any restrictions. Things to consider here are:
With absolute URLs, it's easy to host just the playlist files elsewhere while all URLs will still work
With relative URLs, it's easy to move or copy the content to other locations as long as m3u8 playlist and media files are kept together.
As a side note, you should consider using mp4 chunks instead of ts unless you have a technical reason not to. There are hardly any devices left that only support ts but not mp4, and for using some HLS features, the use of mp4 is required (at least for Apple devices), e.g.:
Using the more efficient HEVC codec 1
Using xHE-AAC, Apple Lossless, or FLAC audio 2
Using the IMSC1 subtitle format 3

Related

Does AWS S3 cache mp3 files to local?

When I click the mp3 file's AWS S3 path, it plays in my browser, see screenshot below:
Is the mp3 downloaded/cached to my local machine? If so where is it? I tried to search for it in Chrome cache folder but did not find anything. Very curious how this works exactly.
No, S3 doesn't cache any files locally. If a file were cached it's determined by your browser, who makes the decision based on a number of factors (such as HTTP headers, see [1]).
The reason the MP3 file plays in your browser is because your browser knows it can play the MP3 file and not just download it.
[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

make it impossible to download the audio files

So guys, how do I prevent users from downloading audio files on my web app (running springboot in backend) by accessing the s3 url !
I want to make it impossible to download the audio files in my website ! Any suggestions pls ?
I assume you mean that you want to make it impossible to download the audio files, but still allow streaming them for playback.
You can't.
If it can be played, it can be downloaded. Simple as that.
At best, you can sign your S3 URLs so that they expire after a short period of time. This gives you control over who accesses your audio files, and prevents them from showing up in searches, or linked to from other sites. You can also look into Encrypted Media Extensions, but it's not all that useful for audio since audio is trivially digitally captured on the output.

How does one decompress a compressed file (zip, bz2 etc), within Dropbox (without downloading to client first)?

Say I have a compressed file (zip etc) stored in my dropbox account (in the cloud, not on my local device), is there a way to programmatically expand the file in my dropbox account, without downloading it locally first ?
I do not want to download the file first. That defeats the purpose, since i can just upload the decompressed files in the first face.
I've looked at various Dropbox api's, and while I can find a lot of information on how to put or remove files, I haven't found anything (yet) on how to decompress a file programmatically.
No, Dropbox doesn't have this functionality.

Can video.js be used offline, on a CD/DVD/flash drive?

I am creating an HTML-based video gallery that will be distributed on physical media and needs to be functional in the absence of an internet connection. I will store the video files in an assets folder inside the root folder.
Will video.js function in the absence of an internet connection, packaged as a stand-alone mini-site on physical media?
Yes. In the same way that you can reference images locally relative to an HTML page, you can do the same thing with video.
so if you file is index.html and assets are in a folder called video you would simply reference something like src="video/myvideo.mp4"

Using MP3s in Ektron

Ektron 801 SP1
I am allowing users to upload MP3 files to their profile using the CommunityDocuments control. I want the user to be able to click the link and play the song. For some file types, such as .doc, the file downloads immediately because the URL of the link refrences "DownloadAsset.aspx". The MP3 files have a URL like http://www.domain.org/documents.aspx?id=242665652917&TaxonomyId=242665652152&LangType=1033&EkTB_iframe=true&height=520&width=790
How can I get these files to play? I have the following in the web.config
<add key="audio/mpeg" value="WindowsMedia"/>
As far as I know, Ektron doesn't provide any player / plugin support ootb for MP3 files. You can specify an additional MEDIA type in the web.config, perhaps. Or use HTML5 Audio. http://www.w3schools.com/html/html5_audio.asp
When using the HTML5 approach, pay attention to which codecs are supported by which browsers. You'll have to work out something else for older browsers via fallback or shim.
Adding a MEDIA type in the web.config will just tell the browser to load a plugin like quicktime or wmp, if it works at all.
As per eGandalf's answer, Ektron doesn't include an MP3 player. You should still be able to use Ektron to store and the serve up the MP3, by saving it into the library or as a DMS asset. You made need to update an Ektron config setting by adding ".MP3" to a file extension whitelist.
Regarding having a user player the MP3 in the browser, I would look at using JW Player - it's very popular and here is a tutorial on using it to play an MP3.