At Your Global Service

LBDG December - Integrating with a CMS

Posted by: Cameron Church, November 17, 2009
The London Brightcove Developer Group was such a great success last month that we're going to host another one! This time we're looking at integrating Brightcove with CMS's.

We'll be supplying pizza and beer and this time we're going to team up with our friends over at Drupal and run our event at the same time as their Drupal for Video event with some cross talks. Our Brightcove track of the night will be peppered with CMS Integration talks and howtos.

This time we won't be doing a coding challenge, instead we will be spending more time looking at:

    * Coding Spotlights : See what other's are doing with Brightcove, especially around CMS integrations

    * Ask the Experts : A panel of Brightcove Experts there to answer your questions

    * Special Presentation : This week we have a stormer - see below

    * Networking : As always come and meet agencies, developers, consultants and publishers all working with Brightcove

Coding Spotlights:

This time we're going to ask our friends at CMSPro to look at how they've incorporated Brightcove with Drupal for the Economist.

Ask the Experts:

Following on from last time we'll have our expert panel of Evangelists, Sales Engineers, Senior Technical Consultants and Engineers on hand to answer your CMS integration questions!

Special Presention:

Our CTO Bob Mason (the man behind the product!) will be in town to give a presentation to the Developer Community.   We're going to look at what's new with the Brightcove 4 launch and see what's coming up as the company continues to build its vision of Video Everywhere.

Networking:

This is a group for the community so come to meet and learn from other users of Brightcove!

More details about the event here:

Book now here:

Events

 

Getting Started , Systems Integration Comments (0), Tags:

Video Encoding 101 - Under the hood of the Codec (Part 1)

Posted by: Cameron Church, November 13, 2009
The series so far:
Introduction - http://blog.brightcove.com/global/2009/10/video-encoding-101-the-series.html
The Beginning -http://blog.brightcove.com/global/2009/10/video-encoding-101-from-the-beginning.html
The Problem Number 1 - http://blog.brightcove.com/global/2009/10/video-encoding-101-the-problem-number-1.html

In general a codec has one task.   Take a data feed in a specific encoding (be it analogue or digital) and run it through an algorithm to try and compress the feed in such a way that the message is no lost during storage and decompression.

In fact that's where the word codec comes from : COmpression DECompresion

Implied in between these 2 transformation states is a new Encoding Specification itself for storage - a language to convert to and store the data in.

To think of this in modern terms compare an email to a text message.

The email may read:

Hi Cam
 
Sorry for not getting this to you on Friday, I was waiting for confirmation of PD rights from our legal team
 
So please can you take a look through this overview, it's basically draft 1 so please let us know your feedback 
 

Also there's a chart for questions to ask the developers and risks and issues so please feel free to add to them

Regards

Ivan

If I were then to text this I may come up with:

Hi m8

Soz 4 not getin DIS 2 U on fri, I wz w8N 4 conf of PD rghtz frm our legal team

So pls cn U tAk a L%k Thru DIS OvrVew, itz basically draft 1 so pls lt us knO yor fEdbak

Also ther's a chart 4 :-Qz 2 ask d devLpRz & rskz & isUz so pls fEl frE 2 + 2 dem

Thanks to Transl8it! web service for helping me out here.

So we took a data stream that was 362 characters in length and compressed it to a stream of 282 characters - or we compressed the original by some 22% whilst still maintaining the overall quality to ensure complete transmission of the message contained within the stream.  In this case our brains acted as the CODEC and the Encoding Specification was the English language and its corresponding character set.

Now take this and apply it to video data streams that are 100x as large as text and still try to achieve 22% compression with no loss to the message within the data - enter the video CODEC.

Before getting into the methods deployed by a video CODEC we need to look at the ability to sustain loss of integrity of the data stream whilst still preserving the message quality.  There is a critical threshold around that a medium (text, image, audio, video) can sustain during transitions like compression and decompression spells the difference between the message being understood or not by the receiver. 

Due to the nature of focus for each medium - that's to say how many messages (denoted by their ability to be comprised of substreams) that can be injected per data stream - the threshold rises drastically from Text to Video.  Text has a very low threshold before the message can become indecipherable because it only allows one stream (non substreams) per transmission.  Whereas Video and Audio have much higher thresholds because there are able to use many substreams to make up the overall data stream - an auditory scene is comprised of many different frequencies and a visual scene the same with many different field of view objects each their own substream.   These substreams combine to form the overall data stream and can suffer the loss / corruption of a few before the whole piece falls apart. 

And in fact it's the identification and removal or manipulation of these  substreams that allow modern day codecs like H.264 and MP3 to achieve compression ratios much higher than 25% as we did with the text.

