> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://fastpix.com/docs/upload-videos/upload-4k-videos/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fastpix.com/_mcp/server. # Upload and stream 4K video ## Understanding 4K resolution 4K resolution refers to a horizontal display resolution of approximately 4000 pixels. The "K" in 4K stands for kilo (1000), indicating the approximate number of pixels. 4K resolution provides four times the number of pixels compared to traditional Full HD resolution, offering significantly greater detail and clarity. With rapid advancements in technology, there has been a significant increase in user-generated content in 4K. This trend is not limited to professionally produced videos but also includes a growing amount of 4K content created by everyday users. \ ## Using FastPix for 4K videos FastPix video supports uploading, storing, and delivering on-demand video media files in high resolutions, including up to 4K. This ensures that your content maintains the highest quality possible for viewers. To effectively ingest, store, and deliver media in 4K resolution using FastPix, follow the steps below. \ ### Uploading a video from URL You can use the [pull-based upload](/video-on-demand-api/upload-and-import-videos/create-media) feature to retrieve and use public URLs from popular cloud file hosting services for uploading media. Instead of downloading large files to your local system, you can provide a direct URL, and FastPix will then pull the file from its location and begin processing it. [Click here](/upload-videos/upload-videos-from-a-url) to read the detailed guide. **Endpoint**: **`POST`** ```Text POST https://api.fastpix.com/v1/on-demand/upload ``` \ Here’s an example of the request body: **`Request body`** ```json Request body { "inputs": [ { "type": "video", "url": "https://static.fastpix.com/sample.mp4" } ], "accessPolicy": "public", "maxResolution": "2160p", "mediaQuality": "standard" } ``` \ **How it works:** * **inputs**: List of input sources, specifying the type (video) and the URL of the video file. * **accessPolicy**: Defines the accessibility of the media, set to public. * **maxResolution**: Sets the maximum resolution for encoding and delivery. \ > **PLEASE NOTE** > > The default value for maxResolution is "1080p". To enable 4K resolution, set this parameters to "2160p". Keep in mind that setting a higher resolution can lead to higher billing costs. \ ### Creating a video via direct upload from device You can [upload a video file directly](/upload-videos/upload-videos-from-device) from your local device to FastPix for processing and storage. By calling this API endpoint below with your preferred media settings, you will receive an uploadId and a pre-signed url in the response. **Endpoint**: [Upload media from device](/video-on-demand-api/upload-and-import-videos/direct-upload-video-media) **`POST`** ```Text POST https://api.fastpix.com/v1/on-demand/uploads ``` \ Here’s an example of the request body: **`Request body`** ```json Request body { "corsOrigin": "*", "pushMediaSettings": { "accessPolicy": "public", "maxResolution": "2160p", "mediaQuality": "standard" } } ``` \ **How it works:** * **corsOrigin**: Allows cross-origin resource sharing. * **pushMediaSettings**: Contains the settings for the new media. * **accessPolicy**: Sets the media file policy to public. * **maxResolution**: Default maximum resolution is "1080p". To use 4K, change this to "2160p". \ > **IMPORTANT CONSIDERTATION** > > **Resolution and billing:** The `maxResolution` parameter dictates the highest resolution for encoding and delivery your media. By default, it is set to 1080p to avoid unnecessary high costs. To utilize 4K resolution, explicitly set the parameters to 2160p. > > This feature allows flexibility in resolution management, making it suitable for applications that require different video qualities, from standard HD to 4K. \ ## Enabling and testing 4K playback FastPix uses [Just-in-time (JIT)](https://www.fastpix.io/features#Just-in-time-encoding) encoding to ensure your media files, including 4K, are available as quickly as possible. When you enable 4K resolution for your media during ingestion, FastPix automatically adds 2K and 4K renditions to your HLS Playback URLs. \ ### 4K renditions and playback * **Automatic renditions:** Once 4K is enabled, your assets will include 2K and 4K renditions. This allows users to access high-resolution content seamlessly. * **Codec and compatibility:** FastPix uses high-bitrate H.264 for 4K content delivery. This codec is widely supported across many devices, ensuring broad compatibility. \ > **TESTING & VALIDATION** > > **Device testing**: Although we’ve rigorously tested playback and built robust device detection rules, it’s crucial to perform your own tests across your device footprint. This ensures compatibility and guards against unexpected playback failures. > > **Recommendation**: Before widely enabling 4K playback on your playback, conduct thorough testing on various devices and network conditions to verify smooth performance. \ ## Uploading 2K and 2.5K content FastPix also supports 2K and 2.5K (1440p) content. You can upload a 4K content and ask FastPix to restrict processing of the media file upto 2K or 2.5K by setting the `maxResolution` parameter to "1440p" in both the [Create media using URL](/video-on-demand-api/upload-and-import-videos/create-media) (pull video) and [Direct upload](/video-on-demand-api/upload-and-import-videos/direct-upload-video-media) (push video) methods. Here are the request body examples: \ ### Create media from URL ```json { "inputs": [ { "type": "video", "url": "https://storage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4" } ], "accessPolicy": "public", "maxResolution": "1440p", "mediaQuality": "standard" } ``` \ ### Direct upload from device ```json { "corsOrigin": "*", "pushMediaSettings": { "accessPolicy": "public", "maxResolution": "2160p", "mediaQuality": "standard" } } ``` \ ## Controlling 4K access during playback Not all viewers may need access to 4K content, and many streaming platforms reserve 4K playback for their higher subscription tiers. You can manage playback resolution using the `maxResolution` query parameter in your playback URLs. Here’s how: \ ### Implementing resolution control To restrict playback resolution, add the `max_resolution` parameter to your HLS playback URL. This allows you to specify the maximum resolution for each user based on their subscription tier. \ **Example URL** **`Example`** ```Text Example https://stream.fastpix.com/{PLAYBACK_ID}.m3u8?max_resolution=1080p ``` \ ### How it works: * Replace `{PLAYBACK_ID}` with the playback ID generated for your video asset. * Set the `max_resolution` parameter to the desired resolution (e.g., 1080p, 720p, 480p). For 4K content, use 2160p. \ > The single API stack for video: upload, encode, stream, secure, and analyze video at any scale. Explore guides, API references, and SDKs.