Wednesday, April 25, 2012

Video encoding and file conversion tips

Most digital signage users will incorporate video material at some point in their playlists and schedules.  In many cases the bulk of the material will be provided by the client or re-purposed from another source... and that's when things can get messy.

Sometimes, you'll get a video that plays fine on your big old desktop PC so you figure it's fine and you upload it to your players.  Then you find out the clip causes all sorts of problems after looping for hours on your micro fanless PCs and you don't know what's going on.

This is where a little knowledge can go a long way...

So what's the best codec or file format?

I am often asked, "what's the best video format/codec that I should use for my digital signage" and my answer is always... "depends!"

There is no single answer because each situation is different.  You have a wide range of PC and display screen configurations out there so it's impossible to guarantee perfect playback all of the time.

Having said this, there are a few rules you can follow to ensure the best possible outcome and high reliability:

  • MPEG-2 is a good place to start.  It's a decent compromise of quality and performance. This video standard offers decent image quality but WMV9 and H.264 encoded files often look better. Not the most efficient in terms of CPU usage but not the worst either.
  • WMV9 is a good video encoding choice for Windows based PCs.  However the resulting WMV file can be quite CPU intensive at higher resolutions.
  • H.264 will provide really good image quality at a price.  Higher compression rates mean more CPU load.  The faster the PC, the better the results with this one.
  • In some cases, MPEG-1 can still be a viable option so you should test it if nothing else works for you.
Learning about video formats and codecs isn't for the faint of heart. In fact, it sometimes feels a bit like alchemy... part magic and part science. Now you may ask yourself, "Shouldn't my digital signage software take care of all this?".  Well the short answer is... No!  If you plan to display video on your screens, you should have a basic understanding of what's going on behind the scenes.

Digital signage is made up of many components:  PC hardware, TV screens, software, content, etc... And each component can affect the performance or stability of the entire system. If you feed the system bad content, you will get a bad outcome.  It's really that simple.

So let's dive in and learn something...

Lesson #1.  What is a codec?

Raw or uncompressed video files tend to be very big.  These are the files that you get out of a professional quality video camera.  This is the raw footage that is used for editing.  These files are not meant for playback on your PCs.  They are way too large and would require too much storage space and computing power to be useful.  This is where codecs come into play.

A codec is a program designed to compress or decompress a video file.  Videos are encoded to reduce their size and make them playable on a wide range of PCs and consumer devices.  So it's important to know what codec was used when someone hands you a video file.  That's one way you can determine if the content is suitable for your application.  If not, you can go back and specify the codec of your choice or you can ask for the original file and convert the clip yourself.

There are basically two types of codecs.  Those who perform lossy compression (meaning some image and audio data is removed to achieve smaller file sizes) and those who perform lossless compression (very little data is lost).  Lossy codecs are the ones you will encounter at the playback end.  Most videos meant for playback are encoded with lossy codecs.  Lossless codecs are used when archiving files or for high end editing.  They are never used for playback.

Lesson #2. What should I look for in a codec?

A good codec should provide a decent amount of compression while delivering good image quality.  And here's the rub, there are always compromises.  Codec A creates really small files but image quality sucks.  Codec B creates huge files however image quality is amazing. So your answer lies in the middle.  You want a codec that will give you the best of both.  Good compression and good playback quality.

Oh, and one more thing...  You want a codec that manages memory well.  There are codecs that perform amazing feats of compression and deliver high image quality that will deplete a PC's memory in hours.  They consume memory each time the clip is played and never fully release it so eventually the PC runs out of resources and crashes.  This is one of the most common issues you see related to video playback.  

Here are some common codecs you will encounter:
  • DivX - There are 2 flavors of DivX.  One follows the MPEG-4 standard and the other follows the H.264 standard.  This is a proprietary codec.
  • XviD - This is a video codec library that follows the MPEG-4 standard.  It is a free codec.
  • WMV - Windows Media Video is a video compression format that supports several Microsoft codecs. The most common codec you will see used with this format is called WMV9.
  • MPEG - Represents both a series of video formats and standards.  The most common are MPEG-1, -2 and -4.
  • H.264 - Also known as: MPEG-4 or AVC, is probably the most common high definition video codec available.
  • Sorenson Spark - This is a codec used to encode videos delivered in Flash Video format (FLV).  You use the Sorenson Squeeze encoder to generate these types of files.  Note that Squeeze can also transcode to other codecs and formats as well.  

NOTE: These are the most common codecs you will see. I didn't list them all so if you find something else and you're not sure if it applies to your situation... Google it!

Lesson #3. What's a container format.

A container is a file format that can host different types of data (compressed audio and video for example).

Here are some common container formats:

  • AVI - These files can contain audio and video content that are encoded with different codecs.  AVI is not a codec.  It is a container format that is mostly used on PCs.
  • QuickTime (MOV) - The QuickTime format originated on the MAC but it is popular with PCs as well.  You will often see MOV files encoded with the H.264 codec but other codecs can be used.
  • Flash Video (SWF - FLV - F4V) - This is another container format based on Adobe Flash.  This format is mostly used to deliver video on the web.