These codecs are called Lossy because by taking into account the higher loss threshold of the medium they will perform much higher manipulation to the individual substreams at the cost of introducing loss via error knowing that as long as they stick within tolerance the message quality won't suffer irrecoverably.

There are indeed Lossless CODECs that swap the balance and ensure quality of the substreams over compression ability.   FLAC for Audio and Lagarith for Video are but two - you can read more here: http://en.wikipedia.org/wiki/List_of_codecs

Looking at my text example above - a Lossless CODEC would be akin to the text messaging there.  Removing spaces and substituting characters that mean the same thing but in a simple format.   A Lossy CODEC would do further work looking at entire sentences and removing whole words and coming up with clever ways to rebuild it during decompression.

In today's online video world we suffer fro the Problem Number 1 and so Lossy CODECs are what we need to make sure we get our data down the limited pipe.  No doubt as internet bandwidth increases globally we'll see a time when Lossless CODECs will come to the forefront and posts like these will go the way of the dodo but we're not there yet and I'm still in a job.  

So how does a video codec like H.264 manipulate the substreams to get a high rate of compression?  It's a process called frame-residue storage. 

Now please note from here on I'm not going to get overly technical.  Partly because this outside the scope of this series and partly because even I struggle to comprehend the real science of the matter!

So high level we need to look at the video data stream in 4D - as a data stream that has a time axis to it.  Each slice of time in an uncompressed video data stream is a 3D image (a Frame) of the scene.   Just like a flip book you use to draw as kids, if progress (flip) along the timeline fast enough (Frames Per Second)  you get seamless movement and in turn video.

Now very simplistically what H.264 does as codec is to look at video as a flip book with all its individual frames and selects what we call Key Frames or I-Frames.   These are full featured frames, as if all substreams pulsed at once to give the complete picture.   These Key Frames are then spaced more or less evenly apart (typically around 1 second).

We now have a heartbeat pulse of 1 second of the video stream - not enough data to give smooth motion considering it takes about 25 Frames per Second for us to perceive it as motion but we can start getting the gist of the overall message across the stuttering data stream.

The next step is then to fill in the gaps.   And what H.264 does is look at the difference, delta, of the current frame in relation to its neighbouring Key Frames.  This difference is referred to as the residue.   Basically what has moved in the video field of view between the last pulse.  By focusing on what has moved we can eliminate what has not moved which turns out to be quite a bit when we talk about very small time slices of video.   This can then be discarded and we have a compressed stream of key frames and change information.

So what gets stored in the H.264 file (and most other lossly video CODECs) are the key frames and the changes in the substreams between them.  This allows for very high compression but the story doesn't end there.   Because other elements can come into place such as bitrates, framesize, subpixel size, P and B frames and much more.

This last list is more a way of tweaking the residue that is detected to further refine how much data can be discarded.

In the next part I'll look at this refinements in more detail.

-- Cameron Church

 

Player Publishing & Design Comments (0), Tags:

Live Broadcast of the Facebook Garage Event

Posted by: Cameron Church, November 11, 2009

I'm heading down to give my 15mins of cents to the London Facebook Garage tonight.

For those not able to make it tonight we're going to do what we did with the Drupal for Marketing event and stream this live over the BC3 platform.

We'll also have the same tie into a Facebook Livestream box and you can embed the stream directly into your FB Profile by clicking the button in-player.

You can see more about the event here : http://www.facebookgarage.co.uk/

Enjoy!

Please note that the stream probably won't come up until 7pm so keep trying to connect.

This event has now closed and the player taken down. Was a great time! Head over to the Facebook Garage website to view post event videos

 

Distribution Strategy , Player Publishing & Design Comments (0), Tags:

Speaking Gig at the next Facebook Garage London

Posted by: Cameron Church, November 10, 2009

Just an FYI - for those in the London area that are keen, there is a Facebook Garage user group tomorrow night (November 11th) which I'll be presenting at.

I'm going to spend my 15 minutes of fame looking at how Facebook and Brightcove can combine to be a powerful tool in both the Push and Pull video syndication models.

I'll post my slides up here after the show but feel free to come on down and learn not about my stuff but other great presentations around developing with Facebook.

Facebook Garage : http://www.facebookgarage.co.uk/

The Eventbrite Invite : http://facebookgaragenov.eventbrite.com

Drop me a note if you're coming down.  There's free pizza and beer!

-- Cameron Church

 

Comments (0), Tags:

Live Broadcast of the Drupal For Marketing Event

