Nuxeo Digital Asset Management (DAM) is a powerful tool that lets you manage your digital assets - images, videos, PDFs, Office documents, and audio files without requiring any configuration. It can index their content (when relevant), extract their metadata, generate previews and thumbnails, and provide a default UI.
Speaking of videos, we have four main default behaviors:
- Automatic transcoding (mp4 and WebM)
- Player available in the browser (which makes even a very big HD video viewable)
- Storyboard (which allows a user to start playing the video at different time frames)
- Main metadata extraction (so that format, size, duration and frame rate are available and can be searched using facets, if needed)
In this blog, we will discuss about transcoding videos in Nuxeo. Nuxeo has two automatic transcodings (mp4 and webM). When a new video file is added or an existing one is modified, it is transcoded and is ready to be used ( for example, if the WebM format fits very well with the browser’s player, then WebM will be the transcoded format). This behavior can easily be configured, and you can add/remove automatic conversions as you wish (see this blog). Also, transcoding is done asynchronously so that the user doesn’t have to wait until the transcoding is complete, which can sometimes take a while depending on the size of the original video.
Behind the scenes, nuxeo uses ffmpeg to transcode videos. It is a very powerful tool - well known, and open source with a business-friendly license.
The other way to transcode videos in Nuxeo is to use the Amazon Elastic Transcoder service. In this case:
- The transcoding is done in the cloud (instead of being done in your system2) and it can scale.
- Use the AWS SDK to send the video to an S3 bucket, start the Elastic Transcoder job, detect when the conversion is done and then get the result from the S3 bucket.
This way when a new video is added to your DAM (or a video is modified), it is – asynchronously – sent to Amazon Elastic Transcoder and the transcoded video is downloaded and made available for your users.
Theoretically, using Amazon Elastic Transcoder with Nuxeo should be quite straightforward. All you should need to do is:
- Set up your AWS environment (have an AWS account, set up the S3 buckets, the Pipeline, etc.).
- Using the AWS SDK to send the video to a S3 bucket, start the Elastic Transcoder job, detects when the conversion is done and then get the result from the S3 bucket.
Well, the fact is, it was quite straightforward to build such a plug-in! And so you don’t have to repeat these steps, you can find a working plug-in doing all this on GitHub. Its README file explains everything, and it is really easy to use.
- Put your AWS keys in nuxeo.conf.
- Install the plug-in via its Marketplace Package.
- Add your XML configurations defining the transcoding you need.
Yes, it’s that simple. Just add some XML and you’re all set!
For example, in this screenshot…
… we configured some XML so that:
- The “Generic 480p 4:3” and “Web” transcodings are done automatically.
- The “iPhone5” transcoding will be done on user’s request.
The plug-in is available as a Marketplace Package (see the “Releases” tab of the GitHub repository). Download the nuxeo-aws-elastictranscoder-mp-7.1-SNAPSHOT.zip file and install it (from the Admin center > Update Center > Local package, or from the command line).
(1) On dedicated nodes for scalability, see “Dedicated Processing nodes” in this page).