We are excited to announce the public preview of new capabilities in Azure Media Services (AMS) for composing media clips and stitching together rendered videos. Azure Media Clipper is a free JavaScript library that enables web developers to provide their users with an interface for creating clips.
For example, James is a web developer running a web-based video content management service. Users of his service are content owners that live encode sports broadcasts. By integrating Azure Media Clipper into his web service, James enables his content owners to create sports highlights from their media catalog. Content owners can select one or more live or VOD sports broadcasts, specify which segments they want to clip, and submit the clipping job. After the job is processed, the content owners get back a clip for publishing or distribution through social media or other platforms.
Azure Media Clipper enables you to:
- Trim the pre-slate and post-slate from live archives
- Compose video highlights from AMS live events, live archives, or fMP4 VOD files
- Concatenate videos from multiple sources
- Produce summary clips from your AMS media assets
- Clip videos with frame accuracy
- Generate dynamic manifest filters over existing live and VOD assets with group-of-pictures (GOP) accuracy
- Produce encoding jobs against the assets in your media services account
Demo site
You can try Azure Media Clipper at our demo deployment. Refer to our public documentation for details on the widget’s API surface and code samples.
Widget user interface
The widget is composed of three components:
- Azure Media Player (AMP) for media playback and preview
- Clip interface for setting mark times, moving playhead position, and navigating through the timeline with frame or GOP precision
- Asset selection panel for selecting and searching through assets, and viewing asset metadata
This tool interface is available in light and dark themes:
Loading assets
Azure Media Clipper takes as input a JSON representation of the assets hosted in your media services account. This JSON contract that you must generate contains all of the required metadata needed to playback the asset and parse its manifest. No rendered media is passed directly to the Clipper. Supported assets include AMS single-bitrate MP4s, multi-bitrate MP4s, and dynamic manifest filters. At this time, Clipper does not support media hosted outside of Azure Media Services.
Assets can be loaded into the Azure Media Clipper by two methods:
- Statically passing in a library of assets
- Dynamically generating a list of assets via API
In the first case, you pass in a static set of assets. Each asset includes its AMS asset ID, name, published streaming URL, AES or DRM authentication token (if applicable), and optionally, an array of thumbnail URLs. The thumbnails will be populated into the interface, if passed in. In scenarios where the asset library is static and small, you can simply pass in the asset contract for each asset in the library.
Alternatively, you can load assets dynamically via a JavaScript callback. In scenarios where assets are dynamically generated or the library is large, you should load via the callback.
Producing clips
To create a clip, drag and drop an asset onto the clip interface. For clipping against multiple assets, drag and drop multiple assets into the clip interface from the asset selection panel. You can select and reorder assets in the interface to the desired order. The asset selection panel provides asset duration, type, and resolution metadata for each asset. Use the buttons on the clip interface to find mark times. To preview the output of the clipping job, select the preview button and the clip will playback from the selected mark times.
Producing dynamic manifest filters
Dynamic manifest filters describe a set of rules based on manifest attributes and asset timeline. These rules determine how your streaming endpoint manipulates the output playlist (manifest) and can be used to change which segments are streamed for playback. The filters produced by the Clipper are local filters and are specific to the source asset. Unlike rendered clips, filters are not new assets and do not require an encoding job to produce. They can be create very quickly via our .NET SDK or REST API, however, they are only GOP-accurate. Typically, assets encoded for streaming have a GOP size of 2 seconds.
To create a dynamic manifest filter, select dynamic manifest filter as the clipping mode from the advanced settings menu. You can follow the same process to produce a clip to create the filter. Filters can only be produced against a single asset.
Submitting clipping jobs or dynamic manifest filter API call
Azure Media Clipper produces two types of output:
- Media Encoder Standard encoding preset for rendered clipping jobs
- Dynamic manifest filter REST API call to request body for manifest filters
This output is returned as JSON. To create the clip or filter, you HTTP POST the composer’s output to a service that manages your media services account. To post the data, you must implement a JavaScript callback on the submit job button. From there, your service can submit and track the status of the clipping job or dynamic manifest filter API call. Clipping jobs require encoding and take time to process. Dynamic manifest filters require an API call to produce and do not require significant time to produce.
Clipping in Azure Portal
In addition to the standalone widget, we’re releasing the Clipper in the Azure Portal so you can quickly try out the new features. Navigate to the new Subclip blade to get started.
Browser support
Azure Media Clipper is built using modern HTML5 technologies and supports the following browsers:
- Microsoft Edge 13+
- Internet Explorer 11+
- Chrome 54+
- Safari 10+
- Firefox 50+
Note: Only HTML5 playback of streams from Azure Media Services is currently supported.
Language support
The Clipper widget is available in the following 18 languages:
- Chinese (Simplified)
- Chinese (Traditional)
- Czech
- Dutch, Flemish
- English
- French
- German
- Hungarian
- Italian
- Japanese
- Korean
- Polish
- Portuguese (Brazil)
- Portuguese (Portugal)
- Russian
- Spanish
- Swedish
- Turkish
You can extend the set of supported languages, in addition to the languages supported by default.
Providing feedback and feature requests
Azure Media Services will continue to grow and evolve, adding more features, and enabling more scenarios. To help serve you better, we are always open to feedback, new ideas, and appreciate any bug reports so that we can continue to provide an amazing service with the latest technologies. To request new features, provide ideas or feedback, please submit to User Voice for Azure Media Services. If you have any specific issues, questions or find any bugs, please post your question to our forum or reach out to us directly through amcinfo@microsoft.com.