Posted by: Cameron Church, October 29, 2009

Tonight our technology partner Drupal will be hosting a Drupal for Marketing event here in London.  You can see details about it here: http://drupal4marketing2009.eventbrite.com/

A couple of Brightcovers are going over to participate and we thought it would be fun to follow in the footsteps of Manchester City FC and live broadcast part of the event.

You can view it in the player below and the feed should start around 6.30pm GMT - feel free to post it on your Facebook profile by clicking the FB Share link.

Please note that if the stream doesn't start to referesh the page and try again.  We're not exactly going down with pro kit and so the stream may drop etc.   We'll be recording this as we go for future posterity.

Our Player

Has been taken down as the event is over!

-- Cameron Church

 

Comments (0), Tags:

Code Along with Cam : Next Gen Embed Video in Facebook News Feed

Posted by: Cameron Church, October 28, 2009

I've been reading a great post by fellow Brightcove Blogger Chris Little over at our Ecosystem blogroll about how Brightcove Players have been whitelisted by Facebook. 

This essentially means that a user can share a video from your player/site and have it appear in their FB Newsfeed for immediate inline playback.

I have need of such an integration to help spread the word of a live event we're looking at doing with Drupal tomorrow.

After digging into the code - I found it had some limitations given the FB's architecture requires the metadata of the video and player to be hosted on a HTML page.   If you're doing contextual publishing then this can be relatively straightfoward.

But I'm more interested in build this out in a BEML component that can be transported to any of my player templates.

To do this I needed 3 things

1. A server side script to create the meta tags on the fly

2. A BEML component to call the FB Sharer URL

3. A BEML Image link added to the player to allow a user to action it

Read More →

 

Custom Component Design , Distribution Strategy , Player Publishing & Design Comments (0), Tags:

Video Encoding 101 - The Problem Number 1

Posted by: Cameron Church, October 22, 2009

The series so far:

Introduction - http://blog.brightcove.com/global/2009/10/video-encoding-101-the-series.html
The Beginning -http://blog.brightcove.com/global/2009/10/video-encoding-101-from-the-beginning.html

So.... the$64,000 question: What is Video and how to do we delivery it over the web?  In its most basic sense video is just a consecutive series of static images presented fast enough that our brains process the incoming feed as a stream of continuous scenic data.

To get further in depth around the structure of video is out of scope of this series but here are some lovely links if you want to get into the really nitty gritty of video and its science:

The key measurement of video is that of quality.   As we discussed previously there are 4 fundamental medium to deliver information over the web: Text, Images, Audio and Video.   These increase from left to right in both their ability to efficiently deliver contextual data but at a cost of an exponential increase of transport data required.  So on the far right of the spectrum occupied by video is need for a good (or higher) degree of quality as the resolution of a data stream is what our brains use to match the incoming signal to our memory banks.   If we can't distinguish an object then we fail in converting (transcoding) the video stream into our thought streams. 

What level of quality is needed for a specific stream is very subjective and largely dependant on the focus of the message (factual/news typically less quality vs. engaging nature films that require high quality).  It can also be incremented (or decremented) by any accompanying audio stream's overall quality.  There are certain rules of thumb about how low you can go and we'll get into that in later instalments. 

The more contextual information you deliver the more inference the consumer can do in terms of deriving unique and targeted messaging.  This is why we mostly prefer to watch the news over listening to a bulletin over the radio.   In the same attention span the provider can pack so much more contextual data for the user to sort through and focus on what is important to them.   It makes it much more personal.

Video is broadband messaging.

As discussed in the last segment video is a massive data stream.   Depending on who you believe our eyes can process anywhere between 100Mbps to 200Mbps.   We also see at a resolution of around 324 Megapixels with our brains sampling this much data in a fraction of a second (although our focus is a subset of this field of vision).

In comparison in the UK the average broadband user has a pipe about 8Mbps wide with a sustained throughput of 25% of the overall pipe.  Or 2Mbps for all their internet traffic.  Or in other words a factor 100x difference between what we see in real life and what can actually be presented to us.

So there we have it - our Problem Number 1 broken into its parts:

  1. Video as a format and medium can be used to deliver upwards of 200Mbps of data to our eyes and brains.
  2. Using the internet for part of this transmission sees that delivery pipe shrink to an average of 2Mbps (and smaller for mobile device delivery)
  3. And we need to maintain a certain level of quality to ensure the message is delivered with enough data to ensure the message is delivered and transcoded properly

All this fuss is really to tackle point 2.  If you're using video in the online world then this is your issue.   And probably why you're here reading this blog series.   Until the world all gets fibre optic cables to our door then we need to figure out how to fit the round peg (video) into the square whole (an Internet originally designed for the delivery of text).

