Developers Support Customer login
+1 800.513.1740
Media API Documentation   |   Sub Account API Documentation   |   Supported Source Media Formats   |   Sample Scripts    |   Recent Changes    |   Common Errors    |   Brightcove

3 Feb 2010. iPhone Streaming Features


    <format>
    <!-- Format fields -->
        <output>iphone_stream</output>
        <bitrates>[CommaSeparatedList]</bitrates>
        <segment_duration>[Duration]</segment_duration>
        <pack_files>[yes|no]</pack_files>
    <!-- Destination fields -->
        <destination>[DestFile]</destination> <!-- optional -->
    </format>   


With the following specific parameters:
bitrates [optional] – Comma separated list of bitrates.
Allowed values:
One or more valid bitrate values, separated by comma
Default: 96k,256k,800k
segment_duration [optional] - Segment duration to split media (in seconds)
Allowed values:
Non-negative integer
Default: 10
pack_files [optional] - Whether to pack result files to single tarball
Allowed values:
yes, no
Default: yes

03 Feb 2010. Advanced H.264 Parameters

To see the example for parameters please follow this link http://encoding.com/wdocs/ApiDocCodecSettings



3 Feb 2010. Image Converting Changes


<format>
    <!-- Format fields -->
        <output>image</output>
        <image_format>jpg</image_format>
        <resize_method>resize</resize_method>
        <size>560x420</size>
        <keep_aspect_ratio>yes</keep_aspect_ratio>
        <quality>75</quality>
        <sharpen_radius>1</sharpen_radius>
        <sharpen_sigma>0.5</sharpen_sigma>
        <remove_metadata>no</remove_metadata>
    <!-- Destination fields -->
        <destination>[DestFile]</destination>
    </format>   


With the following specific parameters:
image_format [required] – Format of resulting image.
Allowed values:
jpg, png, gif
Default: jpg

size [optional] – Size of resulting image.
Allowed values:
WxH or Wx0 or 0xH or Wx or xH, where W and H are positive integers
Default: none

resize_method [optional] - How the original picture will be inscribed to new size
Allowed values:
resize, crop, combine
Default: resize
keep_aspect_ratio [optional] - Whether to keep width to height ratio of original picture
Allowed values:
yes, no
Default: yes
quality [optional] - JPEG quality
Allowed values:
jpg: 1-100
All: none
Default: 80

sharpen_radius [optional] - Sharpen radius (use 0 in most cases)
Allowed values:
Integer: 0-10
Default: none

sharpen_sigma [optional] - Sharpen amount (best are 0.5-1.0)
Allowed values:
Float: 0, 0.2-10
Default: 0

remove_metadata [optional] - Whether to remove image meta data (incl. EXIF)
Allowed values:
yes, no
Default: no

3 Feb 2010. iPhone Streaming Features


    <format>
    <!-- Format fields -->
        <output>iphone_stream</output>
        <bitrates>[CommaSeparatedList]</bitrates>
        <segment_duration>[Duration]</segment_duration>
        <pack_files>[yes|no]</pack_files>
    <!-- Destination fields -->
        <destination>[DestFile]</destination> <!-- optional -->
    </format>   


With the following specific parameters:
bitrates [optional] – Comma separated list of bitrates.
Allowed values:
One or more valid bitrate values, separated by comma
Default: 96k,256k,800k
segment_duration [optional] - Segment duration to split media (in seconds)
Allowed values:
Non-negative integer
Default: 10
pack_files [optional] - Whether to pack result files to single tarball
Allowed values:
yes, no
Default: yes

03 Feb 2010. Advanced H.264 Parameters


To see the example for parameters please follow this link http://encoding.com/wdocs/ApiDocCodecSettings



23 Dec 2009. Extended GetStatus action


Simple mode

<?xml version="1.0"?>
<response>
    <id>[MediaID]</id>
    <userid>[UserID]</userid>
    <sourcefile>[SourceFile]</sourcefile>
    <status>[MediaStatus]</status>
    <notifyurl>[NotifyURL]</notifyurl>
    <created>[Date]</created>
    <started>[Date]</started>
    <finished>[Date]</finished>
    <prevstatus>[MediaStatus]</prevstatus>
    <downloaded>[Date]</downloaded>
    <uploaded>[Date]</uploaded>
    <time_left>[TotalTimeLeft]</time_left>
    <progress>[TotalProgress]</progress>
    <time_left_current>[StatusTimeLeft]</time_left_current>
    <progress_current>[StatusProgress]</progress_current>   
    <format>
        <id>[ID]</id>
        <status>[Status]</status>
        <created>[Date]</created>
        <started>[Date]</started>
        <finished>[Date]</finished>
        [FormatFields]
       
        <s3_destination>[TempS3Link]</s3_destination> <!-- optional -->
        <cf_destination>[TempCFLink]</cf_destination> <!-- optional -->
    </format>

    <format>
    …
    </format>
