They say that a picture is worth a thousand words. For modern websites, a video surely takes the visual impact to a whole new level.
Nowadays, people enjoy the amazing capability of shooting videos with smartphone cameras that easily fit in their back pockets and are accessible nearly everywhere. Modern web applications have an opportunity to dramatically increase their visual impact by showcasing these videos online. Between news reports, user shared video snippets, explainer videos and ad campaigns, we see more and more videos appearing daily in our visited websites.
Supporting the backend required to transcode these videos from non-normalized hi-res originals over to HTML5 web friendly video formats is a non-trivial technical process. Many developers spend considerable time building in-house solutions to solve these redundant tasks.
Cloudinary’s image asset management service was publicly launched about 3 years ago. Since then it has become the leading cloud-based image solution, simplifying the life of more than 50,000 developers by leveraging Cloudinary’s end-to-end solution: image upload, cloud storage, powerful administration, image transformation and fast CDN delivery. All that with simple one liners of code that developers love.
Throughout the years we’ve been asked by our customers for a solution for video clips. People were searching for ‘Cloudinary for video’. Today we are excited to introduce Cloudinary’s new video asset management solution, an end-to-end cloud-based video asset management service that joins our image asset management service, shares the same concepts, usage simplicity, high performance and strong integration with web and mobile development frameworks, and improves your website’s loading speed while reducing your bandwidth requirements and IT costs.
Here’s a short overview video of Cloudinary’s video management solution (make sure to turn on your speakers 🙂
Cloudinary’s service aims to cover all image and video related needs. With a single line of code, developers can start uploading media files to the cloud and with another line of code add dynamically generated image or video content to their site, matching their graphic design and product requirements.
The video asset management service currently supports the following:
An API for uploading any media files, including images and videos from your back-end application or directly from the browser or mobile application.
Automatic video transcoding and normalization for optimized viewing on all web browsers and mobile devices, improving your website’s loading speed while reducing your bandwidth requirements and IT costs .
A rich set of video transformation capabilities: scale up or down, crop, rotate, modify quality, adjust video codec settings, control bit rate, video trimming, thumbnail generation, conversion to animated GIF and lots more.
Dynamic delivery URLs with on-the-fly transcoding and real-time transformation while streaming the video content.
Worldwide CDN delivery with streaming support for best performance.
An Interactive Media Library for browsing through your media files.
SDKs for all popular web and mobile development frameworks for easy integration with HTML5 sites and mobile apps.
We eliminate video asset management hassle and R&D work on your side as we have done for images, while providing plenty of features for achieving more advanced results.
You can let your users upload video files of any common format to the cloud using an authenticated API or directly from a browser or mobile application.
The following code sample in Ruby on Rails, PHP, Node.js and other frameworks performs uploading to the cloud:
The original video is stored in the cloud and available for streaming delivery via Akamai’s CDN. You can then transcode the video to the three main formats supported by web and mobile browsers (MP4, WebM, OGV), while significantly optimizing their size for faster loading. Simply set the file format extension to
.ogv. Setting the
video_codec parameter (
vc in URLs) to
auto will apply the best codec settings for web viewing even if the original format was already one of the three main formats.
The example below delivers an MP4 video while optimizing it for web. The video file size was reduced from 9.1MB to 2.7MB, which means a saving of 70% on bandwidth and loading time while maintaining the same visual quality.
As you can see below, converting to other video formats such as WebM is done by simply setting the file format extension of the URL to
You can add transformation instructions to delivery URLs in order to transform the videos to match your graphic design and your users’ specific devices. New requested videos are transformed on-the-fly in real-time in the cloud. For larger videos you can pre-generate all transformed derived versions eagerly while uploading.
We also provide a rich set of video transformation capabilities in addition to the video format conversion that was mentioned above. The transformation capabilities and their URL-based API are the same as Cloudinary’s image transformation capabilities.
height parameters can scale your videos up or down. For example, delivering the same video scaled to 200×200 pixels:
Videos can be cropped using various modes and gravities. For example, the following dynamic transformation URL crops the original image to fill a 200×200 square with north gravity.
As the example below shows, videos can be trimmed by specifying
end_offset, rotated using the
angle parameter and have significantly reduced file size by controlling the
Image overlays can be added using the
overlay parameter as well as dynamic text overlays of any font and style. Multiple overlays can be added at different times for different durations. In addition, the audio channel can be removed by setting
Web apps that embed videos usually prefer to display thumbnails (poster images) of user uploaded videos with a play button for loading and playing the video interactively. You can generate thumbnails of uploaded videos by simply setting the file format extension to an image format such as
jpg. You can also specify any image dimensions and crop mode, as the following 300×150 example shows:
Custom thumbnails can be selected by specifying the
start_offset parameter. Any image transformations already supported by Cloudinary can be further applied. The example below creates a 300×300 circular cropped thumbnail of the frame at 30% of the video and adds a semi-transparent watermark:
There are plenty of additional video and image transformation options that you can mix and match, we have shown only a few here just to give a taste. Check our documentation for more details and examples.
You can use Cloudinary’s SDKs of all web frameworks for building transformation URLs and embedding HTML5 video tags with all video sources and settings. The browser automatically selects a video format it supports, while the video files can be created dynamically when first accessed by your users. For example, the following view helper method adds an HTML5 video tag for all video formats, as well as a poster image:
This results with the following HTML code:
<video autoplay poster= 'https://res.cloudinary.com/demo/image/upload/w_300,h_150,c_fill/dog.jpg'> <source src='https://res.cloudinary.com/demo/image/upload/w_300,h_150,c_fill/dog.webm' type='video/webm'></source> <source src='https://res.cloudinary.com/demo/image/upload/w_300,h_150,c_fill/dog.mp4' type='video/mp4'></source> <source src='https://res.cloudinary.com/demo/image/upload/w_300,h_150,c_fill/dog.ogv' type='video/ogg'></source> </video>Code language: HTML, XML (xml)
Any web and mobile developer can now use the same API for uploading any media files, images or videos. The files are stored safely in the cloud and available for fast delivery using image and video optimization best practices. Dynamic transformations and transformations can take place on-the-fly to match your graphic design and the various devices and browsers of your users.
Our target is to make the life of developers easier, while letting them easily leverage cutting edge image processing capabilities. Today we push this forward by supporting video clips as well and providing powerful video capabilities using very simple parameters.
We hope you will find our video solution as useful as we believe it is. We would appreciate any feedback you have. We have big plans for further enhancing the video asset management features as well as to keep enhancing the already rich image asset management features. Stay tuned for updates.
All video features mentioned in this post are now available for any Cloudinary plan, including the free tier. You can sign up to quickly set-up your Cloudinary account and try out all the image and video transformation features.