Support for Standard Inputs
Media Manager accepts most modern video formats and codecs. However, certain types of inputs need to be standardized in order for us to do further operations on them, and this can add time before the video is ready to be streamed. If you want to standardize your content before sending it to us, and potentially improve performance, this guide will show what you need to do.
Standard Input Specs
Section titled “Standard Input Specs”To be considered standard input, the input video file must meet the following requirements:
| Property | 1080p | 4K |
|---|---|---|
| Resolution | 1080p/2K or smaller. Files with a resolution of up to 2048x2048 are considered standard. | 2160p or smaller. The input file must not have any dimension (width, height, or both) that exceeds 4096 pixels. |
| Keyframe interval | Max 20-second keyframe interval (10 seconds for HEVC). | Max 10-second keyframe interval (6 seconds for HEVC). To stream 4k video well, a 10 second keyframe interval is required. If using the HEVC video codec, this is further limited to 6 seconds. |
| Bitrate | 8Mbps or below. The bitrate should not exceed 16Mbps for any single GOP. | 20Mbps or below. While Media Manager accepts higher bitrate inputs, bitrates higher than 20Mbps are generally challenging for most viewers’ connections. |
| Frame rate | Between 5 and 120. Inputs with less than 5 fps or greater than 120 fps will be automatically standardized to 30 fps. | Between 5 and 60. Inputs with less than 5 fps or greater than 60 fps will be automatically standardized to 30 fps. |
- H.264 or HEVC video codecs. H.264 is the dominant video codec in use today and almost every device supports H.264. HEVC is a more modern codec that’s increasingly popular, though not as universally supported. While Media Manager accepts other codecs as input, other codecs are considered non-standard and will be standardized automatically to H.264.
- Closed GOP (group-of-pictures). (Warning: video jargon ahead. You can likely ignore this) In video files encoded with a closed-GOP, all B frames reference other frames in the same GOP. Closed GOPs always begins with an IDR (Instantaneous Decoder Refresh) frame. This means that every GOP can be played independently, without reference to another GOP. Standard inputs must be encoded with a closed-GOP.
- 8-bit 4:2:0, or 10-bit 4:2:0 if HEVC. This refers to the color depth and chroma subsampling. If you don’t know what this is, you can probably ignore this, since most streaming video is 8-bit 4:2:0. HDR usually uses 10-bit 4:2:0, which is only supported as standard when using the HEVC video codec. However, SDR is preferred as Media Manager does not provide full HDR support.
- Simple Edit Decision Lists. Edit Decision Lists (EDLs) are typically added during post-production and define how certain segments are used to build a track timeline for playback. A good example of a Simple Edit Decision List is to fix out of order frames in the video. Input files with more complex uses of EDLs are considered non-standard.
- AAC audio codec. AAC is the dominant audio codec in use today and almost every device supports this audio codec. While we accept files that use other audio codecs, Media Manager only delivers AAC audio and non-AAC audio inputs are considered non-standard.
How to create standard input (ffmpeg)
Section titled “How to create standard input (ffmpeg)”As a starting point, here is a sample ffmpeg command for creating video that complies with our standard input. Feel free to modify this by using things like 2-pass encoding, different presets, or different bitrates (as long as the total bitrate ends up below than 8Mbps).
ffmpeg -i input.mp4 -c:a copy -vf "scale=w=min(iw\,1920):h=-2" -c:v libx264 \-profile high -b:v 7000k -pix_fmt yuv420p -maxrate 16000k out.mp4Standard input for 4K
Section titled “Standard input for 4K”If you are creating a 4K video, the resolution and bitrate limits are higher. Here is a sample ffmpeg command for creating video that complies with Media Manager standard input for 4K.
ffmpeg -i input.mp4 -c:a copy -vf "scale=w=min(iw\,4096):h=-2" -c:v libx264 \-profile high -b:v 18000k -g 239 -pix_fmt yuv420p -maxrate 36000k -bufsize 54000k out.mp4How to create standard input (mobile)
Section titled “How to create standard input (mobile)”Many mobile devices capture H.264 8-bit 4:2:0 video by default. More recent mobile devices increasing use HEVC 4:2:0 by default (either 8-bit with HDR disabled, or 10-bit with HDR enabled). Here are the main things to watch out for:
- Ensure that the total file bitrate is below 8 mbps.
- Prefer recording video in SDR (standard dynamic range). Some newer devices capture video in HDR (High Dynamic Range), which requires 10-bit 4:2:0 color. This is also acceptable, but may be more likely to exceed the limited bitrate to be considered standard input. If you have the choice, you should record SDR.
- Ensure the output file is smaller than 1080p (1920x1080) or 2K (2048x1152). Some cameras shoot 4K video, which by default is converted down to 1080p when using Media Manager. If you want to use 4K video, ensure you’re enabling that in your API calls to Media Manager.
- If possible, choose a keyframe interval of 5s or so, but certainly between 1 and 10 seconds, and enable closed-GOP encoding. (If you don’t see these options in your app or camera, it’s probably the default already.)
Non-standard input
Section titled “Non-standard input”Media Manager works fine with video outside of the standard input specs. But because other videos cannot be easily streamed to many modern devices, we must perform an initial encoding operation on non-standard input to create a mezzanine file. This means that non-standard input will be slower to ingest.
As an example, a UHD/4K input file encoded with HEVC/H.265 video CODEC and a frame rate of 60 fps is non-standard for two reasons:
- UHD/4K video resolution is 3840x2160 pixels and so this resolution is greater than 2048 pixels for the input file to be standard.
- Video codec is HEVC/H.265 which is considered non-standard (only AVC/H.264 video CODEC is considered standard). Note that, however, the frame rate is within the bounds of the standard input specification.
General limits
Section titled “General limits”The max duration for any single asset is 12 hours.