</response>




Where Date is of the format: YYYY-MM-DD HH:MM:SS
FormatFields is a set of fields corresponding to <format> section of an user’s API request
TotalTimeLeft is an estimated time until the media processing would be finished
StatusTimeLeft is an estimated time left for the media's current status
TotalProgress is an estimated progress for entire media processing (in percent)
StatusProgress is an estimated progress for the media's current status (in percent)
TempS3Link S3 URL of the encoded file, if the <destination> was empty and result put to S3
TempCFLink CDN URL of the encoded file, if the <destination> was empty and result put to Rackspace CloudFiles

MediaStatus can take the following values: 'New', 'Downloading', 'Ready to process', 'Waiting for encoder', 'Processing', 'Saving', 'Finished', 'Error'.

Status can take the following values: 'New', 'Waiting for encoder', 'Processing', 'Saving', 'Finished', 'Error'.

Extended (batch) mode


to request the status of several medias in one request:
Request:
<query>
        <action>GetStatus</action>
        <userid>[UserID]</userid>
        <userkey>[UserKey]</userkey>
        <extended>yes</extended>
        <mediaid>[CommaSeparatedList]</mediaid>
</query>


Response:
<response>

<job>
    <id>[MediaID]</id>
    <userid>[UserID]</userid>
    <sourcefile>[SourceFile]</sourcefile>
    <status>[MediaStatus]</status>
    <notifyurl>[NotifyURL]</notifyurl>
    <created>[Date]</created>
    <started>[Date]</started>
    <finished>[Date]</finished>
    <prevstatus>[MediaStatus]</prevstatus>
    <downloaded>[Date]</downloaded>
    <filesize>[FileSize]</filesize>
    <processor>[AMAZON | RACKSPACE]</processor>
    <progress>[TotalProgress]</progress>
    <time_left>[TotalTimeLeft]</time_left>

    <format>
        <id>[ID]</id>
        <status>[Status]</status>
        <created>[Date]</created>
        <started>[Date]</started>
        <finished>[Date]</finished>
        <s3_destination>[TempS3Link]</s3_destination> <!-- optional -->
        <cf_destination>[TempCFLink]</cf_destination> <!-- optional -->
        <convertedsize>[FileSize]</convertedsize>
        <time_left>[TotalTimeLeft]</time_left>
        <progress>[TotalProgress]</progress>
        <time_left_current>[StatusTimeLeft]</time_left_current>
        <progress_current>[StatusPorgress]</progress_current>
        <file_size>[FileSize]</file_size>
    </format>

    <format>
    …
    </format>
</job>

<job>
...
</job>

...
</response>




22 Dec 2009. MPEG-2 output


output (required) – output format. Specify format of encoded file.
Allowed values:
flv, fl9, wmv, 3gp, mp4, m4v, ipod, iphone, appletv, psp, zune, mp3, wma, mpeg2, thumbnail*, image **, mpeg2 ***.

video_codec [optional] - Video codec.
Allowed values:
flv: flv, libx264, vp6 **
fl9: libx264
wmv, zune: wmv2, msmpeg4
3gp: h263, libx264
m4v: mpeg4
mp4, ipod, iphone, appletv, psp: mpeg4, libx264
mpeg2: mpeg2video
mp3, wma: none
Default:
flv: flv
fl9: libx264
wmv, zune: wmv2
3gp: h263
mp4, m4v, ipod, iphone, appletv, psp: mpeg4
mpeg2: mpeg2video

* - see Thumbnail Features below
** - see Image Converting Features below
*** - just experimental feature, please use with case, feedback is welcome


audio_sample_rate [optional] - Audio sampling frequency (Hz).
Allowed values:
All: any non-zero integer.
3gp: 8000
flv, mp3: 11025, 22050, 44100
wmv, wma, zune: 11025, 22050, 32000, 44100, 48000
mpeg2: 44100, 48000
Default:
All: none
3gp: 8000
flv, mp3, zune, mpeg2: 44100

audio_codec [optional] - Audio codec.
Allowed values:
mp3: libmp3lame
flv: libmp3lame, libfaac
fl9, mp4, m4v, ipod, iphone, appletv, psp: libfaac
wmv, wma, zune: wmav2, libmp3lame
3gp: libamr_nb
mpeg2: pcm_s16be, pcm_s16le

Default:
flv, mp3: libmp3lame
fl9, mp4, m4v, ipod, iphone, appletv, psp: libfaac
wmv, zune: wmav2
3gp: libamr_nb
mpeg2: pcm_s16be

22 Dec 2009. Using Rackspace Cloud Files as a source or a destination


To specify your source file are to be taken from or result files to be put to Rackspace Cloud Files folder, you should specify your source or destination URLs in two different ways:

