Encoding best practices for Wowza Video Legacy

If you're more familiar with IT infrastructure or video production technologies than with video encoding, creating high-quality streams may seem daunting. Learn best practices for creating high-quality encoded source video for the Wowza Video™ service.


Source encode

When using Wowza Video, you create one stream rendition, also called a source encode. Wowza Video will automatically transcode your live stream to create many different output formats and sizes so your viewers can watch on a wide variety of devices and networks. 

Note: Make sure you choose a quality that will result in a reliable stream based on your internet connection and test your network, audio and video before streaming.

Wowza Video can't generate any output renditions that are of higher quality than what it receives from the video source, so prepare the highest quality source you can support. The higher the resolution of the source video, the more output renditions Wowza Video makes available for your viewers.

Incoming stream formats

Wowza Video supports encoders compatible with standard protocols, such as H.264 encoders that use RTMP or RTSP/RTP protocols. H.264 encoding presets can be contained in any of a number of formats (.MOV, .MP4, .F4V, etc.).

Accepted encode formats Accepted audio formats
  • H.264 - Recommended
  • H.265 compatible for SRT only
  • AAC - Recommended
  • AAC-LC - Recommended
  • HE-AAC (accPlus) v1 & v2
  • MP3
  • Opus

Calculating source encoding presets

When preparing a source encode, use the following rules of thumb to make sure the size of the encode doesn't exceed your available bandwidth. 

  • Determine the bandwidth for your source encode.
  • Allow 40% of your total bandwidth for overhead.

Example

  1. You have a 10 Mbps connection between your encoder and Wowza Video. 
  2. Allowing 40% for overhead, your total encoding presets should not exceed 6 Mbps total, or 3 Mbps each. 
  3. You could easily create a source encode of 1080p quality (1920x1080) at the maximum video bitrate (6000 Kbps) with an audio bitrate of 128 Kbps.

Recommended encoding presets

When preparing your source, you will need to specify audio and video settings for your stream. Shown below are recommended encoding presets that are typical for Wowza Video. In your camera or source encoder, you'll be able to configure some or all of the attributes described here. 

Note: These guidelines are intended to supplement, not replace, the documentation provided by the publisher or manufacturer of your camera or source encoder. Check your camera or source encoder documentation for more information on its capabilities and settings.

For more information on each of these settings, please see Advanced encoding settings.

Baseline Main High
Resolution 240p 360p 480p 720p 1080p 4K
Frame size 426x240 640x360 854x480 1280x720 1920x1080 3840x2160
Supported video bitrate 300 - 700 Kbps 400 - 1200 Kbps 512 - 2000 Kbps 1600 - 4000 Kbps 3200 - 6000 Kbps 8000 - 20,000 Kbps
Recommended video bitrate 512 Kbps 1024 Kbps 1600 Kbps 2640 Kbps 4400 Kbps 12,000 Kbps

Advanced encoding settings

There are many audio and video settings that control how your stream is prepared and delivered. Below is a list of the most common settings and how they will impact your stream.

Setting Description and Notes Sample values
Aspect ratio The ratio of the width to the height of your video. Wowza Video streams videos with different aspect ratios and frame sizes based on the device and platform. Should be divisible by 8.
  • Follows standard 4:3 or widescreen 16:9 ratio
  • The number in pixels of the video source
  • Relates to frame size below
Audio bitrate The amount of data being transferred into audio. A higher bitrate generally means better audio quality.
  • Voice content: 32 Kbps or 64 Kbps
  • Music or complex audio: 96 Kbps, 128 Kbps, or 192 Kbps
Audio sample rate  The number of samples of audio recorded every second, measure in Hertz (Hz).
  • CD quality: 44,100 Hz
  • Movie audio quality: 48,000 Hz
Bits per pixel The color depth of the video. Also impacted by the amount of motion in your video, with higher pixel count required for active videos.
  • 0.10 for limited action content
  • 0.15 for high motion, complex action
Bitrate
(constant or variable)

Constant bitrate (CBR) encoding is faster, but results in lower quality for complex video. VBR encoding adjusts the bitrate depending on the complexity of the content.

VBR: constrain to 110% of target bitrate to maintain video quality
Frame rate The speed at which images appear, measured in frames per second (fps). Wowza Video uses the source encode frame rate for all output renditions. Wowza Video supports a maximum rate of 60fps.
  • World standard definition: 25fps / 50fps
  • US and Japan standard definition: 25fps / 50fps
  • High definition: 30/60fps - Recommended for web-based broadcasts
Frame size The size of a single video frame: width x height, measured in pixels. Wowza Video streams videos with different aspect ratios and frame sizes based on the device and platform.
  • SD: 800x700
  • HD: 1280x720
  • Full HD: 1920x1080
  • UHD: 3840x2160
Keyframes The full frame of the image in a video. Subsequent frames only contain the information that has changed.
  • We suggest using 1 or 2 second keyframe intervals
  • Or set the GOP (group of pictures) equal to, or double, the frame rate of the source
Profile Determines how the H.264 codec compresses the stream. Consider your audience when selecting the profile. For example, will most users be watching on a mobile device?
  • Baseline: Mobile devices and older playback devices
  • High: High-definition playback devices
  • Main: Standard-definition broadcast and desktop
Video bitrate The amount of data in 1 second of video, typically measured in kilobits per second, or Kbps. Higher bitrates can contain more data, but you must have the bandwidth to accommodate it. The formula for calculating bitrate is:
bits/pixel x (width x height) x frame rate)/1000
 

Testing your encoding setup

The Wowza Video standard support plan offers a 48-hour turnaround during business hours, so make sure to test your entire setup at least three business days before your event. It's also recommended to make sure your video source is ready to stream at least two hours before the scheduled start time and to start the video source at least 15 minutes before the event begins.

To test your entire setup:

  1. Run the primary and backup encoders with a test stream for at least 30 minutes each.
  2. Preview the stream on a variety of screens and devices.
  3. View the stream on your Wowza Video hosted page, if you have one.
  4. View the stream on external players and websites, if you're using them.
  5. If you're recording, check that the recording captures supported audio and video as expected.

More resources