Use MP4 support for offline viewing

Enable MP4 support for offline viewing, legacy device compatibility, and social sharing.

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


  1. 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.


  2. 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.


  3. 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.


  4. 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.


  5. 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


Choose the right MP4 option

Select the MP4 support option that best suits your content needs:

  • capped_4k: Generates single MP4 file up to a maximum resolution of 1080p .

  • audioOnly: Creates an M4A audio file.

  • audioOnly,capped_4k: Creates both M4A and MP4 files for media assets that include both video and audio.


NOTE

Selecting the correct MP4 option ensures your content is optimized for both video and audio needs across platforms.


Create 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.


Pull Video (URL Upload)

{ 
  "inputs": [ 
    { 
      "type": "video", 
      "url": "https://static.fastpix.io/fp-sample-video.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.



Push Video (Direct Upload)

For a direct upload from your local storage, you can use this configuration:

{ 
  "corsOrigin": "*", 
  "pushMediaSettings": 
  { 
  "accessPolicy": "public",  
  "mp4Support": "capped_4k" 
  } 
} 

NOTE

The mp4Support field should be set according to your desired configuration (e.g., capped_4k or audioOnly or audioOnly,capped_4k).



Create media file with MP4 support - using Dashboard

You can also create a new media file (with MP4 support) directly from the dashboard by following the steps below.

Pull video (URL Upload)

  1. Login to your FastPix dashboard > select Media under Products section.
  2. Click Add New Media > Add Payload > Add your media URL > Pull Video.

Using Google Drive link to upload
FastPix dashboard

Using Google Drive link to upload
Pull Video

After the successful implementation of pull request, you must see this response that confirms the successful upload of your media file.

{
  "success": true,
  "data": {
    "id": "c9e716f8-412c-4122-9af3-173a0e44c438",
    "trial": true,
    "status": "Created",
    "createdAt": "2025-11-03T13:13:40.265574Z",
    "updatedAt": "2025-11-03T13:13:40.265589Z",
    "playbackIds": [
      {
        "id": "c7eb194e-6545-443c-b759-c30d414e0472",
        "accessPolicy": "public",
        "accessRestrictions": {
          "domains": {
            "defaultPolicy": "allow",
            "allow": [],
            "deny": []
          },
          "userAgents": {
            "defaultPolicy": "allow",
            "allow": [],
            "deny": []
          }
        }
      }
    ],
    "mp4Support": "capped_4k",
    "sourceAccess": false,
    "maxResolution": "1080p",
    "inputs": [
      {
        "type": "video",
        "url": "https://static.fastpix.io/fp-sample-video.mp4"
      }
    ],
    "subtitles": {},
    "optimizeAudio": false
  }
}

You can select View Media > Media Details to view more information about the media you uploaded.

Using Google Drive link to upload
Pull Video Response

Using Google Drive link to upload
Media Details

Push Video (Direct Upload)

The instructions are similar to the Pull Video. However, instead of providing a URL, upload the video file directly from your device.

Using Google Drive link to upload
Push Video

  • Now in Add new media page, click Upload Video and select the video that you want to upload directly from your device.
Using Google Drive link to upload
Upload Video

Using Google Drive link to upload
Choose Video

After the media is successful uploaded, you see this response.

{
  "success": true,
  "data": {
    "uploadId": "edc93273-ded2-40bd-84bc-2102f025e451",
    "trial": true,
    "status": "waiting",
    "url": "https://storage.googleapis.com/fastpix-uploads-asia/3a464c50-a18e-44a5-ac13-b404e1938e13/edc93273-ded2-40bd-84bc-2102f025e451?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=dev-staging-pub-sub%40fastpix-vms.iam.gserviceaccount.com%2F20251103%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20251103T131731Z&X-Goog-Expires=14400&X-Goog-SignedHeaders=host%3Bx-goog-resumable&X-Goog-Signature=b1c12104c483d7b918db5205c03e5f986d653c91f2e4764971dc4afb607386acb806e1c1b9163b1fd44048322ced37305bbdee009d3e01aa183576200a7ac4a5dd5b6292664a8abc6f089b6b778fd3ffbf1b23ef17fdf569f3e83242fb3aef89e3ff1a676eb5fc7628572ce65e26fd43c4de77ffed1f1522b84250a29b304281474ad9b1b894a6a04ca23753d713dfc1e9a3853380b3fe1e4557c733cd5781dcf6b57a644f5e3ddebf33934546aff16d88af60b23b04c032bf1017c97a26d2a8827fe911bd740647dccd51d7f2b74e93c77e63f3bca16e9625b91d04c7580cc99c7adb9a1f0014243f87912b4dfbbebb872c0865c524b38bb566c9bc604204a1",
    "timeout": 14400,
    "corsOrigin": "*",
    "pushMediaSettings": {
      "playbackIds": [
        {
          "accessPolicy": "public",
          "accessRestrictions": {
            "domains": {
              "defaultPolicy": "allow",
              "allow": [],
              "deny": []
            },
            "userAgents": {
              "defaultPolicy": "allow",
              "allow": [],
              "deny": []
            }
          }
        }
      ],
      "metadata": {
        "key1": "value1"
      },
      "sourceAccess": false,
      "optimizeAudio": false
    }
  }
}

Using Google Drive link to upload
Media Details

After the Media status is ready, you can view the media information in the Media details.



Update MP4 support for existing media

FastPix also provides an option to enable MP4 support after the media is created using the update mp4 support API endpoint.

Method: PATCHURL: https://api.fastpix.io/v1/on-demand/{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.


Your video should automatically start downloading once you click the URL on your browser or inside your application.

If the video does not start downloading automatically, you can manually download it using the references provided below.


Downloading mp4 video in Safari


Downloading mp4 video in Chrome