Create a new encoding job. Sky Encoder provides some very robust preset data that is available for you to use. We also keep a consumable JSON file of data that serves as a great reference for dynamic applications. You can find that file at http://skyencoder.com/js/formats.json

{
    "file": "http://mydomain.com/media/my-source.flv",
    "outputs": [{
        "type": "video",
        "filename": "output-high.mp4",
        "format": "mp4",
        "video_codec": "h264",
        "hint": true
    }],
  "passback_url": "http://yourdomain.com/passback/script.php",
  "passback": {
    "my-var": 123456
  },
  "passback_headers": {
    "Header-Token": 123456789
  },
  "delivery": ['S3'],
  "delivery_zip_filename": "output-files.zip"
}
require './lib/SkyEncoder.php';
$sky = new SkyEncoder('your-secret-key', 'your-api-token');

$resp = $sky->createJob(array(
    'file' => 'http://mydomain.com/media/my-source.flv'
    'outputs' => array(
        'type' => 'video',
        'filename' => 'output-high.mp4',
        'format' => 'mp4',
        'video_codec' => 'h264',
        'hint' => true
    ),
));
require './lib/SkyEncoder.php';
$sky = new SkyEncoder('your-secret-key', 'your-api-token');

$resp = $sky->createJob(array(
    'file' => 'http://mydomain.com/media/my-source.flv'
    'outputs' => array(
        'type' => 'video',
        'filename' => 'output-high.mp4',
        'preset' => 'mp4_medium'
    ),
));

🚧

Make sure that you provide a publicly accessible URL for your source/input file.

Main Output Task Parameters

ParameterDefaultDescription
type (required)videoOptions: video, audio, image
filename(source video name)The output video filename (include extension).
presetUse the name of a pre-defined output task preset from our formats.json file.
passbackOutput-specific passback parameters that will be included with the task details.
priority0Output-specific priority order for dedicated resources. Output tasks are sorted in DESCENDING and queue date by the worker services.

Video Output Task Parameters

ParameterDefaultDescription
formatmp4The output video container to use
video_codech264The output video codec to use
video_codec_profilemainH264 Codec Only; Options: main, baseline, high
hinttrueH264 Codec Only; add moov atom
deinterlacefalseDeinterlace the output video
audio_codecaacThe audio codec for the output video
audio_channels(auto detect)Select the number of audio channels; options: 1 (mono), 0 (other/auto detect)
audio_sample_rate22050The audio sample rate for the output
height(source height)Height in pixels
width(aspect ratio of height)Width in pixels

Audio Output Task Parameters

ParameterDefaultDescription
formataacThe output audio codec to use
audio_bitrate128The audio bitrate
audio_channels(auto detect)Select the number of audio channels; options: 1 (mono), 0 (other/auto detect)
sample_rate(auto detect)The audio sample rate for the output
max_sample_rateThe max audio sample rate for the output

Image Output Task Parameters

ParameterDefaultDescription
formatjpgImage format; Options: jpg, png, gif
seconds0The number of seconds into the video to take the screenshot.
height(source height)Height in pixels
width(aspect ratio of height)Width in pixels
Language