And the weapon of choice?  Compression.   Taking something very large, compressing it into something very small, then decompressing it at a later date and time so that original message/stream is preserved with a high degree of accuracy.

There are 4 topical areas in the process of Video Compression:

  1. The ENCODING SPECIFICATION : all the scientific mumbo jumbo that explains how data is to be held and described (think of it as a language and its associated rules for creating words, sentences, grammar, syntax etc)
  2. The CODEC : the code and process that wraps around all the math and science of the ENCODING SPECIFCATION to COmpress and transform the data using the framework specified by the encoding format and DECompress it back to an uncompressed state (CODEC),
  3. The ENCODER : A software app the wraps around 1 or more CODECs and exposes the properties of each
  4. The DECODER : The sofware app (player) that decompresses the video and presents it back to the user.

I'm going to spend most of my time around the first 2 area and in particular the current industry standard for online video delivery - H.264

H.264 - is a specification that allows for video data (either compressed or not) to be examined in way that allows for efficiency (typically of a very high degree) savings to be made and allowing it to be pack into something much smaller then its parts. 

H.264 is by no means the only specification out there: we have Windows Media VC1, ON2, XVID to name but 3.  I'm focusing on H.264 mainly because its the closest thing to a standard we have right now for online video with both ISO and ITU setting it as their preferred codec.   With those 2 on board you can't get any more "standard" these days.

In the end though all mainstream codecs pretty much do the same thing.   Treating video as a continuous set of full-framed images they have figured out a way of removing many of them and replacing them with vector representations of their changes across the time frame.

It just so happens that H.264 (MPEG) have figured out how to do this realllllly well, got some serious industry bodies to back them and not tie themselves to any major video platform/device (yes Microsoft even has signed up for it!).

So how H.264 and other codecs do this compression is a secret sauce that distinguishes them.   But in the end it all boils down to identifying Key Frames, which are effectively full-framed images in the video time stream that will be used as a starting and end point of any vector analysis.  

Once identified in the most basic terms the specifications offer ways of describing changes between these 2 end point Key Frames and the resulting vector information is much smaller in data size then frames they will replace.   Just like blueprints that describe how to build something is much smaller then the actual built object, so the compression part of the specification is how to create blueprints for the series of images between 2 key frames.

All they need at later point in time is someone who understands how to read those blueprints to rebuild the object as it was described.

But nothing is perfect, and this blueprint creation is not (yet) flawless.   In the next post I'll look in more detail on how this vectoring is done and where things can and do go wrong.   From there we can then look at strategies to correct them.   In the end we'll be seeking great quality and in turn solving our Problem Number 1.

-- Cameron Church

 

Video Production & Editorial Comments (0), Tags:

Video Encoding 101 - From the Beginning

Posted by: Cameron Church, October 10, 2009

The series so far:

Introduction - http://blog.brightcove.com/global/2009/10/video-encoding-101-the-series.html

So to start any discussion we need to begin with the fundamentals.   Specifically what is the process of video encoding?   Or even more generally what is encoding and how does it apply to Online Video? 

At its very fundamental sense encoding is effectively the storage of data in a well defined format.   An example of encoding is my writing this blog post: the thoughts and abstract ideas in my head (the data) is written (encoded) into words and sentences following a series of rules (the format) so that the reader , already skilled up with these rules, can consume and understand this data at any time (transmitted) in the future (decoded).

As you can see the process of encoding has a pre requisite of needing data to work on.  This packaged data can then be transmitted or stored well into the future to be unpackaged / decoded at any time by a reader that understands the rules and structure of the packing.  The goal being a minimal loss in meaning of the data from the time it is encoded to when it is decoded and consumed.

The process is essentially the same where the data can be anything from abstract thought, to a snapshot of time or a period of time: all that differs is the effectiveness of the format used. 

  1. Written language is great for instant abstract thought streams but video is overkill (think Twitter)
  2. Audio recording is great for conversational data streams (the Telephone)
  3. Video recording is ideal for scenic data streams (YouTube)

The differences between the 3 examples above is the amount of data needed to be transmitted for each scenario.  Twitter has a maximum number of up to 140 characters to post which, for comparison, is about 560 Bytes of information.   Take a high definition video recording of a 3 minute timeline (the same time it would take me to come up with something interesting on Twitter) this could easily take up over 50 MBytes - that's a over size difference of over 100,000x in the data being transmitted!

