Storing video that can be played from the middle - azure

I am using Azure Blob Storage to store a video. I would like a user to be able to scroll the video to any point in time and play it from there.
For short videos, there is no problem because the whole video loads and you can do that, but for larger videos, it does not seem to work out of the box. And in some sense it makes sense - files by default do not have the functionality to be downloadable from the middle. But all decent video streaming websites offer this functionality. I must be missing some video concepts, would appreciate, if someone linked me to some articles explaining how things like this are done. Bonus points if the solution is using Microsoft Azure.
Large video example (28 secs, 126MB):
https://www.w3schools.com/code/tryit.asp?filename=GP328W3SEY77
Small video example (10 secs, 1MB):
https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_video

Video streaming servers or cloud services are usually dedicated specialised servers and their functionality can be quite complex.
A video 'file' typically consists of one or more video and audio tracks in a 'container' like MP4. The container will have header information and pointers to the track info.
Simple HTTP streaming of an mp4 file is possible if your server supports range requests, i.e. downloading parts of the file at a time, and if the header information is at the start of the video file - in mp4 is it usually at the end by default but can be moved to the start.
More sophisticated streaming servers, including most/all of the popular commercial services, use a dedicated streaming protocol, typically ABR HLS or DASH these days. These provide chunked multiple different bit rate versions of the video and allow the client switch between bit rates for each chunk it downloads - see more info here: https://stackoverflow.com/a/42365034/334402
The thumbnails you see when you scroll along a video timeline are actually usually a separate track in the video file or stream. They are a set of images at timepoints and the entire set of thumbnails can be downloaded quickly at the start of playback to give a view of what a particular part of the video will look like if the user wants to jump to it. When the user actually jumps to that section of the video, the client requests from the server the chunks or section of the file corresponding to that thumbnail.

Azure CDN actually provides some nice functionality:
video starts to play instantly (browser doesn't need to wait for the video to fully load)
you can scroll back/forward in time.
(Obviously, this in addition to the standard CDN functionality of multiple PoP, caching, etc.)
The above CDN setup was tested on Standard Microsoft, but Verizon and Akamai seem to be offering similar functionality.

Related

Audio hosting service that offers transcriptions of uploaded file?

Similar to how YouTube captions videos, is there any audio hosting service out there that will transcribe audio and provide a written transcription for accessibility purposes?
No.
You could upload the audio to YouTube as a video file and get its auto-captions, terrible as they are, then extract those.
You should know that YouTube's auto-captioning should never (never) be relied on. You can instead use it to generate a rough time-based set of captions that you can then download and correct.
The easiest way to do that is via No More Craptions, which will take a YouTube video with auto-captions and walk you through correcting them in a simple interface.
You may then download your completed work as a transcript as well. When you do that, remember to offer a plain text link near the audio file / player on the page with a clear indication of what the user will receive.
Let me reiterate — never rely on YouTube auto-captions. Always correct whatever YouTube provides. Always.

Stream training videos to remote offices

So I lead a team of engineers located across 3 timezones, and when we have a meeting we record it, so that it can reviewed at a later date. Currently we are just storing it on an apache server. If someone wants to watch one of the videos they must download it and then watch it.
Would it be possible to configure it so that they could stream the videos instead of downloading them?
Thanks :)
If the video is mp4, and if you have reasonable bandwidth available, then you can simply make the video available on your server and use the HTML5 video tag on a web page to stream it.
If you don't have or don't want a separate web page just for this, then you can use a general purpose video player, such as VLC http://www.videolan.org/vlc/index.html, and simply provide the URL to the video on your server.
One thing to be aware of - a regular MP4 file has the metadata at the end of the file, but for streaming you want this to be moved to the start of the file. There are several tools which will do this (google mp4 fast start) - here is an example:
https://github.com/danielgtaylor/qtfaststart

Do I need azure media services for streaming a video to html5

I am currently planing the total cost of hosting my videos on azure. After studying the pricing I noted that the costs for storing the data is actually much lower than the price for converting them. Unfortunately I will have many videos, but they won't be watched a lot. Therefore the relative cost for converting them to different formats is too high for me.
Now my question, do I actually need to convert the videos to different formats or wouldn't it be possible to send the video directly from the storage to the browser?
To send video's from storage to browser you can use SAS urls as Zain mentioned. You need to ask yourself what devices,bitrates your solution is targeting: which browsers, web only or web + mobile.
Probably you want your users be able to start watching video before it has been fully downloaded on client(progressive download). Make sure that you encoded it into desired bitrate and moov atom in the video is placed at the beginning of file -https://support.jwplayer.com/customer/portal/questions/12945932-mp4-file-progressive-play.
Based on your original video format and answers to above questions you might need to re-encode your videos and upload re-encoded version to server.
Yes, it's possible to send them directly from storage to the browser, just like it's possible to send any file that you make publicly accessible.
If you're going to store your videos in blob storage, just make sure you either mark the container as public or you generate SAS urls for each video that make them publicly accessible.

Is Node.JS audio mixing + MP3 generation possible?

In short, I have a site where on the client side the user has a "beat maker" app. The user can turn on / turn off noises, background beats, etc, to essentially create their own custom "song" based on the pre-defined noises, tones and tunes that I have on the client side.
I need to somehow translate the beat they're making (in HTML5 canvas) to my server-side (currently Node.JS) and spit out an MP3 of their creation.
Basically I have to somehow have my server-side backend gracefully concatenate + overlap + mix various smaller MP3/wav files into one MP3 file that matches the beat that they created on the client side. I then have to return that MP3 to the client side for download.
Anyone able to point me in the right direction?
As far as my research indicates, this isn't easily accomplished or feasible at all (I.E. within realistic budget / time constraints of the project) due to the complexity of the problem at hand.
This is possible, and there are some audio libraries for JavaScript, but I would take a different approach.
The Web Audio API is very solid these days. You can have your user make all the adjustments client-side, and then generate the audio file right there in the user's browser. If you need to get a copy server-side, you can upload the raw PCM to your server (bandwidth intensive), or send the parameters to the server and re-generate the file.
Now unfortunately, PhantomJS doesn't support Web Audio. To generate a perfect server-side copy, I would execute Chrome with a special page that renders the audio and then uploads to the local server. This guarantees that the sound output you get is the exact same as that of the client, and leaves all of the heavy lifting to the Web Audio API already implemented in the browser.
You won't find much off-the-shelf for a project like this, but with a little creativity I think you will find that this isn't too difficult.

What is the best service/tool to put short audio clips on a website so users can click and listen immediately?

I'm making a foreign language flashcard website in which I want to have 100s of short 3-10 second audio files available for users to click and listen.
So I am looking for a tool/service such as YouTube or Screenr.com but for audio which e.g.:
allows me to easily upload multiple kinds of audio files: mp3, wav, etc.
easy to manage them online (delete, replace)
has a simple, small player (e.g. flash) that integrates nicely into any site
Or has anyone built something like this with Silverlight, e.g. where I could send the name of an mp3 file as a parameter in the object element?
For 3-10 second sound files, you can just serve them as any other file. If you have 100 of them, it will not amount to much storage. They are easily transmitted over http.
I don't think you need a service or site for that amount of data. There's a jQuery plugin that plays sound. Embed that into your web pages and you're done.

Resources