Blog

Find out about the latest from Cloudmersive.

API Spotlight: Video Processing APIs
2/3/2023 - Brian O'Neill


beach video capture

Developing an efficient video upload process for any web application can be a bit challenging. That’s chiefly because videos are much larger than other forms of content, typically incorporating multiple types of media at once - which puts extra pressure on the web servers responsible for processing them.

The Cloudmersive Video API contains eleven useful iterations which greatly reduce the hassle of processing video files. They can effectively offload pressure from your web application's workflow, freeing up server resources while expanding your application's functionality. Below, we’ve highlighted four of our most popular Video API iterations with context for their respective use cases.

Convert a Video to MP4 Format

Many people are familiar with MP4 format, and even if they aren’t, there’s a good chance they use it unwittingly when exporting their videos. There’s a good reason for MP4’s sustained popularity – it offers excellent compression and streaming capabilities (along with a host of multimedia benefits) and it continues to be widely supported as a result. There are, however, still a variety of other popular video formats out there (such as WebM and AV1), so it’s important that any website preferring MP4 files has a way of converting these other formats to MP4 when the need arises.

This API automatically detects a variety of common video formats (using file path or file URL) and converts them to MP4 format. In addition to this, it provides a host of format customization options, allowing you to influence your output product in each request. When calling this API, it’s possible to change the height, width, aspect ratio, framerate, and output quality (compression) of a video during its conversion to MP4.

Please note that the Video API also supports video conversions to WebM, MOV, GIF and PNG (for still frames) formats.

Resize a Video, Preserving OR Ignoring Aspect Ratio

There are two Cloudmersive Video API iterations which can be used to physically resize videos: one which preserves the original aspect ratio (height/width ratio), and one which ignores aspect ratio, allowing instead for full customization of video dimensions. Both iterations are important additions to any video processing workflow; the former allows us to scale a standard output file up or down, while the latter facilitates an entirely unique look and feel.

When structuring an API call to either of these video resizing iterations, you’ll have the option to specify the maximum height and/or width of the output file, along with the framerate and compression level. Please note - when selecting files for these operations, any file larger than 2 GB should be included in URL form (rather than file path).

Cut a Video to a Shorter Length

“Short and sweet” has become a go-to trend for generating engaging video content. We’re growing more and more accustomed to consuming 5, 10, 15 or 30 second videos which jump straight to the action, fighting to capture ever-shortening attention spans. Offering a video shortening service in your application will make it easy for client-side uploaders to decide on the final length of their content without having to waste time editing and re-uploading their videos.

This API iteration allows you to easily cut videos to a specified length using specific start and end times in TimeSpan format. If an end time isn’t specified, the API will cut anything before the start time and leave the remainder of the video (up to 4 hours) untouched.

Scan a Video for NSFW Content

For any workflow handling visual content uploads, content moderation is a key checkpoint in the upload process. It’s important not to let videos containing NSFW content (such as racy or pornographic material) reach storage, or we run the risk of inadvertently offending any client-side visitors or internal colleagues who may need to access that content downstream. Human content moderation teams can independently review small volumes of content uploads without programmatic intervention, but large volumes of uploads call for a more scalable solution to assist in that review.

The NSFW Video Scanning API reviews each frame within an uploaded video, using advanced Machine Learning AI to identify racy or pornographic content. If such content is identified, this API will return invaluable information for content moderation purposes, including the total number of racy or NSFW frames in the video and the exact timestamp & frame number for each. Along with each NSFW frame, a content classification result string and numerical score is provided, helping diagnose the degree to which the flagged content may be offensive.

For more information on our Video APIs, please contact our sales team.

800 free API calls/month, with no expiration

Get started now! or Sign in with Google

Questions? We'll be your guide.

Contact Sales