The 4 base formats: Text, Images, Audio and Video align in this order on a scale of effectiveness around data transmission given increasing data size.  Or in other words, as you slide from the highly focused side of the scale to the highly contextual size your need to store data to maintain message quality increases exponentially.

And when it comes to Video and its delivery over the web we hit our fundamental challenge - our Problem Number 1.   How do we take something that requires so much data to convey its message at a maintained quality level and push it down a pipe designed to deliver Text?  The mother of all Square Peg - Round Hole problems.

But I'm getting ahead of myself here.  Before we start down that road we need to just become a bit more familiar with Video as an encoding tool.  And more specifically around transcoding - the process of switching from one format to another.

In the next instalment I'll be breaking down Video encoding into its component parts.   Looking at the pieces in turn and setting the stage to start the investigation around how we can solve our Problem Number 1.

-- Cameron Church

 

Video Production & Editorial Comments (0), Tags:

Video Encoding 101 - The Series

Posted by: Cameron Church, October 6, 2009

It seems we've finally hit that critical mass.   The novelty of online video is starting to wear off quickly and we're now left with acceptance and expectation from the the online community that a website must have video as a core component of its design and offering.

Services such as the iPlayer and Hulu have made catch up TV the primary way to view episodic content for many teenagers and young adults.

The iPhone has made consuming the latest video on the move all the rage.

Even the governments of the world have embraced video as a core to their communication strategy.

But beneath all this flair and business uptake lies the open questions around what exactly is online video?  how do we make? and possibly most importantly how do we make it well?

No doubt you realise that video and its challenges has been around for quite some time.  Just do a search for MPEG and read about its history all the way back to 1988 - an organisation set up to tackle the specific problems with digitising, compressing and delivering video. 

For up until now digital video delivery was only a problem for the major broadcast houses that crammed every little bit down through the airwaves to your television box.   As long as the signal was strong and the picture true there was no problem.

But along came the internet.   And time and again it ripped up the old paradigms in favour of the masses.  Video was no exception - YouTube showed (ad nauseum) how much people craved having control of their broadcast and consumption.  The success of Brightcove has shown how important video is to business of all kinds.

Video is here to stay - but what is it?  What does it mean to you?  And how can it add value to your users and bottom line?

In this series of posts I'm going to be looking at online video from the ground up.   Topics like:

  • What is Encoding?
  • What is Video Compression?
  • Why do I need to worry about all this?
  • HD vs High Definition - no they don't mean the same thing!
  • What is a CODEC?
  • Choosing the right CODEC
  • How to Build an Encoding Profile right for your business and users
  • Does Bigger Bitrate = Better Quality?  Yes and No
  • Tools of the Trade
  • Taking it to the next level - what business rules and implementation issues do I need to worry about?

My intention is to try and help demystify the dark art of online video creation.   Take it from the cathedral to the bazaar.   Give you the power to create a visual experience that keeps your users coming back for more.

Throughout this series I'll be focusing on one technology in particular - H.264 - don't worry if you  don't know much about it now.   I'll hopefully explain it well enough in the posts to come.  Its by no means the only video encoding technology out there but it is one of the fastest rising stars currenty.

To see the power of this particular technology is to believe.

Below is a player full of videos I've compressed down from High Res (8000Kbps) videos located here.  Download the source files, and view them locally.

Then have a view at the videos in the player - all come in 3 flavours 1500Kbps, 750Kbps, 500Kbps - see if you can tell the difference in quality.   Note that the most average of internet users can consume a video encoded at 500Kbps without any stuttering or loss of experience over their connection.   You can serve this quality to your end users with minimal cost to either you or them.

This series is intended to be a conversation - I encourage you to use the comments section of the various posts to let me know your thoughts. Give us your tips & tricks. Share your experiences.

The industry and user expectation is moving on rapidly.   Getting the video right for your project is paramount.  Follow along as I try to navigate you to the promised land.

 

Video Production & Editorial Comments (0), Tags:

Accessiblity is Key - UPDATED!

Posted by: Cameron Church, August 21, 2009

I received a comment on a past post I did in April looking at creating a custom BEML component that allowed a player to be controlled via the keyboard. A big step needed to get towards a universally accessible player.

Chris kindly pointed out that although my component worked in IE it failed miserably in other browsers like Firefox.   So I opened up the code and did some repairs and modifications.  

Below you can see the player and you should be able to control it using the arrow keys:

  • UP - Play/Pause the video
  • DOWN - Stop the video (and send it back to the beginning)
  • LEFT - Seek back 15 seconds
  • Right - Seek forward 15 seconds

Read More →

 

Custom Component Design , Player Publishing & Design Comments (2), Tags: