MP4 support for offline viewing
Allow users to download media files
MP4 support with static renditions makes your video content widely accessible, easy to distribute, and compatible with diverse platforms and devices. Unlike adaptive streaming formats that adjust quality based on a viewer's connection, static MP4 files keep a consistent resolution and bitrate. This guide outlines the benefits of enabling MP4 renditions and provides a step-by-step approach to configuring MP4 support for your video assets.
Benefits of enabling MP4 support
-
Offline viewing
Allow users to download MP4 files and watch them without an internet connection. This is particularly valuable in areas with limited or no connectivity, ensuring seamless access to video content anytime, anywhere.
-
Legacy device compatibility
MP4 files support playback on older devices, including Android versions below 4.0. , preventing the exclusion of users who rely on outdated hardware.
-
Efficient for short videos
MP4 is an efficient format, particularly for clips under 10 seconds where quick and reliable playback is essential. By reducing buffering time and improving accessibility, MP4 enhances the user experience, making it ideal for platforms that prioritize fast video consumption.
-
Social media embedding
MP4 files embed easily in Open Graph cards for sharing on social platforms like Facebook and Twitter. This simplifies your content distribution activities.
-
Audio-only use cases
MP4 support can generate M4A audio files, supporting applications such as podcasts, transcription services, and audio streaming. This versatility extends it's functionality beyond video, making it a flexible format for multiple media types.
Getting started with MP4 renditions
Step 1: Choose the right MP4 option
Select the MP4 support option that best suits your content needs:
-
capped_4k: Generates a single MP4 file up to a maximum of 1080p resolution.
-
audioOnly: Creates an M4A audio file.
-
audioOnly,capped_4k: Creates both M4A and MP4 files for media assets that include both video and audio.
IMPORTANT
Selecting the correct MP4 option ensures your content is optimized for both video and
audio needs across platforms.
Step 2: Create or update a media file with MP4 support
To enable MP4 support when creating a new media file, follow these API request examples below. You can use the video.media.mp4Support.ready
webhook event to notify you that the requested format is ready.
Create media (pull video from URL)
{
"inputs": [
{
"type": "video",
"url": "https://static.fastpix.io/sample.mp4"
}
],
"accessPolicy": "public",
"mp4Support":"capped_4k"
}
NOTE
Replace
url
with the source URL of your video. This request will generate an MP4 rendition capped at a resolution of 1080p.
Direct upload (push video)
For a direct upload from your local storage, you can use this configuration:
{
"corsOrigin": "*",
"pushMediaSettings":
{
"accessPolicy": "public",
"mp4Support": "capped_4k"
}
}
PLEASE NOTE
The mp4Support field should be set according to your desired configuration (e.g.,
capped_4k
oraudioOnly
oraudioOnly,capped_4k
).
Update MP4 support of existing media
FastPix also provides an option to enable MP4 support after the media is created using the update mp4 support API endpoint.
Method: PATCH
URL: v1.fastpix.io/{mediaId}/update-mp4Support
{
“mp4Support”:”audioOnly,capped_4k”
}
Use the video.media.mp4Support.updated
webhook event to listen to status while updating MP4 support of existing media.
Accessing and using MP4 files
Once MP4 support is enabled, you can access the MP4 or M4A streaming URL by using the playback ID along with the file name specified in the static renditions section:
https://stream.fastpix.io/{PLAYBACK_ID}/{capped-4k.mp4, audio.m4a}
For example:
https://stream.fastpix.io/{PLAYBACK_ID}/capped-4k.mp4
https://stream.fastpix.io/{PLAYBACK_ID}/audio.m4a
TIP: Use these links directly in media players or web pages to simplify playback and sharing options across various platforms.
You video should automatically start downloading once you hit the URL on your browser or inside your application.
In case the video does not start downloading automatically, you can manually do it following the references below.
Downloading mp4 video in Safari

Downloading mp4 video in Chrome

Updated 13 days ago