Encoding Settings

Encoding settings determine how the Ooyala Transcoding Service (OTS) encodes streams created during the transcoding process.

Content Width and Height

The width and height specify the size of the video (in pixels). The OTS maintains the aspect ratio of the source video using the width and scaling the height accordingly.

If a device (such as a phone or tablet) cannot support the width of a video, it does not play. Additionally, phones and tablets are often connected to the Internet through lower bandwidth connections. As a result, you must make sure your lower bit rate encodings have a smaller width. For example, an encoding with a width of 1280 and a 300kbps bit rate could not play on an iPhone with a maximum width of 640.

Larger screens look better in higher resolution and tend to have better bandwidth. Reserve your higher bit rate encodings for larger widths. For example, you might specify a width of 1280 for your 1500, 2200, and 3600kbps bit rate encodes.

The following table shows the width and height of common devices:

Device Width Height
iPhone 6/6S/7/8 1334 or lower 750 or lower
iPhone 6+/6s+/7+/8+ 2208 or lower 1242 or lower
iPhone X 2436 or lower 1125 or lower
iPad Air/Pro 2048 or lower 1536 or lower
Large iPad Pro 2732 or lower 2048 or lower
Apple TV 640 or higher 320 or higher
Android varies (960 or less recommended) varies (640 or less recommended)
Desktop/Notebook varies (1280 recommended) varies (720 recommended)
TV varies (1920 or less recommended) varies (1080 or less recommended)
Note: If you specify a width of 0 in your encoding profile, the content uses the source file’s width.

Managing Vertical Video (Portrait Mode)

A vertical video is a video created either by a camera that is intended for viewing in portrait mode, producing an image that is taller than it is wide, rather than the widescreen format normalised by cinema and television. This commonly is from video shot on a smartphone (e.g. iPhone, Android) where the user has held the phone in 'portrait' mode or 'vertical'.

These devices often save the video rotated to a landscape orientation but set metadata in the video headers to state that rotation of 90 degrees (clockwise) should be used to display the video.

To ensure that vertical videos are processed correctly without adding any black margins, one of the two options listed below must be performed. Before you perform either of these options, check with your account manager or technical support engineer that your account is enabled for vertical video processing:

  • If the source contains the tag:rotation attribute, then the transcoding workflow auto detects and processes it for vertical transcoding. The workflow uses the default processing profile, but swaps the aspect ratio of the output resolution to match 6:19; as a result, no black bars are added.
  • If the source does not contain the the rotation tag, you can leverage manifest based ingest and provide the rotation value. Valid values for video rotation are [90,-90,270,-270,180]: for example, <ooyala:metadata name="video_rotation">-90</ooyala:metadata>
Note: You can leverage FFMPEG to set the rotation flag to the source asset if the device recording it does not add it by default. Example : ffmpeg -i portrait_sequence.mp4 -vf "transpose=2" -metadata:s:v:0 rotate=90 -aspect 16:9 filename.mp4 (transpose 2 rotates the video 90 degrees counterclockwise, which is needed to match the vertical recording).

Containers, Video Codecs, and Audio Codecs

Each encoding is a container format (e.g. MP4) that comprises a video and audio codec.

When you specify a processing profile, you must specify the container formats and audio formats.

Ooyala support both H265 and H264 codec. However, H264 codec is supported across all browsers and devices, hence the default choice of codec is H264. H265 codec is relatively new to the market and is better at video compression, resulting a higher quality at a much lower bitrate than H264. However, browser and device support for H265 is limited; for full details, see here.

H.264 specifies a set of capabilities and different profiles that group subsets of the available capabilities. Ooyala supports the following profiles:

  • Baseline
  • Main
  • High

Although the High profile gives better quality, not all devices support it - use Baseline to cover older devices.

Note: For the same video, the Baseline profile can require up to a 20% higher bit rate to provide the same quality as the High profile.


If a device, such as a phone or tablet, does not support an encode’s resolution, the video might not play. This is usually not an issue for desktops and laptops, but can be an issue for phones and tablets.

Video Bitrate

The video bit rate specifies the amount of bits in one second of video. In general, the higher the bit rate, the higher the video quality.

When a bit rate is specified for an encoding, the actual bit rate is not consistent during playback. Ooyala supports both consistent bit rate (CBR) and variable bit rate (VBR); during processing profile creation we insert the target bitrate.

Ooyala also supports a two-pass encoding method to optimize performance and video quality. The first pass analyzes the content to determine the bitrate for each part of the video. The second pass encodes the video based on the analysis.

Audio Bitrate

The audio bit rate is the number of bits in one second of audio. The higher the audio bit rate, the higher the quality, and viewers’ bandwidth requirements. You can select any audio bit rate of up to 156kb/s. For example:

  • 32Kbps (kilobits per second)—AM Radio Quality
  • 64Kbps—Voice Quality
  • 96Kbps—FM Radio Quality
  • 128Kbps—Standard Quality (recommended)
Note: If possible, we recommend that all encodings use the same audio bit rate. Otherwise, some viewers might notice the audio level change as the player switches encodings.

Audio Sample Rate

The audio sampling rate specifies the number of samples taken per second. Ooyala supports all audio sampling rates up to 48,000, but we recommend the following rates:
  • 32,000 (miniDV)
  • 44,100—(CD)
  • 48,000 (professional digital video equipment)
Note: If possible, we recommend that all encodings use the same audio sample rate. Otherwise, some viewers might notice the audio level change as the player switches encodings.

Smooth Playback

The following are just a few of the variables that can affect a viewer's playback experience:

  • The CPU and GPU abilities of the device; other programs running in the background

  • The viewer's device and screen size

  • The connection speed or bandwidth cap

  • Latency caused by the wireless router, such as the distance from the router and local congestion

  • Latency caused by network traffic between the device and server hosting the video

  • Viewer's browser brand, version, and available plugins (e.g., Flash, Silverlight, and so on)

For smooth playback, viewer bandwidth should be around double the video playback bitrate (audio plus video bitrates).

Was this article helpful?