1) virtual URL http://RS_USER:RS_KEY@storage.cloudfiles.com/your_folder/file.ext

2) Real URL if you were authenticated yourself recently like this:

https://storage4.clouddrive.com/v1/MossoCloudFS_cea19775-aa94-4d78-8da9-1a7b4bbbd548/your_folder/file.ext?auth-token=c2633419-7b79-3d58-8417-d63666dddfd5

22 Dec 2009. Image Converting Features


    <format>
    <!-- Format fields -->
        <output>image</output>
        <image_format>jpg</image_format>
        <resize_method>resize</resize_method>
        <size>560x420</size>
        <keep_aspect_ratio>yes</keep_aspect_ratio>
        <quality>75</quality>
        <sharpen_radius>1</sharpen_radius>
        <sharpen_sigma>0.5</sharpen_sigma>
    <!-- Destination fields -->
        <destination>[DestFile]</destination>
    </format>   


With the following specific parameters:
image_format [required] – Format of resulting image.
Allowed values:
jpg, png, gif
Default: jpg

size [required] – Size of resulting image.
Allowed values:
WxH or Wx or xH, where W and H are positive integers
Default: none

resize_method [optional] - How the original picture will be inscribed to new size
Allowed values:
resize, crop, combine
Default: resize
keep_aspect_ratio [optional] - Whether to keep width to height ratio of original picture
Allowed values:
yes, no
Default: yes
quality [optional] - JPEG quality
Allowed values:
jpg: 1-100
All: none
Default: 80

sharpen_radius [optional] - Sharpen radius (use 0 in most cases)
Allowed values:
Integer: 0-10
Default: none

sharpen_sigma [optional] - Sharpen amount (best are 0.5-1.0)
Allowed values:
Float: 0.2-10
Default: 0.5



18 Nov 2009. Frame resizing ability added


keep_aspect_ratio [optional] - Whether to keep width to height ratio of the original frame size
Allowed values:
yes, no
Default: yes

18 Nov 2009. AAC added as an option for FLV

audio_codec [optional] - Audio codec.
Allowed values:
mp3: libmp3lame
flv: libmp3lame, libfaac
fl9, mp4, m4v, ipod, iphone, appletv, psp: libfaac
wmv, wma, zune: wmav2, libmp3lame
3gp: libamr_nb
Default:
flv, mp3: libmp3lame
fl9, mp4, m4v, ipod, iphone, appletv, psp: libfaac
wmv, zune: wmav2
3gp: libamr_nb


18 Nov 2009. Additional watermarking options


Logo fields


logo_source [required] - The URL of the logo image. The image format can be GIF, JPG or PNG.
Allowed values:
http://[user[:password]@]hostname[:port]/[path]/[filename],
ftp://[user[:password]@]hostname[:port]/[path]/[filename][?passive=yes],
sftp://[user[:password]@]hostname[:port]/[path]/[filename],
Default:
none

logo_x [optional] - left offset of logo image
Allowed values:
non-negative integer
Default:
10

logo_y [optional] - top offset of logo image
Allowed values:
non-negative integer
Default:
10


logo_mode [optional] - video and watermarking picture mixing mode
Allowed values:
0, 1
Default:
1

logo_threshold [optional] - Threshold color mask
Allowed values:
6-digits hexadecimal 000000-FFFFFF
Default:
000000

How mode and threshold work

logo_mode 0: The watermark picture works like this (assuming color intensities 0..0xFF): Per color do this (assuming logo_threshold is '808080'): If mask color is 0x80, no change to the original frame. If mask color is < 0x80 the absolute difference is subtracted from the frame. If result < 0, result = 0. If mask color is > 0x80 the absolute difference is added to the frame. If result > 0xFF, result = 0xFF.
If threshold is 000000 the color value of watermark is added to the destination.

logo_mode 1: Per color do this: If mask color > threshold color then the watermark pixel is used.


24 June 2009. Turbo encoding speed now available



<!-- Format fields -->
    ...
        <turbo>yes</turbo>
    ...


NOTE: Additional encoding bandwidth charges apply, see the Turbo Encoding Help Article for more details.

21 May 2009. Audio output formats added


output (required) – output format. Specify format of encoded file.
Allowed values:
flv, fl9, wmv, 3gp, mp4, m4v, ipod, iphone, appletv, psp, zune, mp3, wma and thumbnail*.
Default: none
...


21 May 2009. Adjusting audio volume

<!-- Format fields -->
    ...
        <audio_volume>[Volume]</audio_volume>
    ...


audio_volume [optional] - Audio volume level, in percent.
Allowed values:
non-negative integer
Default:
100


21 May 2009. H.264 in FLV container


