Quantcast
Viewing all articles
Browse latest Browse all 101

Use Memset’s Memstore to stream video..

Everybody loves YouTube and Vimeo, but there will always be occasions when you want complete and total control over how you offer video to your viewers. Memstore from Memset (disclaimer: I work for them) allows you to stream video from a Memstore account using its CDN (content delivery network) functionality.

There are a number of requirements, however. You MUST use HTML 5 and you MUST use a codec such as WebM, Ogg Theora Vorbis, or MP4. If you’re using a Mac, the free Miro Video Converter is the best tool to convert video from other formats.

Here’s an example of some video streaming from my Memstore account. It’s not native resolution – I’ve specified a specific width and height in the HTML 5 code to ensure it fits within this blog post. The video itself is 720p HD and I’ve made it available in WebM, Ogg and MP4.

Assuming you’re using a browser such as Google Chrome or Firefox, it may take about 5 seconds before you can do anything. Once you see the poster frame, you can jump to any point within the video or just start playing it from scratch.

Note: This isn’t proper streaming per sae, it’s called pseudo streaming and simply means that the web proxy is able to request specific range of bytes from the file.

The quality of video you see will very much depend on your browser. Under Chrome, I’m seeing excellent playback quality through WebM. Under Firefox, it’s the lower quality Ogg.

So, on to our example:

The code I’ve used is simply:



where video.goldenhindfilms.co.uk is a DNS CNAME record to video.4622933a.cdn.memsites.com which is what Memstore allocates to the public CDN container. You can read more about how to configure the CDN to serve static files here.

Getting the video up to Memstore was easy – I used Cyberduck to connect via the OpenStack Swift protocol to Memstore and uploaded the video files to the “videos” container. The “videos” container has the CDN service enabled on it, like so:

Image may be NSFW.
Clik here to view.
cdnvideos

We can serve static files, including index files AND also provide customised 404 File Not Found error messages too. If you visit http://video.goldenhindfilms.co.uk, you’ll see that there is a very simple HTML page with video embedded. Everything is served from Memstore.

As a side note, all images on this blog are served through Memstore’s CDN as well (although using different container and CDN name). This also includes this blog’s theme files. To do this, I’ve use the W3 Total Cache plugin.

Unlike many other CDNs and cloud storage systems, Memstore allows you to get data in and out through its native protocol (in our case, OpenStack Swift which also powers Rackspace’s CloudFiles) as well as FTP and SFTP.

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 101

Trending Articles