How to stream video stored in S3 on html? - html

I have few video files uploaded on Amazon S3. I need to play those on an HTML page programatically one after one.
Few questions:
Why is the video not stored with any extension on S3?
When opening the AWS S3 link it directly asks to download it and save in some format. Can't we achieve it without downloading it?
From reading few articles I understand streaming is possible with using CloudFront and JW player. So can't we use HTML5 tag then?
Few of my questions are very amateur, so you can ignore them. But do guide me to eliminate doubts and if you can tell me the current solution broadly. I will manage the details.

Related

Caching mp3 files on windows phone 8

Suppose I have an app that can play MP3 files over the internet. Is it possible to automatically cache them as they get downloaded, just like browsers do it?
There is no any built in capabilities in WP8/8.1 API that can do this. The only way to do this is to download the mp3 to the IsolatedStorage and the use it.
If you want you can map the mp3 to the downloaded link by creating your own code in case you want the cache like functionality when offline. In the question there is not much information to go around but the final answer is, no there is not such capability as of now.

How to merge several video files into a single file with effects?

I'm using Windows Azure Media Services to upload videos, I want to know if there is a way to merge several video files into a single file.
If it's impossible, which the best API for video merge effects, I already sent a request to get access to Animoto API, but still no response.
WAMS does not offer that feature/functionality.
You can do that sort of thing with many tools prior to upload, this is considered video editing.
Wams offers a range of platform services: secure uploading, encoding, encryption, streaming, adaptive streaming, dynamic transmuxing, secure egress, with many more features to come.
But video editing is not on the roadmap.

How is soundcloud player programmed?

This may be too broad a question, but how is soundcloud actually programmed?
To be more specific,
What language was used to program it?
How does it display the frequency data?
If user uploads a file in a format different from MP3, is it converted MP3 or gets played as is? If former, how does the conversion work?
How does it "graphically" appear on a browser as it does? Is it also HTML 5 thing which I don't know anything about?
I'm a big fan of the soundcloud and couldn't stop wondering how all of these work!
Please help me out :)
SoundCloud developer here,
The API and the current website are built with Rails. For information about the architecture/infrastructure and how it evolved over the last 5 years, check out Evolution of SoundCloud's Architecture. The "next" version of the website (still in private beta) is built entirely with Javascript, and just uses the API to get its data. There's a lot more detail available in Building The Next SoundCloud.
I'm not sure exactly what language/libraries are used to process the audio, but many audio libraries do provide frequency data, and we just extract that.
Users can upload AIFF, WAVE (WAV), FLAC, OGG, MP2, MP3, AAC, AMR or WMA files. The originals are kept exactly as is for the download option, but for streaming on the site, they're converted to 128kbps MP3 files. Again, I'm not sure of the software/libraries, but I'm pretty sure it'd be ffmpeg.
For displaying the waveforms, on the back-end when the audio files are processed when they're uploaded, the waveform data is saved into a PNG file. On the current version of the website, we simply load that file. On Next, the png is processed to get the original data back out, and then it is drawn to a canvas at the exact dimensions needed (which keeps the image crisp). We're currently experimenting with getting waveform data in a JSON format to speed up this process.
I am copying the following info posted by David Noël somewhere else in 2010.
Web tier: Varnish, nginx, haproxy, thin
Data Management: Cassandra, MongoDB, mySQL master/slave cluster, memcached
Web framework: Ruby on Rails
CDN: Akamai and Edgecast
Transcoding/storage: AWS EC2/S3

Need to get video title of HTML5 <video>s and <audio>s

I'm trying to get video/audio metadata (in particular, the title) from HTML5 <video>'s and <audio>'s. I've not been able to find anything at all about it - am I correct that this is not possible through DOM manipulation/javascript?
If that's the case, I'm thinking I will have my server download the media file and look through the metadata to determine the title (if there is one). In that case, I'm using Node.js. Is there a good library in Node that I could use? I've tried the "fluent-ffmpeg" but it did not seem to be able to get data for most of the videos I'm using - perhaps they were using codecs that it did not understand.
Any ideas? Thanks :)
For this, you will typically have to get any metadata server-side. I don't know what language you're using, but TabLib can work well with many.
Metadata for streaming media is a whole separate issue, and is entirely dependent on the server hosting the media. For Icecast/SHOUTcast streams (and compatible), see Pulling Track Info From an Audio Stream Using PHP.
I would suggest using ffprobe for this, more specifically the node-ffprobe module. But yeah, you would need to download the file and parse it through your server, AFAIK the video and audio tags can't hold metadata information yet.

Securing songs streamed from HTML 5

I'm looking to build a jukebox and I am wondering how one would secure songs that are in <audio> tags with HTML 5. I don't want people to be able to download the song, but I'd like to stream it via those <audio> tags. Any suggestions?
you could check referer, use some hashing mechanism (unique ID) to verify the streaming player is your jukebox, not the stream saver etc.
BUT: whatever you do, some people will figure it out (or using the last resort - catching the whole stream, following on what kind of data your jukebox sends etc.)
Whatever you give people to listen via a stream can be saved to disk too.
It's possible using Amazon S3 (similar to the way Soundcloud does it) to generate secure mp3 links for use in your HTML5 player. You generate a secure mp3 on S3 that is valid for a very short time (seconds or minutes), there by prevent someone from copying and sharing the link. You will need to generate the link dynamically using SDK/API.
See example of how to use PHP to generate secure links.
This is not possible. In order for the client computer to be able to play the song, the song has to be transferred there. Period.