video_codec [optional] - Video codec.
Allowed values:
flv: flv, libx264, vp6 **
fl9: libx264
wmv, zune: wmv2, msmpeg4
3gp: h263, libx264
m4v: mpeg4
mp4, ipod, iphone, appletv, psp: mpeg4, libx264
mp3, wma: none
Default:
flv: flv
fl9: libx264
wmv, zune: wmv2
3gp: h263
mp4, m4v, ipod, iphone, appletv, psp: mpeg4
mp3, wma: none

...


27 Feb 2009. thumb_* parameters are going away


thumb_time [optional, deprecated***] - Timestamp (in seconds) to capture thumbnail.
Allowed values:
integer
Default:
None

thumb_size [optional, deprecated***] - Thumbnail size (in pixels).
Allowed values:
WxH, where W and H are any non-zero integers.
Default:
None
...

thumb_destination [optional, deprecated***] - The destination URL to put the thumbnail.
Allowed values:
ftp://[user]:[password]@[server]/[path]/[filename],
http://[AWS_KEY:AWS_SECRET@][bucket].s3.amazonaws.com/[filename]
Default:
None
*** - see Thumbnail Features chapter below



30 Dec 2008. VP6 encoding moved under FLV format


video_codec [optional] - Video codec.
Allowed values:
flv: flv, vp6 **
fl9: libx264
wmv, zune: wmv2, msmpeg4
3gp: h263, libx264
m4v: mpeg4
mp4, ipod, iphone, appletv, psp: mpeg4, libx264
Default:
flv: flv
fl9: libx264
wmv, zune: wmv2
3gp: h263
mp4, m4v, ipod, iphone, appletv, psp: mpeg4

** - see VP6 Features chapter below

VP6 Features


If you choose 'vp6' codec for 'flv' output format, your XML query will differ (less number of parameters are supported, see below):

<format>
            <output>flv</output>
            <video_codec>vp6</video_codec>
            <bitrate></bitrate> <!-- optional -->
            <size></size> <!-- optional -->
            <audio_bitrate>64k</audio_bitrate> <!-- optional -->
            <audio_sample_rate>44100<audio_sample_rate> <!-- optional -->
            <audio_channels_number>2</audio_channels_number> <!-- optional -->
            <framerate></framerate> <!-- optional -->
            <destination></destination> <!-- optional -->

</format>


Note: old-style requests with <output>vp6</output> are deprecated and will be automatically converted to the new form.

30 Dec 2008. Custom keyframe interval and video splicing added

<?xml version="1.0"?>
<query>

<!-- Format fields -->
        ...            
        <keyframe>[Keyframe Period (GOP)]</keyframe>
        <start>[Start From]</start>
        <duration>[Result Duration]</duration>
<!-- Destination fields -->
        ...            
<!-- Logo fields (OPTIONAL) -->    
        ...
    </format>

</query>


Format fields


keyframe [optional] - Keyframe period, in frames.
Allowed values:
positive integer.
Default:
300
start [optional] - Start encoding from (sec).
Allowed values:
non-negative integer.
Default:
None

duration [optional] - Duration (sec).
Allowed values:
positive integer.
Default:
None



26 Dec 2008. H.264 is now available for mp4, ipod, iphone, appletv, psp and 3gp formats

video_codec [optional] - Video codec.
Allowed values:
flv: flv
fl9: libx264
wmv, zune: wmv2, msmpeg4
3gp: h263, libx264
m4v: mpeg4
mp4, ipod, iphone, appletv, psp: mpeg4, libx264


6 Nov 2008. Automatic frame size calculation (maintaining aspect ratio)


size [optional] - Video frame size.
Allowed values:
All: WxH, where W and N are any even integers.
3gp: 128x96, 176x144, 352x288, 704x576, 1408x1152
ipod: 320x240, 640x480
iphone: 480x368
appletv: 710x480
zune: 320x180, 320x240
Default:
All: none
3gp: 176x144
iphone: 480x368
appletv: 710x480
psp: 368x192
zune: 320x180
Note: You can specify only one dimension: either width or height. In this case, set other dimension to 0. (I.e. 640x0).

21 Oct 2008. Additional encoding options

<?xml version="1.0"?>
<query>

<!-- Format fields -->

        <output>[Output format]</output>
        <video_codec>[Video Codec]</video_codec>
        <audio_codec>[Audio Codec]</audio_codec>
        <bitrate>[Video bitrate]</bitrate>
        <audio_bitrate>[Audio bitrate]</audio_bitrate>
        <audio_sample_rate>[Audio quality]</audio_sample_rate>
        <size>[Size]</size>
        <crop_left>[Crop Left]</crop_left>
        <crop_top>[Crop Top]</crop_top>
        <crop_right>[Crop Right]</crop_right>
        <crop_bottom>[Crop Bottom]</crop_bottom>
        <thumb_time>[Thumb time]</thumb_time>
        <thumb_size>[Thumb size]</thumb_size>
        <add_meta>[yes/no]</add_meta>
       
        <rc_init_occupancy>[RC Occupancy]</rc_init_occupancy>
        <minrate>[Min Rate]</minrate>
        <maxrate>[Max Rate]</maxrate>
        <bufsize>[RC Buffer Size]</bufisize>
