To streamline video optimization for the explosion of short-form content, Cloudflare has launched Media Transformations, a new service that extends its Image Transformations capabilities to short-form video files, regardless of their storage location, eliminating the need for complex video pipelines.
With the service, the company aims to simplify video optimization for users with large volumes of short video content, such as AI-generated videos, e-commerce product videos, and social media clips.
Traditionally, Cloudflare Stream offered a managed video pipeline, but Media Transformations addresses the challenge of migrating existing video files. By allowing users to optimize videos directly from their existing storage, like Cloudflare R2 or S3, Cloudflare aims to reduce friction and streamline workflows.
(Source: Cloudflare blog post)
Media Transformations enables users to apply various optimizations through URL-based parameters. Using URL parameters, Media Transformations enables automation and integration, allowing dynamic video adjustments without complex code changes – simplifying workflows and ensuring optimized video delivery across various platforms and devices.
The key features of the service include:
- Format Conversion: Outputting videos as optimized MP4 files.
- Frame Extraction: Generating still images from video frames.
- Video Clipping: Trimming videos with specified start times and durations.
- Resizing and Cropping: Adjusting video dimensions with “fit,” “height,” and “width” parameters.
- Audio Removal: Stripping audio from video outputs.
- Spritesheet Generation: creating images with multiple frames.
The service is accessible to any website already using Image Transformations and new zones can be enabled through the Cloudflare dashboard. The URL structure for Media Transformations mirrors Image Transformations, using the /cdn-cgi/media/ endpoint.
Initial limitations include a 40MB file size cap and support for MP4 files with h.264 encoding. Users like Philipp Tsipman, founder of CamcorderAI, quickly pointed out the initial limitations, tweeting:
I really wish the media transforms were much more generous. The example you gave would actually fail right now because QuickTime records .mov files. And they are BIG!
Cloudflare plans to adjust input limits based on user feedback and introduce origin caching (Cloudflare stores frequently accessed original videos closer to its servers, reducing the need to fetch them repeatedly from the source).
Internally, Media Transformations leverages the same On-the-Fly Encoder (OTFE) platform Stream Live uses, ensuring efficient video processing. Cloudflare aims to unify Images and Media Transformations to simplify the developer experience further.
In addition to the Cloudflare offering, alternatives are available regarding video optimization, such as Cloudinary, ImageKit, and Gumlet, which have comprehensive features for format conversion, resizing, and compression. Other cloud providers, such as Google Cloud Platform, offer various cloud services, including video processing and delivery solutions. While not solely focused on video transformation, it provides the building blocks for creating custom solutions.
Lastly, Cloudflare highlights use cases such as optimizing product videos for e-commerce, creating social media snippets, and generating thumbnails. The service is currently in beta and free for all users until Q3 2025, after which it will adopt a pricing model similar to Image Transformations.