Platform documentation & tutorials

Integrate Panda with your web app

Encoding profile presets

Panda provides several encoding profile presets which make it easy to setup the correct output formats for your videos.

To manage your profiles, log into your Panda account, select your cloud and click on “profiles” (assuming that you already have a cloud).

Encoding profiles

If you click Add profile you’ll be able to select from one of the handy presets. Each has a recommended width and height, but these can be changed if desired. One you’ve saved a new profile, videos you upload will automatically be encoded using it.

Adding a profile

Available presets

Below you’ll find details about the presets available:

MP4 (H.264)

H.264 video with AAC audio for playback on HTML5 browsers, desktop players, Flash, iPhone (3GS and above) and iPad. Use H264 baseline to support most of phones like first iPhone’s and Blackberry’s.

QualityStandardHighBaseline
preset_nameh264h264.hih264.baseline
h264 profilehighhighbaseline
video bitrate500kbps1000kbps500kbps
audio bitrate128kbps128kbps128kbps
resolution480x320720x480480x320

WebM (VP8)

VP8 video with Ogg Vorbis audio for playback in HTML5 compatible browsers.

QualityStandardHigh
preset_namewebmwebm.hi
video bitrate500kbps1000kbps
audio bitrate128kbps128kbps
resolution480x320720x480

OGG (Theora)

Theora video with Ogg Vorbis audio for playback in HTML5 compatible browsers.

QualityStandardHigh
preset_nameoggogg.hi
video bitrate500kbps1000kbps
audio bitrate128kbps128kbps
resolution480x320720x480

iPhone & iPad Adaptive Stream (multi-bitrate)

Special multi-bitrate segmented video for streaming to Apple devices. Streams of 5 varying qualities are encoded and the most appropriate quality is automatically served to users. H.264 video with AAC audio.

QualityAdaptive qualityiPad only
preset_name iphone_and_ipad
video bitrate 110kbps 200kbps 400kbps 600kbps 800kbps
audio bitrate 40kbps 40kbps
resolution 400x300 640x480

This profile uses an adaptive technique, and the iPhone/iPad streams one version or the other depending on the quality of the phone signal. All sub-profiles are always generated, and their specs have been set to the shown values by Apple.

MP3

MP3 audio preset.

preset_namemp3
audio bitrate192kbps

M4A (AAC)

MP4 audio preset.

preset_namem4a
audio bitrate192kbps

OGA (Vorbis)

Ogg Vorbis audio preset.

preset_nameoga
audio bitrate192kbps

Create a profile from a preset using the API

Panda gives you complete control of presets using the API and the available libraries. For this, simply pass the preset_name attribute instead of the command attribute.

In ruby it would look like this

Panda::Profile.create!({
  :preset_name => "h264", // A valid preset name, as per the tables above
  :name => "my-h264", // Unique name for this profile
  :width => "480",
  :height => "320"
})

Add Watermarking

You may want to add watermarking to your encodings. Use the api to set the url and the position of a remote image to use as a watermark.

Panda::Profile.create!({
  :name => "h264",
  :preset_name => "h264",
  :width => 480,
  :height => 320,
  :watermark_url => "http://www.pandastream.com/images/panda_logo.png",
  :watermark_bottom => 5,
  :watermark_right => 5
})

Advanced preset

You can set numerous of options to make your encoding just right.

Panda::Profile.create!({
  # h264 profile
  :preset_name => "h264",
  
  # sets your profile name to h264
  :name => "h264",
  
  # 2 pass encoding
  :two_pass => true,
  
  # 30 fps
  :fps => 30,
  
  # mp4 format and .mp4 extname
  :extname => ".mp4"
  
  # 48k sample rate
  :audio_sample_rate => 48000,
  
  # Resolution 1080x720
  :height => 720,
  :width => 1080,
  
  # set the s3 destination
  :path_format => "my/path/:id",
  
  # don't upscale the video if the input is smaller than your profile resolution
  :upscale => false,
  
  # starts the clip after 10 seconds
  :clip_offset => "00:00::10",
  
  # Cut the clip after 20 minutes
  :clip_length => "00:20::00",
  
  # Keep aspect ratio
  :aspect_mode => 'letterbox',
  
  # Bitrates
  :video_bitrate => 2200,
  :audio_bitrate => 128,
})