Working with video frame rates in AWS Elemental MediaConvert - MediaConvert

Working with video frame rates in AWS Elemental MediaConvert

The frame rate of a video asset represents how quickly video player devices play back the frames of a video, in frames per second (fps). For example, films have a frame rate of 24 fps, NTSC television broadcasts are 29.97/59.94 fps, and PAL television broadcasts are 50/25 fps. If you keep the MediaConvert default settings in your job, your output video will have the same frame rate as your input video.

Some videos have a frame rate that varies over the duration of the video. For example, some cameras automatically generate video that uses more frames for high-action sequences and fewer frames for sequences with less motion. MediaConvert supports variable frame rate (VFR) inputs, but creates only constant frame rate (CFR) outputs. For more information, see Using variable frame rate inputs.

Settings for frame rate conversion

To create outputs that have a different frame rate than your input, use these MediaConvert settings:

Frame rate (framerateControl, framerateNumerator, framerateDenominator)

For frame rate conversion, specify a frame rate in your output encoding settings that's different from your input video frame rate. MediaConvert will then create an output that has the frame rate you specify, rather than the frame rate of your input video.

Specifying your output frame rate directly in your JSON job specification can be more complex than doing so in the MediaConvert console. For details, see the procedure for using the API, CLI, and SDK in the topic Converting the frame rate of your video.

Frame rate conversion algorithm (framerateConversionAlgorithm)

Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. The best choice for this setting depends on the content of your video.

When you use Drop duplicate, MediaConvert copies or deletes frames but doesn't alter them. This preserves the picture quality of each individual frame, but might introduce stuttering in some conversions. For numerically simple conversions, such as 60 fps to 30 fps, Drop duplicate is often the best choice.

When you use Interpolate, MediaConvert blends frames together to avoid the need to repeat or remove frames. This results in smooth motion, but might introduce undesirable video artifacts. For numerically complex conversions, Interpolate is likely to provide better results than Drop duplicate.

When you use FrameFormer, MediaConvert uses the InSync FrameFormer library. The conversion uses motion-compensated interpolation based on the content of your input video. FrameFormer performs various frame rate conversion techniques on a scene-by-scene basis and can use different techniques on different regions of each frame. FrameFormer does the conversion based on automatic detection of your source video's underlying cadence, rather than relying on the frame rate reported in the file's metadata.

Feature limitations:

  • You can use FrameFormer with inputs that have resolutions up to 4K only. MediaConvert doesn't support FrameFormer conversion with 8K inputs.

  • You can use FrameFormer only with jobs that you run through an on-demand queue. You can't use reserved queues with FrameFormer.

Using FrameFormer increases the transcoding time and incurs a significant add-on cost. For more information, see the MediaConvert pricing page.

Depending on the conversion, you might also use these settings:

Slow PAL (slowPal)

When you convert the frame rate from 23.976 or 24 frames per second (fps) to 25 fps, you can optionally enable Slow PAL (slow phase alternating line ). When you enable slow PAL, instead of duplicating frames to increase the frame rate, MediaConvert relabels the video frames as 25 fps and resamples your audio to keep it synchronized with the video. Slow PAL frame rate conversion slightly reduces the duration of the video. Generally, you use slow PAL to convert a cinema format for file-based playback or internet streaming.

Telecine (telecine)

When you convert the frame rate from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally set Telecine to Hard or Soft to create a smoother picture. Generally, you use telecine when you're preparing a video asset for broadcasting to set-top boxes.

For more information, see Telecine.

Scan type (inputScanType)

Use this setting only with progressive segmented frame (PsF) inputs. MediaConvert automatically detects progressive and interlaced inputs. But it doesn't detect PsF. When your input is PsF, set Scan type to PsF for better preservation of quality when you do deinterlacing and frame rate conversion.

Using variable frame rate inputs in AWS Elemental MediaConvert

Some videos have a frame rate that varies over the duration of the video. Some cameras—for example, the cameras in many smartphones—automatically generate video that uses more frames for high-action sequences and fewer frames for sequences with less motion. MediaConvert supports variable frame rate (VFR) inputs, but creates only constant frame rate (CFR) outputs.

The default setting for output frame rate is Follow source. Follow source causes different behavior depending on whether your input video has a constant or variable frame rate.

  • For constant frame rate inputs, Follow source results in outputs that have the same frame rate as the input video.

  • For variable frame rate inputs, Follow source results in outputs that have a constant frame rate output, with a frame rate that is the average of the input frame rates, rounded up to the nearest whole number standard frame rate: 1, 5, 10, 15, 24, 30, 50, or 60 fps.

Feature restrictions

MediaConvert support for variable frame rate video is limited in these ways:

  • Variable frame rates are supported as input only. Outputs are only constant frame rate.

  • Variable frame rate inputs are supported in these containers only: MP4, MOV, WEBM, and MKV.

Converting the frame rate of your video

After you know how you want to specify the relevant settings, use one of the following procedures to set up your job. For conceptual information and guidance about choosing the right values for these settings, see Settings for frame rate conversion.

Console

To set up your transcoding job with frame rate conversion using the MediaConvert console:

  1. Determine the values that you want to set for frame rate conversion. For more information, see Settings for frame rate conversion.

  2. Set up your job inputs and outputs as described in Configuring jobs in MediaConvert.

  3. On the Create job page, in the Job pane on the left, choose the output that you want to use frame rate conversion with.

    Tip

    To find a specific encoding setting on the MediaConvert console, use your browser's search function.

  4. In the Encoding settings section, for Frame rate, choose the frame rate that you want for your output. If the frame rate that you want isn't listed, choose Custom. Then specify your frame rate as a fraction in the fields to the right of Frame rate.

  5. For Framerate conversion algorithm, choose the algorithm most suited to your content.

    Framerate conversion algorithm isn't available on the MediaConvert console until you choose your output frame rate.

  6. Optional. If your output is 25 fps and you want to use Slow PAL, enable it.

  7. Optional. If you're converting from 23.976 fps to 29.97 fps and you want to do a telecine conversion, set Telecine to Hard or Soft.

    Telecine isn't available on the MediaConvert console until you set your output frame rate to 29.97.

API, SDK, or CLI

If you use the API, CLI, or an SDK, specify the relevant settings in your JSON job specification and then submit it programmatically with your job. For more information about submitting your job programmatically, see one of the introductory topics of the AWS Elemental MediaConvert API Reference:

To set up your transcoding job with frame rate conversion using the API, SDK or AWS command line interface (CLI):

  1. Determine the values you want to set for frame rate conversion. For more information, see Settings for frame rate conversion.

  2. Use the MediaConvert console to generate your JSON job specification. We recommend this approach, because the console functions as an interactive validator against the MediaConvert job schema. Follow these steps to generate your JSON job specification using the console:

    1. Follow the previous procedure for the console.

    2. In the Job pane on the left, under Job settings, choose Show job JSON.

Find additional information, including where each setting belongs in the job settings structure, in the AWS Elemental MediaConvert API Reference. Links in this list go to information about the setting in that document:

Common frame rate ratios
Frame rate common name Value for framerateNumerator Value for framerateDenominator
23.976 24,000 1,001
29.97 30,000 1,001
59.94 60,000 1,001