<!-- Destination fields -->
        ...            
<!-- Logo fields (OPTIONAL) -->    
        ...
    </format>

</query>

...

Format fields


maxrate [optional] - Maximum allowed video bitrate.
Allowed values:
N or Nk - where N is any non-zero integer.
Default:
None
minrate [optional] - Minimum allowed video bitrate.
Allowed values:
N or Nk - where N is any non-zero integer.
Default:
None

bufsize [optional] - Rate control buffer size (bits).
Allowed values:
N or Nk - where N is any non-zero integer.
Default:
None

rc_init_occpancy [optional] - Initial rate control buffer occupancy (bits).
Allowed values:
N or Nk - where N is any non-zero integer.
Default:
None

20 Oct 2008. Additional S3 Options

Main fields


  • UserID – an unique user identifier. Can be taken from user’s page.
  • UserKey – user’s key string. Creates automatically when user created and can be changed by user.
  • Action – the action to be performed.
    • AddMedia – add new media to user’s media list, creates new items in a queue according to formats specified in XML
    • AddMediaBenchmark - add new media to user's media list and set a flag for NOT processing it after downloading. Format fields could be specified as well. If NotifyURL is set, a notification will be sent after the media will have been ready for processing.
    • UpdateMedia – replace information about existing media's formats. All old format items will be deleted, and the new ones added.
    • ProcessMedia - start encoding of previously downloaded media (one that added with AddMediaBenchmark action)
    • CancelMedia – delete specified media and all its items in queue
    • GetMediaList – return list of user’s media
    • GetStatus – return information about selected user’s media and all its items in queue
    • GetMediaInfo - returns some video parameters of the specified media, if available
  • MediaID – an unique identifier of media. This field must be specified for the following actions: UpdateMedia, CancelMedia, GetStatus.
  • SourceFile – media source file. It can be in the following formats: http://[user]:[password]@ [server]/[path]/[filename] or ftp://[user]:[password]@[server]/[path]/[filename] or sftp://[user]:[password]@[server]/[path]/[filename] or http://[AWS_KEY:AWS_PWD@][bucket].s3.amazonaws.com/[filename] – If you need your S3 files to be accessed with your own AWS credentials, add your AWS key/secret to the URL. Note: do not forget to encode your AWS_SECRET, specifically replace '/ ' with '%2F'. If you don't specify AWS key/secret, the object must have READ permission for AWS user 1a85ad8fea02b4d948b962948f69972a72da6bed800a7e9ca7d0b43dc61d5869 (or for all users). See http://docs.amazonwebservices.com/AmazonS3/2006-03-01/S3_ACLs.html#S3_ACLs_Grantees for details. This field must be specified only for AddMedia and AddMediaBenchmark actions.
  • NotifyURL – could be either an HTTP(S) URL of the script the result would be posted to, or a mailto: link with email address the result info to be sent. This field may be specified for AddMedia and AddMediaBenchmark actions.

...

Destination fields


destination [optional] - The destination URL to put the encoded file.
Allowed values:
ftp://[user]:[password]@[server]/[path]/[filename][?passive=yes],
sftp://[user]:[password]@[server]/[path]/[filename],
http://[AWS_KEY:AWS_SECRET@][bucket].s3.amazonaws.com/[filename][?acl=public-read | authenticated-read] - If you need your S3 files to be accessed with your own AWS credentials, add your AWS key/secret to the URL.
Note: do not forget to encode your AWS_SECRET, specifically replace '/ ' with '%2F'.
If you don't specify AWS key/secret, the bucket must have WRITE permission for AWS user 1a85ad8fea02b4d948b962948f69972a72da6bed800a7e9ca7d0b43dc61d5869, See http://docs.amazonwebservices.com/AmazonS3/2006-03-01/S3_ACLs.html#S3_ACLs_Grantees for details.
Also, you can add ?acl=public-read OR ?acl=authenticated-read after the filename. This will explicitly set access rights to the saved object instead of the default settings.
Default:
None

thumb_destination [optional] - The destination URL to put the thumbnail.
Allowed values:
ftp://[user]:[password]@[server]/[path]/[filename],
http://[AWS_KEY:AWS_SECRET@][bucket].s3.amazonaws.com/[filename]
Default:
None

20 Oct 2008. Watermarking



XML format for user’s API request


<?xml version="1.0"?>
<query>

