Tasks Reference (v2)¶
audio.beats¶
- ¶
Find beats in an audio file.
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- url (string) – URL of the audio file
Output Values: - beats (object) – An array containing the timestamps of the detected beats, in seconds
- duration (integer) – The processed audio file duration in seconds
- downbeats (object) – An array containing the timestamps of the detected downbeats, in seconds
audio.convert¶
- ¶
Transcode audio file (mp3, vorbis), and return audio duration.
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- url (string) – URL of the audio file to be converted.
- codec (string) – Desired codec for the output file. (choices:
'mp3'
,'vorbis'
,'aac'
) (default:u'mp3'
) - force (boolean) – Force encoding. (default:
False
)
Output Values: - duration (float) – Duration of the audio file in seconds.
- content_type (string) – Output file content type.
Output Files: - output – URL of the output file.
audio.info¶
- ¶
Return duration and codec of an audio file.
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- url (string) – URL of the audio file to be scanned.
Output Values: - duration (float) – Duration of the audio file in seconds, rounded to 1/100th second.
- content_type (string) – Content-type of the audio file.
- codec (string) – Codec of the audio file.
audio.waveform¶
- ¶
Create a waveform image from an audio file.
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- url (string) – URL of the audio file to be scanned.
- width (integer) – (default:
1024
) - height (integer) – (default:
60
) - vmargin (integer) – Vertical margin. (default:
0
) - fill (string) – Color of the wave-form. (default:
u'#000000'
) - background (string) – Color of the background. (default:
u'#FFFFFF'
) - start (float) – Seconds to start from. (default:
0.0
) - end (float) – Generate waveform up to this point, in seconds.
- format (string) – Output image format. (choices:
'png'
,'jpeg'
) (default:u'jpeg'
)
Output Values: - duration (float) – Duration of the audio file in seconds.
- width (integer) –
- height (integer) –
- content_type (string) –
Output Files: - output – URL of the output file.
html.scrape¶
- ¶
Scrape html webpage to return videos & images found
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- url (string) – URL of the html page
Output Values: - hits (object) –
- page_title (string) –
image.gif¶
- ¶
Create an animated GIF from a list of images.
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- images (list of strings) – The list of image URLs that will be used to create the animated GIF.
- loop (integer) – The number of loops of the GIF, 0 means to loop forever, and -1 no loop. (default:
0
) - frame_duration (float) – The duration in seconds during which each image will be shown when the GIF is playing, rounded to 1/100th of a second. (default:
0.1
) - width (integer) – The pixel width of the output GIF. Leave empty to use source images width.
- height (integer) – The pixel height of the output GIF. Leave empty to use source images height.
Output Files: - output – The URL of the output GIF.
image.info¶
- ¶
Return image file information.
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- url (string) – URL of the image file to be scanned.
Output Values: - content_type (string) – Content-Type of the image file.
- type (string) – Type of the file.
- width (integer) –
- height (integer) –
- alpha (boolean) –
- exif_orientation (integer) –
The exif orientation that should be applied to the image to see it as it was shot, as an integer x, where:
- x=1: The 0th row is at the visual top of the image, and the 0th column is the visual left-hand side.
- x=2: The 0th row is at the visual top of the image, and the 0th column is the visual right-hand side
- x=3: The 0th row is at the visual bottom of the image, and the 0th column is the visual right-hand side.
- x=4: The 0th row is at the visual bottom of the image, and the 0th column is the visual left-hand side.
- x=5: The 0th row is the visual left-hand side of the image, and the 0th column is the visual top.
- x=6: The 0th row is the visual right-hand side of the image, and the 0th column is the visual top.
- x=7: The 0th row is the visual right-hand side of the image, and the 0th column is the visual bottom.
- x=8: The 0th row is the visual left-hand side of the image, and the 0th column is the visual bottom.
- rotation (float) – The rotation that should be applied to the image to see it as it was shot, in degrees. (None if a flip is required or info is not present in exif)
- date_time (string) –
- flash (boolean) –
- focal_length (float) –
- iso_speed (float) –
- exposure_time (float) –
image.strip¶
- ¶
Create an image strip of custom dimensions by concatenating images.
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- urls (MultiHttpFileField) – Array of the source images URLs.
- width (integer) – Pixel width of each frame stitched into film strip.
- height (integer) – Pixel height of each frame stitched into film strip.
- crop (boolean) – If false, video frames fit each strip section. If true, video frames fill each strip section, aligning centers. (default:
False
) - wrap (integer) – Number of images that can be stitched horizontally before stitching starts onto a new line. Use it to create a two dimensional film strip, with count = int * wrap. If left unspecified, all frames are stitched on a single line.
- format (string) – Output image file format (choices:
'jpeg'
,'png'
) (default:u'jpeg'
)
Output Values: - count (integer) – Actual number of frames in the output.
- width (integer) – Width of the output image in pixels.
- height (integer) – Height of the output image in pixels.
- content_type (string) – Mime-type of the output image.
Output Files: - output – URL of the output image.
image.thumb¶
- ¶
Create a new image of custom dimensions and orientation from an original image.
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- width (integer) – Desired thumbnail width, in pixels.
- height (integer) – Desired thumbnail height, in pixels
- crop (boolean) – If crop is true, original image fills new image dimensions. If crop is false, original image fits new image dimensions. (default:
False
) - url (string) – URL of the source image
- rotation (integer) – A counter clockwise rotation rotation to apply to the thumbnail, in degrees. (choices:
0
,90
,180
,270
) (default:0
) - poster (boolean) – If true, a play icon is added in the center. (default:
False
) - format (string) – The output format. (choices:
'jpeg'
,'gif'
,'png'
) (default:u'jpeg'
)
Output Values: - width (integer) – thumbnail width
- height (integer) – thumbnail height
- original_width (integer) – original image width
- original_height (integer) – original height
Output Files: - output – URL of the thumbnail.
video.convert¶
- ¶
Create transcoded video file with custom dimensions, and return its video.info output values.
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- url (string) – URL of the source video
- width (integer) –
- height (integer) –
- crop (boolean) – Allows croping the video to fit in the output size (default:
False
) - audio_codec (string) – Desired audio audio. (choices:
'mp2'
,'mp3'
,'aac'
,'wmav1'
,'wmav2'
) (default:u'aac'
) - video_codec (string) – Desired video codec. (choices:
'h264'
) (default:u'h264'
) - video_bitrate (integer) – Desired video bitrate, in kbps. (default:
3000
) - audio_bitrate (integer) – Desired audio bitrate, in kbps. (default:
128
) - sample_rate (integer) – Desired audio sample rate, in kHz. (choices:
22050
,44100
,48000
) (default:44100
) - crf (integer) – Output constant rate factor (video) (default:
23
) - gop (integer) – Output group of picture (GOP) size (default:
250
)
Output Values: - content_type (string) – Output file content type.
- width (integer) –
- height (integer) –
- original_width (integer) –
- original_height (integer) –
- duration (float) – Duration of the video file, in seconds.
- frame_rate (float) –
- audio_codec (string) –
- video_codec (string) –
- alpha (boolean) –
- rotation (float) – The counter clockwise rotation that should be applied to the video to see it as it was shot, in degrees.
Output Files: - output – URL of the converted file.
video.create¶
- ¶
Create video file(s) from a SXML definition and video profile(s).
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- definition (string) – SXML video definition
- profile (string) – (default:
u'360p'
) - preview (boolean) – (default:
False
) - export (boolean) – (default:
True
) - thumbnail_time (float) – (default:
1.0
) - antialias (integer) – (choices:
1
,2
,4
) (default:4
)
Output Values: - duration (float) –
- width (integer) – video width
- height (integer) – video height
Output Files: - preview –
- export –
- thumbnail –
video.info¶
- ¶
Return video file information.
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- url (string) – URL of the video file to be scanned.
Output Values: - content_type (string) – Mime-type of the video file.
- width (integer) – Video width, in pixels.
- height (integer) – Video height, in pixels.
- duration (float) – Video duration, in seconds.
- frame_rate (float) – Video frame rate, in frames per second.
- alpha (boolean) – A boolean indicating if the video has an alpha channel.
- rotation (float) – The rotation that should be applied to the video to see it as it was shot, in degrees.
- audio_codec (string) – Audio codec name.
- video_codec (string) – Video codec name.
video.reverse¶
- ¶
Create a reversed video file with custom dimensions, and return its video.info output values.
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- url (string) – URL of the source video
- width (integer) –
- height (integer) –
- crop (boolean) – Allows croping the video to fit in the output size (default:
False
) - video_codec (string) – Desired video codec. (choices:
'h264'
) (default:u'h264'
) - video_bitrate (integer) – Desired video bitrate, in kbps. Use source bitrate if left empty.
- crf (integer) – Output constant rate factor (video) (default:
23
) - gop (integer) – Output group of picture (GOP) size (default:
250
)
Output Values: - duration (float) – Duration of the video file, in seconds.
Output Files: - output – URL of the converted file.
video.strip¶
- ¶
Create a film strip image of custom dimensions showing stitched frames of a video, return video.info output values for original video.
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- url (string) – URL of the source video.
- width (integer) – Pixel width of each frame stitched into film strip.
- height (integer) – Pixel height of each frame stitched into film strip.
- crop (boolean) – If false, video frames fit each strip section. If true, video frames fill each strip section, aligning centers. (default:
False
) - wrap (integer) – Number of video frames that can be stitched horizontally before stitching starts onto a new line. Use it to create a two dimensional film strip, with count = int * wrap. If left unspecified, all frames are stitched on a single line.
- start (float) – Time of first frame extracted from video - by default first frame of video. (default:
0.0
) - end (float) – Time of last frame extracted from video - by default last frame of video.
- count (integer) – Number of frames extracted from video, at equal time intervals between start and end times. (default:
10
) - format (string) – Output image file format (choices:
'jpeg'
,'png'
) (default:u'jpeg'
)
Output Values: - count (integer) – Actual number of frames in the output.
- width (integer) – Width of the output image in pixels.
- height (integer) – Height of the output image in pixels.
- original_width (integer) – Width of the input video file, in pixels.
- original_height (integer) – Width of the input video file, in pixels.
- duration (float) – Duration of the input video file, in seconds.
- frame_rate (float) – Frame rate of the input video file, in frames per second.
- content_type (string) – Mime-type of the output image.
Output Files: - output – URL of the output image.
video.thumb¶
- ¶
Create a reversed video file with custom dimensions, and return its video.info output values.
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- url (string) – URL of the source video.
- width (integer) – Width of output image file, in pixels. The default is to use the original video width.
- height (integer) – Height of output image file, in pixels. The default is to use the original video height.
- crop (boolean) – If false, video frame fits output image. If true, video frame fills output image. (default:
False
) - time (float) – Timestamp of the video frame to extract, in seconds. (default:
0.0
) - format (string) – Output image file format. (choices:
'jpeg'
,'png'
) (default:u'jpeg'
) - poster (boolean) – If true, a play icon is added in the center. (default:
False
) - quality (integer) – Output quality, from 1 to 95. (default:
75
)
Output Values: - width (integer) – Width of the output image in pixels.
- height (integer) – Height of the output image in pixels.
- original_width (integer) – Width of the input video file.
- original_height (integer) – Width of the input video file.
- duration (float) – Duration of the input video file, in seconds.
- content_type (string) – Mime-type of the output image.
Output Files: - output – URL of the output image.
video.upload.fb¶
- ¶
Upload a video to Facebook.
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- url (string) – URL of the source video.
- access_token (string) – Target user’s access token.
- title (string) – Video title.
- description (string) – Video description.
- privacy (string) – Privacy level of the video. (choices:
'AUTO'
,'EVERYONE'
,'ALL_FRIENDS'
,'FRIENDS_OF_FRIENDS'
,'SELF'
) (default:u'AUTO'
) - no_story (boolean) – If set to true, this will suppress feed and timeline story. (default:
False
) - api_key (string) – Facebook API key. (default:
u'-'
) - app_secret (string) – Facebook app secret. (default:
u'-'
)
Output Values: - duration (float) – Duration of the input video file, in seconds.
Output Files: - output – URL of the uploaded video on Facebook.
video.upload.vimeo¶
- ¶
Upload a video from user url on Vimeo. Register your app to get a consumer key and secret. Then retrieve an access token key and a secret following these instructions on Oauth for the Vimeo API.
You can use either OAuth1 or OAuth2.
- OAuth2 parameter (Vimeo API v3):
- oauth2_token
- OAuth1 parameters (Vimeo API v2):
- consumer_key
- consumer_secret
- access_token_key
- access_token_secret
- OAuth2 Token requires these privileges:
- Edit (to edit titles / descriptions)
- Upload
Parameters: - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
- url (string) – Video url to upload
- title (string) – Video title
- description (string) – Video description
- consumer_key (string) – OAuth1 Application consumer key
- consumer_secret (string) – OAuth1 Application consumer secret
- access_token_key (string) – OAuth1 User access token key
- access_token_secret (string) – OAuth1 User access token secret
- oauth2_token (string) – OAuth2 User access token secret
Output Values: - free_space (integer) –
- uploaded_file_size (integer) –
- output (string) – URL of the uploaded video on Vimeo.
- duration (float) – Duration of the input video file, in seconds.
video.upload.youtube¶
- ¶
Upload a video to Youtube using the version 3 of the API with OAuth2 Bearer authentication. Register your app and retrieve an access token following these instructions.
Otherwise, you can also get a token with us from there
Parameters: - url (string) – URL of the source video.
- access_token (string) – Target user’s access token with upload authorization.
- developer_key (string) – Youtube developer key of a registered app.
- title (string) – Video title.
- description (string) – Video description.
- tags (list of strings) – (default:
[]
) - category_id (integer) – Video category ID number.The default value is 22, which refers to the People & Blogs category.
- privacy_status (string) – Privacy status of the video. (choices:
'public'
,'private'
,'unlisted'
) (default:u'public'
) - url_callback (string) – URL to callback when the task completes successfully. See Callbacks and Errbacks for details.
- url_errback (string) – URL to callback when the task fails. See Callbacks and Errbacks for details.
Output Values: - output (string) – URL of the uploaded video on Youtube.
- duration (float) – Duration of the input video file, in seconds.