Don't confuse AVI, QuickTime and Flash Video with codecs because they are not the same thing.  They are containers.

Lesson #4. Bit rates and frame rates, Oh My!!!

To make things interesting, we have a couple more variables that affect playback performance.

  • Bit rate: In digital video, bit rate represents the amount of information, or detail, that is stored per unit of time of a recording. The bitrate depends on several factors (which we won't discuss) but you can read more about it here.

    Bit rates can be expressed in kilobits per second or megabits per second.

    Here are some examples of recommended bit rates for a given video resolution and compression level:
    • 9.8 Mbit/s max: DVD (using MPEG2 compression)
    • 8 to 15 Mbit/s typ: HDTV quality (with bit-rate reduction from MPEG-4 AVC compression)
    • 19 Mbit/s approximate: HDV 720p (using MPEG2 compression)
    • 24 Mbit/s max: AVCHD (using MPEG4 AVC compression)
    • 25 Mbit/s approximate: HDV 1080i (using MPEG2 compression)
    • 29.4 Mbit/s max: HD DVD
    • 40 Mbit/s max: Blu-ray Disc (using MPEG2, AVC or VC-1 compression)

  • Frame rate: Represents the amount of frames that are shown per second.  Without getting too technical, it's recommended to keep your frame rate below 30 frames per second when preparing files for PC playback.  You can go lower that 30FPS (like 24 or 25 fps) but you may see some blurring if your clip features quick motion shots and panning.

    Anything above 30 FPS is a waste of CPU cycles and you won't notice the difference on screen.
    The higher the frame rate, the more the PC's CPU must work.

Lesson #5. What's "transcoding"?

Transcoding refers to the direct data conversion from one encoding method to another.  For example,  whenever you convert a file from a DVD VOB format to WMV you are transcoding the video file.

Here are a couple of things to remember.  Transcoding a compressed video to another compressed format will result in loss of quality and often increase the file size.  It's better to transcode from a lossless (or uncompressed) file to a lossy format.  That way you won't lose too much information and the file will be smaller.

Lesson #6. Why is it a bad idea to use a VOB video file in my digital signage software?

VOB is the standard container format for DVD video.  You will find these files on video DVDs (usually on commercial DVDs). A VOB file can contain much more than just audio and video.  The file can contain subtitles, DVD menus and navigation content. VOB files found on commercial DVDs are usually encrypted and it is illegal to decrypt them.

Unencrypted VOB files can be played by renaming their extension to ".mpg" because these files are a special version of MPEG-2.  However the results may not be great because the files are not optimized for PC playback.  If you are stuck and need to play the content of an unencrypted VOB file, I would first try transcoding it to a more "standard" format like WMV or H.264.

Last but not least. What's the best video resolution for digital signage?

Full HD or 1080p has become a popular video standard for good reason.  A big screen displaying full 1080p video is a thing to behold.  But in terms of digital signage one can ask if the juice is really worth the squeeze...

Consider this:
  • 1080p video really comes into play when you are using large display screens.  Any screen size above 32" is a good candidate for 1080p because the image is so much larger.
  • The 720p HD format is great for screens below 32" because smaller images tend to look sharper. It becomes much more difficult to see the difference between 720p and 1080p below this screen size.
Now, it's pretty difficult to tell which screen resolution is being used on a  42" screen hanging 10' from the floor from any given distance.  So you must ask yourself it's it really worth using 1080p given that video files become exponentially larger and require more PC resources than lower resolution content.

In my opinion, you need to look at the big picture.  What PC hardware are you using or planning to use?  If you use low-cost Atom based PCs with limited resources, why not give yourself an edge and feed it 720p content instead of 1080p?

This isn't to say you can't play 1080p on an Atom box but you put all the chances on your side if you stick with a lower resolution and you get more benefits, such as: 
  • Lower storage requirements.
  • Quicker file downloads/reduced bandwidth usage.
  • Faster transcoding.
  • Opens up the possibility of using WiFi instead of hard wired connections.
  • Etc...

In conclusion...

There are many factors that affect video playback performance and PC stability.  You need to figure out what is the target resolution for your screens and then work beck from that.  Look at your hardware. Test using various file formats for at least 48 hours before settling on a particular file format and codec pairing that works for you.

You need to test... test... and test some more...

Here are a few links to helpful resources:

Friday, April 20, 2012

Using mobile marketing techniques on your digital signage screens

Audience interaction is a great way to capture your viewers attention and this is where mobile marketing comes into play.  By asking your audience to perform a simple act like sending an SMS message or entering a short code into their mobile phone, you engage them and create an immediate connection.  The reward can be a downloadable coupon or text message that can be redeemed in exchange for a rebate or other incentive.

Mobile Marketing is gaining traction for the following reasons:
  1. It is easy to implement: There are many companies that offer these types of services online.  Setup is quick and in many cases you will find the cost is reasonable enough for a very small campaign.
  2. Results can be measured immediately: Mobile marketing service providers offer statistics and online tools you can use to measure your campaign's effectiveness in real-time.
  3. Mobile marketing is ideal for reaching younger consumers: Younger demographics have embraced this medium while older folks are getting used to the concept of receiving coupons and incentives on their mobile phones.
Consider this...  smartphone use is increasing and the public is already familiar with mobile applications so the rate of acceptance continues to grow.  This is why you should consider adding a mobile marketing component to your digital signage advertising plan.

Mobile marketing campaigns are not dependent on any specific digital signage solution technology.  In many cases, these ads can be rolled out as static images so they require very little effort on your part.

Here are a few suggestions:
  • Think of one or more promotions that would benefit from an instant coupon.
  • Check out one of the current mobile marketing agencies like BlueFire Digital, Mozeo or Trumpia.
  • If you plan to use mobile keywords for your campaign, remember your audience will be using a smartphone keyboard so keep it short and simple.
  • Be sure to include all the necessary information into your digital signage ad.  Leave the information on screen long enough so viewers can absorb the message and react accordingly.
  • Consider all of the available mobile marketing technologies for your campaign.  SMS, mobile keywords, Bluetooth and QR codes are all great tools you can incorporate into your digital signage advertising plan.

Thursday, April 12, 2012

What's the hidden cost of digital signage content

I just read a great article on the hidden costs of digital signage content (click here for the original article).

As the article states, you don't always know who really owns advertising content.  Don't expect an ad paid for by a brand owner can be used at no additional cost.  Actual ownership of the ad may not have been transferred to the people who actually "ordered" it.  When this happens, the creative people who produced the ad retain ownership and they get paid each time it is used. This happens when a brand owner decides to keep their advertising costs low.  They don't purchase the ad itself, just the rights to use it.

In many cases usage fees will fluctuate depending on the target audience so an ad shown on national TV will be charged at a higher rate than when it is shown on a private digital signage network and the difference can be quite substantial. If you want to use that ad on your signage network, you must pay usage rights.

Fees must also be paid for royalty-free photography, video and audio content. This material is usually less expensive to acquire but you never actually purchase the media itself. You purchase the right to use the media for a specific purpose so the price will vary accordingly.

Then we have content that falls under a Creative Commons license or available in the Public Domain.

It's critical to determine who owns the content before you start distributing it.  Ultimately the cost will be based on the intended use, but remember there is no such thing as a free lunch.

Read the fine print and if you are unsure about the specific rights or ownership of any media, talk to the people providing the material or someone who specializes in copyright law.

Monday, April 2, 2012

Publishing live calendar information to your Navori QL screens

I have been researching easy solutions you can use to display live calendar information in Navori QL.  My search was based on the following criteria:
  • The solution had to be inexpensive (or free).
  • There should be no coding involved.
  • The solution needed to be seamless and require the least amount of steps.
I came up with two options...

Option #1 - Publish calendar information via a free online calendar service

This solution requires you to create and manage your calendar online.  There are many services that you can use for this (RSSCalendar for example) but I found 30 Boxes to be the easiest one to use.  It is a free online service that lets you publish your calendars as RSS feeds.

You just create an account on the 30 Boxes site, enter your data and publish it to RSS.  

Copy the RSS feed's URL and paste it in QL's Data Feed Manager.

That's all there is to it.  Next time you edit or update your online calendar, the information will be updated on your QL Players.  No software to buy and no coding involved.

Option #2 - Publish calendar information via XML using Outlook and Access

This is a free solution (as long as you own a copy of MS Access) and there is no coding required.  However, you must convert the calendar and publish the feed manually.

Here are the steps:  
  1. Open the calendar in Outlook.
  2. Under File, select Options > Advanced > Export.
  3. This will launch the Import and Export Wizard.  Select Export to a File.
  4. Select Microsoft Access. Click Next and then select a location to copy from (your Calendar).
  5. Enter a name for this file and browse to the folder where you wish to save the file.
  6. Click Next.
  7. You may select only certain fields or export all of them.
  8. Next you will be asked to enter a specific date range.
  9. Click OK to generate the Access file.
  10. Open the file in MS Access.
  11. In the Database view, right-click on the Calendar icon.
  12. Select Export.
  13. Under Export Table "Calendar" to..., enter the name of the exported file and specify Save as type (*.xml).
  14. Post the XML file to your server and then import it in QL's Data Feed Manager.

In conclusion...

Option 1 is by far the easiest to implement.  Downside is this is you must manage the entries using a 30 Boxes account.  It won't synchronize itself with a corporate Exchange Server for example so this is probably a good solution for small businesses.

Option 2 is more complicated but it has the advantage of working with Outlook. This means corporate users can take advantage of this option to publish their calendar information without having to invest in a dedicated software solution to synchronize their Exchange data with Navori.

There are more robust ways to publish live Exchange calendar data which I will cover these in the near future.