<!-- Main fields -->

    <userid>[UserID]</userid>
    <userkey>[UserKey]</userkey>
    <action>[Action]</action>
    <mediaid>[MediaID]</mediaid>
    <source>[SourceFile]</source>
    <notify>[NotifyURL]</notify>

    <format>

<!-- Format fields -->

        <output>[Output format]</output>
        <video_codec>[Video Codec]</video_codec>
        <audio_codec>[Audio Codec]</audio_codec>
        <bitrate>[Video bitrate]</bitrate>
        <audio_bitrate>[Audio bitrate]</audio_bitrate>
        <audio_sample_rate>[Audio quality]</audio_sample_rate>
        <size>[Size]</size>
        <crop_left>[Crop Left]</crop_left>
        <crop_top>[Crop Top]</crop_top>
        <crop_right>[Crop Right]</crop_right>
        <crop_bottom>[Crop Bottom]</crop_bottom>
        <thumb_time>[Thumb time]</thumb_time>
        <thumb_size>[Thumb size]</thumb_size>
        <add_meta>[yes/no]</add_meta>
<!-- Destination fields -->
        <destination>[DestFile]</destination>
        <thumb_destination>[Thumb Dest]</thumb_destination>    
<!-- Logo fields (OPTIONAL) -->    
        <logo>
                <logo_source>[LogoURL]</logo_source>
                <logo_x>[LogoLeft]</logo_x>    
                <logo_y>[LogoTop]</logo_y>                     
        </logo>
    </format>

</query>


Logo fields


logo_source [required] - The URL of the logo image. The image format can be GIF, JPG or PNG.
Allowed values:
http://[user]:[password]@ [server]/[path]/[filename],
ftp://[user]:[password]@[server]/[path]/[filename][?passive=yes],
sftp://[user]:[password]@[server]/[path]/[filename],
Default:
none

logo_x [optional] - left offset of logo image
Allowed values:
non-negative integer
Default:
10

logo_y [optional] - top offset of logo image
Allowed values:
non-negative integer
Default:
10

29 Sep 2008. Temporary http download of encoded videos


GetStatus action


<?xml version="1.0"?>
<response>
    <id>[MediaID]</id>
    <userid>[UserID]</userid>
    <sourcefile>[SourceFile]</sourcefile>
    <status>[MediaStatus]</status>
    <notifyurl>[NotifyURL]</notifyurl>
    <created>[Date]</created>
    <started>[Date]</started>
    <finished>[Date]</finished>
    <prevstatus>[MediaStatus]</prevstatus>
    <downloaded>[Date]</downloaded>
    <uploaded>[Date]</uploaded>
    <time_left>[TotalTimeLeft]</time_left>
    <progress>[TotalProgress]</progress>
    <time_left_current>[StatusTimeLeft]</time_left_current>
    <progress_current>[StatusProgress]</progress_current>   
    <format>
        <id>[ID]</id>
        <status>[Status]</status>
        <created>[Date]</created>
        <started>[Date]</started>
        <finished>[Date]</finished>
        [FormatFields]
       
        <s3_destination>[TempS3Link]</s3_destination>
    </format>

    <format>
    …
    </format>
</response>

Where Date is of the format: YYYY-MM-DD HH:MM:SS
FormatFields is a set of fields corresponding to <format> section of an user’s API request
TotalTimeLeft is an estimated time until the media processing would be finished
StatusTimeLeft is an estimated time left for the media's current status
TotalProgress is an estimated progress for entire media processing (in percent)
StatusProgress is an estimated progress for the media's current status (in percent)
TempS3Link S3 URL of the encoded file, if the <destination> was empty

29 Sep 2008. Passive FTP support


Main fields


  • UserID – an unique user identifier. Can be taken from user’s page.
  • UserKey – user’s key string. Creates automatically when user created and can be changed by user.
  • Action – the action to be performed.
    • AddMedia – add new media to user’s media list, creates new items in a queue according to formats specified in XML
    • AddMediaBenchmark - add new media to user's media list and set a flag for NOT processing it after downloading. Format fields could be specified as well.
    • UpdateMedia – replace information about existing media's formats. All old format items will be deleted, and the new ones added.
    • ProcessMedia - start encoding of previously downloaded media (one that added with AddMediaBenchmark action)
    • CancelMedia – delete specified media and all its items in queue
    • GetMediaList – return list of user’s media
    • GetStatus – return information about selected user’s media and all its items in queue
    • GetMediaInfo - returns some video parameters of the specified media, if available
  • MediaID – an unique identifier of media. This field must be specified for the following actions: UpdateMedia, CancelMedia, GetStatus.
  • SourceFile – media source file. It can be in the following formats: http://[user]:[password]@ [server]/[path]/[filename] or ftp://[user]:[password]@[server]/[path]/[filename][?passive=yes] or sftp://[user]:[password]@[server]/[path]/[filename] or http://[bucket].s3.amazonaws.com/[filename] – the object must have READ permission for AWS user 1a85ad8fea02b4d948b962948f69972a72da6bed800a7e9ca7d0b43dc61d5869 (or for all users). See http://docs.amazonwebservices.com/AmazonS3/2006-03-01/S3_ACLs.html#S3_ACLs_Grantees for details. This field must be specified only for AddMedia action.
  • NotifyURL – could be either an URL of the script the result would be posted to, or a mailto: link with email address the result info to be sent. This field may be specified for AddMedia action.

......

Destination fields


destination [optional] - The destination URL to put the encoded file.
Allowed values:
ftp://[user]:[password]@[server]/[path]/[filename][?passive=yes],
sftp://[user]:[password]@[server]/[path]/[filename],
http://[bucket].s3.amazonaws.com/[filename] (the bucket must have WRITE permission for AWS user 1a85ad8fea02b4d948b962948f69972a72da6bed800a7e9ca7d0b43dc61d5869, See http://docs.amazonwebservices.com/AmazonS3/2006-03-01/S3_ACLs.html#S3_ACLs_Grantees for details).
Default:
None

thumb_destination [optional] - The destination URL to put the thumbnail.
Allowed values:
ftp://[user]:[password]@[server]/[path]/[filename],
http://[bucket].s3.amazonaws.com/[filename] (the bucket must have WRITE permission for AWS user 1a85ad8fea02b4d948b962948f69972a72da6bed800a7e9ca7d0b43dc61d5869, See http://docs.amazonwebservices.com/AmazonS3/2006-03-01/S3_ACLs.html#S3_ACLs_Grantees for details).
Default:
None

Note: Adding ?passive=yes to the FTP URL forces downloader/uploader use Passive Mode for FTP Transfer. Also, you can specify ?passive=no (the default) explicitly. It will take the same effect that if you don't specify this parameter at all.

29 Sep 2008. Realtime status updates


GetStatus action


<?xml version="1.0"?>
<response>
    <id>[MediaID]</id>
    <userid>[UserID]</userid>
    <sourcefile>[SourceFile]</sourcefile>
    <status>[MediaStatus]</status>
    <notifyurl>[NotifyURL]</notifyurl>
    <created>[Date]</created>
    <started>[Date]</started>
    <finished>[Date]</finished>
    <downloaded>[Date]</downloaded>
    <time_left>[TotalTimeLeft]</time_left>
    <progress>[TotalProgress]</progress>
    <time_left_current>[StatusTimeLeft]</time_left_current>
    <progress_current>[StatusProgress]</progress_current>   
    <format>
        <id>[ID]</id>
        <status>[Status]</status>
        <created>[Date]</created>
        <started>[Date]</started>
        <finished>[Date]</finished>
        [FormatFields]
    </format>

    <format>
    …
    </format>
</response>

Where Date is of the format: YYYY-MM-DD HH:MM:SS
FormatFields is a set of fields corresponding to <format> section of an user’s API request
TotalTimeLeft is an estimated time until the media processing would be finished
StatusTimeLeft is an estimated time left for the media's current status
TotalProgress is an estimated progress for entire media processing (in percent)
StatusProgress is an estimated progress for the media's current status (in percent)

29 Sep 2008. Notification after AddMediaBenchMark call


Main fields


  • UserID – an unique user identifier. Can be taken from user’s page.
  • UserKey – user’s key string. Creates automatically when user created and can be changed by user.
  • Action – the action to be performed.
    • AddMedia – add new media to user’s media list, creates new items in a queue according to formats specified in XML
    • AddMediaBenchmark - add new media to user's media list and set a flag for NOT processing it after downloading. Format fields could be specified as well. If NotifyURL is set, a notification will be sent after the media will have been ready for processing.



28 Aug 2008. API requests through SSL

The XML API Overview


The communication with the encoding.com is realized through a single interface: by sending HTTP(S) requests to the manage.encoding.com/. All client requests and server answers use XML format. Client must send HTTP(S) POST request with single parameter named xml.
The server response is a normal XML document.

20 Aug 2008. Additional information added to GetMediaInfo response

GetMediaInfo action


<?xml version="1.0"?>
<response>
    <bitrate>364k</bitrate>
    <duration>175.21</duration>
    <video_codec>h264</video_codec>
    <frame_rate>23.98</frame_rate> 
    <audio_sample_rate>44100</audio_sample_rate>       
    <size>352x288</size>
</response>


19 Aug 2008. New API features


Format fields


The following parameters was added:

two_pass [optional] - Whether to use 2-pass encoding
Allowed values:
yes, no
Defualt:
no

cbr [optional] - Whether to use CBR (Constant bitrate)
Allowed values:
yes, no
Defualt:
no

deinterlacing [optional] - Whether to use de-interlacing
Allowed values:
yes, no
Defualt:
no


06 Aug 2008. Default frame size changed

At the section XML format for user’s API request
Changed:

Format fields


size [optional] - Video frame size.
Allowed values:
All: WxH, whereW and N are any non-zero even integers.
3gp: 128x96, 176x144, 352x288, 704x576, 1408x1152
ipod: 320x240, 640x480
iphone: 480x368
appletv: 710x480
zune: 320x180, 320x240
Default:
All: none
3gp: 176x144
iphone: 480x368
appletv: 710x480
psp: 368x192
zune: 320x180


06 Aug 2008. Media Benchmarking API functions

At the section XML format for user’s API request
Changed:

Main fields


  • UserID – an unique user identifier. Can be taken from user’s page.
  • UserKey – user’s key string. Creates automatically when user created and can be changed by user.
  • Action – the action to be performed.
    • AddMedia – add new media to user’s media list, creates new items in a queue according to formats specified in XML
    • AddMediaBenchmark - add new media to user's media list and set a flag for NOT processing it after downloading. Format fields could be specified as well.
    • UpdateMedia – replace information about existing media's formats. All old format items will be deleted, and the new ones added.
    • ProcessMedia - start encoding of previously downloaded media (one that added with AddMediaBenchmark action)
    • CancelMedia – delete specified media and all its items in queue
    • GetMediaList – return list of user’s media
    • GetStatus – return information about selected user’s media and all its items in queue
    • GetMediaInfo - returns some video parameters of the specified media, if available
  • MediaID – an unique identifier of media. This field must be specified for the following actions: UpdateMedia, CancelMedia, GetStatus.
  • SourceFile – media source file. It can be in the following formats: http://[user]:[password]@ [server]/[path]/[filename] or ftp://[user]:[password]@[server]/[path]/[filename] or sftp://[user]:[password]@[server]/[path]/[filename] or http://[bucket].s3.amazonaws.com/[filename] – the object must have READ permission for AWS user 1a85ad8fea02b4d948b962948f69972a72da6bed800a7e9ca7d0b43dc61d5869 (or for all users). See http://docs.amazonwebservices.com/AmazonS3/2006-03-01/S3_ACLs.html#S3_ACLs_Grantees for details. This field must be specified only for AddMedia action.
  • NotifyURL – could be either an URL of the script the result would be posted to, or a mailto: link with email address the result info to be sent. This field may be specified for AddMedia action.


At the section Server Response XML format
Added:

GetMediaInfo action


<?xml version="1.0"?>
<response>
    <bitrate>364k</bitrate>
    <duration>175.21</duration>
    <video_codec>h264</video_codec>
    <size>352x288</size>
</response>




15 Jul 2008

At the section XML format for user’s API request
Added:

Multiple Thumbnail Support


Instead of using thumb_ parameters within <format>, you can specify separate encoding task with output = thumbnail:
    <format>
    <!-- Format fields -->
        <output>thumbnail</output>
        <time>[Size]</time>    
        <width>[Width]</width>
        <height>[Size]</height>
    <!-- Destination fields -->
        <destination>[DestFile]</destination>
    </format>   


With the following specific parameters:
time [optional] – Timestamp (in seconds) to capture thumbnail.
Allowed values:
Non-negative integer or hh:mm:ss.ms
Default: 5
width [optional] - Thumbnail width (in pixels)
Allowed values:
Non-negative integer
Default: none
height [optional] - Thumbnail height (in pixels)
Allowed values:
Non-negative integer
Default: none
destination [optional] - The destination URL to put the thumbnail.
If you specify both width and height, you'll get a thumbnail with these dimensions, and if your video have another aspect ratio than the thumbnail, black spaces will be added to the picture.
If you specify only one parameter from this pair, the other one will be calculated according to your video size.
If none of those parameters specified, the thumbnail will have the same size as your video have.
Now only JPEG format is supported for thumbnails.



15 Jul 2008

At the section Server Response XML format
New server response format added:

AddMedia action


<?xml version="1.0"?>
<response>

    <message>Added</message>
    <MediaID>[MediaID]</MediaID>
</response>



3 Jul 2008. VP6 Support

Added:

VP6 Features


If you choose vp6 for output format, your XML query will differ (you can specify only two parameters in addition to output at format fields section):

    <format>
    <!-- Format fields -->
        <output>vp6</output>
        <profile>[VP6 profile]</profile>
        <size>[Size]</size>
    <!-- Destination fields -->
        <destination>[DestFile]</destination>
    </format>   


The specific parameter profile is added:
profile [optional] – VP6 profile.
Allowed values:
VP6-E, VP6-S
Default: VP6-E

destination [required] - The destination URL to put the encoded file.