We are a Swiss Army knife for your files
Transloadit is a service for companies with developers. We handle their file uploads and media processing. This means that they can save on development time and the heavy machinery that is required to handle big volumes in an automated way.
We pioneered with this concept in 2009 and have made our customers happy ever since. We are still actively improving our service in 2022, as well as our open source projects uppy.io and tus.io, which are changing how the world does file uploading.
Segment video files and create a playlist
Note: This Robot is no longer the recommended way to generate HLS segments. Please use our /video/adaptive Robot instead.
The /media/playlist Robot generates playlist files for HTTP Live Streaming (HLS).
This Robot accepts HLS segments generated by the /audio/encode and /video/encode Robots. You need to pass an /audio/encode or /video/encode Step that had its segment parameter set to true, to the use parameter of this Robot.
All segments need to be passed to the Robot at the same time, and not one by one. That is why you must use the bundle_steps
parameter, otherwise you will generate multiple playlist files that each contain only one segment.
Also, please make sure that you export your segments (to Amazon S3 for example). If you do not, your playlist file will become invalid after 24 hours, when we remove temporary result files.
1. Resize videos to 800×600 and encode for iPhone (high quality) (H.264)
We offer a variety of video encoding features like optimizing for different devices, merging, injecting ads, changing audio tracks, or adding company logos. Learn more ›
2. Export files to Amazon S3
We export to the storage platform of your choice. Learn more ›
- demos.transloadit.com/7b/816c2805f54cc8a6367fc39fb6e744/c660486a98da4f929410ec95f9dc89c0_c239f27793c14255994bc24cbbaa3516_0.ts
- demos.transloadit.com/c8/7ad6ac50c148ada228b8b466c405b0/c660486a98da4f929410ec95f9dc89c0_c239f27793c14255994bc24cbbaa3516_1.ts
- demos.transloadit.com/36/e6cde54850421682d221508d54b78e/c660486a98da4f929410ec95f9dc89c0_c239f27793c14255994bc24cbbaa3516_2.ts
- demos.transloadit.com/e8/7b63bf1428435eb20052eb179b3952/c660486a98da4f929410ec95f9dc89c0_bfecf093d163441a85e412e4a277c27b_0.ts
- demos.transloadit.com/99/24d8e58dad44059dff2f636fb7a03b/c660486a98da4f929410ec95f9dc89c0_bfecf093d163441a85e412e4a277c27b_1.ts
- demos.transloadit.com/8c/fbfac357904568a2c4365a5d1195f5/c660486a98da4f929410ec95f9dc89c0_bfecf093d163441a85e412e4a277c27b_2.ts
Once all files have been exported, we can ping a URL of your choice with the Assembly status JSON.
3. Generate media playlists
We can enrich media files with metadata and use them to generate playlists. Learn more ›
4. Transcode videos to iPhone (low quality) (H.264)
5. Export files to Amazon S3
- demos.transloadit.com/7b/816c2805f54cc8a6367fc39fb6e744/c660486a98da4f929410ec95f9dc89c0_c239f27793c14255994bc24cbbaa3516_0.ts
- demos.transloadit.com/c8/7ad6ac50c148ada228b8b466c405b0/c660486a98da4f929410ec95f9dc89c0_c239f27793c14255994bc24cbbaa3516_1.ts
- demos.transloadit.com/36/e6cde54850421682d221508d54b78e/c660486a98da4f929410ec95f9dc89c0_c239f27793c14255994bc24cbbaa3516_2.ts
- demos.transloadit.com/e8/7b63bf1428435eb20052eb179b3952/c660486a98da4f929410ec95f9dc89c0_bfecf093d163441a85e412e4a277c27b_0.ts
- demos.transloadit.com/99/24d8e58dad44059dff2f636fb7a03b/c660486a98da4f929410ec95f9dc89c0_bfecf093d163441a85e412e4a277c27b_1.ts
- demos.transloadit.com/8c/fbfac357904568a2c4365a5d1195f5/c660486a98da4f929410ec95f9dc89c0_bfecf093d163441a85e412e4a277c27b_2.ts
Once all files have been exported, we can ping a URL of your choice with the Assembly status JSON.
6. Generate media playlists
7. Generate media playlists
8. Export files to Amazon S3
- demos.transloadit.com/7b/816c2805f54cc8a6367fc39fb6e744/c660486a98da4f929410ec95f9dc89c0_c239f27793c14255994bc24cbbaa3516_0.ts
- demos.transloadit.com/c8/7ad6ac50c148ada228b8b466c405b0/c660486a98da4f929410ec95f9dc89c0_c239f27793c14255994bc24cbbaa3516_1.ts
- demos.transloadit.com/36/e6cde54850421682d221508d54b78e/c660486a98da4f929410ec95f9dc89c0_c239f27793c14255994bc24cbbaa3516_2.ts
- demos.transloadit.com/e8/7b63bf1428435eb20052eb179b3952/c660486a98da4f929410ec95f9dc89c0_bfecf093d163441a85e412e4a277c27b_0.ts
- demos.transloadit.com/99/24d8e58dad44059dff2f636fb7a03b/c660486a98da4f929410ec95f9dc89c0_bfecf093d163441a85e412e4a277c27b_1.ts
- demos.transloadit.com/8c/fbfac357904568a2c4365a5d1195f5/c660486a98da4f929410ec95f9dc89c0_bfecf093d163441a85e412e4a277c27b_2.ts
Once all files have been exported, we can ping a URL of your choice with the Assembly status JSON.
Live Demo. See for yourself
Build this in your own language
{
"iphone_high_segments": {
"use": ":original",
"robot": "/video/encode",
"preset": "iphone-high",
"segment": true,
"segment_duration": 10,
"ffmpeg_stack": "v4.3.1",
"width": 800,
"height": 600,
"turbo": true
},
"stored_iphone_high_segments": {
"robot": "/s3/store",
"use": "iphone_high_segments",
"credentials": "YOUR_AWS_CREDENTIALS",
"url_prefix": "https://demos.transloadit.com/"
},
"iphone_high_playlist": {
"robot": "/media/playlist",
"use": {
"steps": "stored_iphone_high_segments",
"bundle_steps": true
},
"resolution": "800x600",
"bandwidth": "auto"
},
"iphone_low_segments": {
"use": ":original",
"robot": "/video/encode",
"preset": "iphone-low",
"ffmpeg_stack": "v4.3.1",
"segment": true,
"segment_duration": 10,
"turbo": true
},
"stored_iphone_low_segments": {
"robot": "/s3/store",
"use": "iphone_low_segments",
"credentials": "YOUR_AWS_CREDENTIALS",
"url_prefix": "https://demos.transloadit.com/"
},
"iphone_low_playlist": {
"robot": "/media/playlist",
"use": {
"steps": "stored_iphone_low_segments",
"bundle_steps": true
},
"resolution": "800x600",
"bandwidth": "auto"
},
"master_playlist": {
"robot": "/media/playlist",
"use": {
"steps": [
"iphone_low_playlist",
"iphone_high_playlist"
],
"bundle_steps": true
}
},
"stored_playlist": {
"robot": "/s3/store",
"use": "master_playlist",
"credentials": "YOUR_AWS_CREDENTIALS",
"url_prefix": "https://demos.transloadit.com/"
}
}
# Prerequisites: brew install curl jq || sudo apt install curl jq
# To avoid tampering, use Signature Authentication
echo '{
"auth": {
"key": "YOUR_TRANSLOADIT_KEY"
},
"steps": {
"iphone_high_segments": {
"use": ":original",
"robot": "/video/encode",
"preset": "iphone-high",
"segment": true,
"segment_duration": 10,
"ffmpeg_stack": "v4.3.1",
"width": 800,
"height": 600,
"turbo": true
},
"stored_iphone_high_segments": {
"robot": "/s3/store",
"use": "iphone_high_segments",
"credentials": "YOUR_AWS_CREDENTIALS",
"url_prefix": "https://demos.transloadit.com/"
},
"iphone_high_playlist": {
"robot": "/media/playlist",
"use": {
"steps": "stored_iphone_high_segments",
"bundle_steps": true
},
"resolution": "800x600",
"bandwidth": "auto"
},
"iphone_low_segments": {
"use": ":original",
"robot": "/video/encode",
"preset": "iphone-low",
"ffmpeg_stack": "v4.3.1",
"segment": true,
"segment_duration": 10,
"turbo": true
},
"stored_iphone_low_segments": {
"robot": "/s3/store",
"use": "iphone_low_segments",
"credentials": "YOUR_AWS_CREDENTIALS",
"url_prefix": "https://demos.transloadit.com/"
},
"iphone_low_playlist": {
"robot": "/media/playlist",
"use": {
"steps": "stored_iphone_low_segments",
"bundle_steps": true
},
"resolution": "800x600",
"bandwidth": "auto"
},
"master_playlist": {
"robot": "/media/playlist",
"use": {
"steps": [
"iphone_low_playlist",
"iphone_high_playlist"
],
"bundle_steps": true
}
},
"stored_playlist": {
"robot": "/s3/store",
"use": "master_playlist",
"credentials": "YOUR_AWS_CREDENTIALS",
"url_prefix": "https://demos.transloadit.com/"
}
}
}' |curl \
--request POST \
--form 'params=<-' \
--form my_file1=@./surf.mp4 \
https://api2.transloadit.com/assemblies \
|jq
// Add 'Transloadit' to your Podfile, run 'pod install', add credentials to 'Info.plist'
import Arcane
import TransloaditKit
// Set Encoding Instructions
var AssemblySteps: Array = Array<Step>() // An array to hold the Steps
var Step1 = Step (key: "iphone_high_segments") // Create a Step object
Step1?.setValue(":original", forOption: "use") // Add the details
Step1?.setValue("/video/encode", forOption: "robot") // Add the details
Step1?.setValue("v4.3.1", forOption: "ffmpeg_stack") // Add the details
Step1?.setValue(600, forOption: "height") // Add the details
Step1?.setValue("iphone-high", forOption: "preset") // Add the details
Step1?.setValue(true, forOption: "segment") // Add the details
Step1?.setValue(10, forOption: "segment_duration") // Add the details
Step1?.setValue(true, forOption: "turbo") // Add the details
Step1?.setValue(800, forOption: "width") // Add the details
AssemblySteps.append(Step1) // Add the Step to the array
var Step2 = Step (key: "stored_iphone_high_segments") // Create a Step object
Step2?.setValue("iphone_high_segments", forOption: "use") // Add the details
Step2?.setValue("/s3/store", forOption: "robot") // Add the details
Step2?.setValue("YOUR_AWS_CREDENTIALS", forOption: "credentials") // Add the details
Step2?.setValue("https://demos.transloadit.com/", forOption: "url_prefix") // Add the details
AssemblySteps.append(Step2) // Add the Step to the array
var Step3 = Step (key: "iphone_high_playlist") // Create a Step object
Step3?.setValue({"steps":"stored_iphone_high_segments","bundle_steps":true}, forOption: "use") // Add the details
Step3?.setValue("/media/playlist", forOption: "robot") // Add the details
Step3?.setValue("auto", forOption: "bandwidth") // Add the details
Step3?.setValue("800x600", forOption: "resolution") // Add the details
AssemblySteps.append(Step3) // Add the Step to the array
var Step4 = Step (key: "iphone_low_segments") // Create a Step object
Step4?.setValue(":original", forOption: "use") // Add the details
Step4?.setValue("/video/encode", forOption: "robot") // Add the details
Step4?.setValue("v4.3.1", forOption: "ffmpeg_stack") // Add the details
Step4?.setValue("iphone-low", forOption: "preset") // Add the details
Step4?.setValue(true, forOption: "segment") // Add the details
Step4?.setValue(10, forOption: "segment_duration") // Add the details
Step4?.setValue(true, forOption: "turbo") // Add the details
AssemblySteps.append(Step4) // Add the Step to the array
var Step5 = Step (key: "stored_iphone_low_segments") // Create a Step object
Step5?.setValue("iphone_low_segments", forOption: "use") // Add the details
Step5?.setValue("/s3/store", forOption: "robot") // Add the details
Step5?.setValue("YOUR_AWS_CREDENTIALS", forOption: "credentials") // Add the details
Step5?.setValue("https://demos.transloadit.com/", forOption: "url_prefix") // Add the details
AssemblySteps.append(Step5) // Add the Step to the array
var Step6 = Step (key: "iphone_low_playlist") // Create a Step object
Step6?.setValue({"steps":"stored_iphone_low_segments","bundle_steps":true}, forOption: "use") // Add the details
Step6?.setValue("/media/playlist", forOption: "robot") // Add the details
Step6?.setValue("auto", forOption: "bandwidth") // Add the details
Step6?.setValue("800x600", forOption: "resolution") // Add the details
AssemblySteps.append(Step6) // Add the Step to the array
var Step7 = Step (key: "master_playlist") // Create a Step object
Step7?.setValue({"steps":["iphone_low_playlist","iphone_high_playlist"],"bundle_steps":true}, forOption: "use") // Add the details
Step7?.setValue("/media/playlist", forOption: "robot") // Add the details
AssemblySteps.append(Step7) // Add the Step to the array
var Step8 = Step (key: "stored_playlist") // Create a Step object
Step8?.setValue("master_playlist", forOption: "use") // Add the details
Step8?.setValue("/s3/store", forOption: "robot") // Add the details
Step8?.setValue("YOUR_AWS_CREDENTIALS", forOption: "credentials") // Add the details
Step8?.setValue("https://demos.transloadit.com/", forOption: "url_prefix") // Add the details
AssemblySteps.append(Step8) // Add the Step to the array
// We then create an Assembly Object with the Steps and files
var MyAssembly: Assembly = Assembly(steps: AssemblySteps, andNumberOfFiles: 1)
// Add files to upload
MyAssembly.addFile("./surf.mp4")
// Start the Assembly
Transloadit.createAssembly(MyAssembly)
// Fires after your Assembly has completed
transloadit.assemblyStatusBlock = {(_ completionDictionary: [AnyHashable: Any]) -> Void in
print("\(completionDictionary.description)")
}
<body>
<form action="/uploads" enctype="multipart/form-data" method="POST">
<input type="file" name="my_file" multiple="multiple" />
</form>
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script src="//assets.transloadit.com/js/jquery.transloadit2-v3-latest.js"></script>
<script type="text/javascript">
$(function() {
$('form').transloadit({
wait: true,
triggerUploadOnFileSelection: true,
params: {
auth: {
// To avoid tampering use signatures:
// https://transloadit.com/docs/api/#authentication
key: 'YOUR_TRANSLOADIT_KEY',
},
// It's often better store encoding instructions in your account
// and use a `template_id` instead of adding these steps inline
steps: {
iphone_high_segments: {
use: ':original',
robot: '/video/encode',
ffmpeg_stack: 'v4.3.1',
height: 600,
preset: 'iphone-high',
segment: true,
segment_duration: 10,
turbo: true,
width: 800
},
stored_iphone_high_segments: {
use: 'iphone_high_segments',
robot: '/s3/store',
credentials: 'YOUR_AWS_CREDENTIALS',
url_prefix: 'https://demos.transloadit.com/'
},
iphone_high_playlist: {
use: {'steps':'stored_iphone_high_segments','bundle_steps':true},
robot: '/media/playlist',
bandwidth: 'auto',
resolution: '800x600'
},
iphone_low_segments: {
use: ':original',
robot: '/video/encode',
ffmpeg_stack: 'v4.3.1',
preset: 'iphone-low',
segment: true,
segment_duration: 10,
turbo: true
},
stored_iphone_low_segments: {
use: 'iphone_low_segments',
robot: '/s3/store',
credentials: 'YOUR_AWS_CREDENTIALS',
url_prefix: 'https://demos.transloadit.com/'
},
iphone_low_playlist: {
use: {'steps':'stored_iphone_low_segments','bundle_steps':true},
robot: '/media/playlist',
bandwidth: 'auto',
resolution: '800x600'
},
master_playlist: {
use: {'steps':['iphone_low_playlist','iphone_high_playlist'],'bundle_steps':true},
robot: '/media/playlist'
},
stored_playlist: {
use: 'master_playlist',
robot: '/s3/store',
credentials: 'YOUR_AWS_CREDENTIALS',
url_prefix: 'https://demos.transloadit.com/'
}
}
}
});
});
</script>
</body>
<!-- This pulls Uppy from our CDN. Alternatively use `npm i @uppy/robodog --save` -->
<!-- if you want smaller self-hosted bundles and/or to use modern JavaScript -->
<link href="//releases.transloadit.com/uppy/robodog/v2.5.1/robodog.min.css" rel="stylesheet">
<script src="//releases.transloadit.com/uppy/robodog/v2.5.1/robodog.min.js"></script>
<button id="browse">Select Files</button>
<script>
document.getElementById('browse').addEventListener('click', function () {
var uppy = window.Robodog.pick({
providers: [ 'instagram', 'url', 'webcam', 'dropbox', 'google-drive', 'facebook', 'onedrive' ],
waitForEncoding: true,
params: {
// To avoid tampering, use Signature Authentication
auth: { key: 'YOUR_TRANSLOADIT_KEY' },
// To hide your `steps`, use a `template_id` instead
steps: {
iphone_high_segments: {
use: ':original',
robot: '/video/encode',
ffmpeg_stack: 'v4.3.1',
height: 600,
preset: 'iphone-high',
segment: true,
segment_duration: 10,
turbo: true,
width: 800
},
stored_iphone_high_segments: {
use: 'iphone_high_segments',
robot: '/s3/store',
credentials: 'YOUR_AWS_CREDENTIALS',
url_prefix: 'https://demos.transloadit.com/'
},
iphone_high_playlist: {
use: {'steps':'stored_iphone_high_segments', 'bundle_steps':true},
robot: '/media/playlist',
bandwidth: 'auto',
resolution: '800x600'
},
iphone_low_segments: {
use: ':original',
robot: '/video/encode',
ffmpeg_stack: 'v4.3.1',
preset: 'iphone-low',
segment: true,
segment_duration: 10,
turbo: true
},
stored_iphone_low_segments: {
use: 'iphone_low_segments',
robot: '/s3/store',
credentials: 'YOUR_AWS_CREDENTIALS',
url_prefix: 'https://demos.transloadit.com/'
},
iphone_low_playlist: {
use: {'steps':'stored_iphone_low_segments', 'bundle_steps':true},
robot: '/media/playlist',
bandwidth: 'auto',
resolution: '800x600'
},
master_playlist: {
use: {'steps':['iphone_low_playlist', 'iphone_high_playlist'],'bundle_steps':true},
robot: '/media/playlist'
},
stored_playlist: {
use: 'master_playlist',
robot: '/s3/store',
credentials: 'YOUR_AWS_CREDENTIALS',
url_prefix: 'https://demos.transloadit.com/'
}
}
}
}).then(function (bundle) {
// Due to `waitForEncoding: true` this is fired after encoding is done.
// Alternatively, set `waitForEncoding` to `false` and provide a `notify_url`
// for Async Mode where your back-end receives the encoding results
// so that your user can be on their way as soon as the upload completes.
console.log(bundle.transloadit) // Array of Assembly Statuses
console.log(bundle.results) // Array of all encoding results
}).catch(console.error)
})
</script>
// yarn add transloadit || npm i transloadit --save-exact
const Transloadit = require('transloadit')
const transloadit = new Transloadit({
authKey: 'YOUR_TRANSLOADIT_KEY',
authSecret: 'YOUR_TRANSLOADIT_SECRET'
})
// Set Encoding Instructions
const options = {
files: {
// Add files to upload
'myfile_1': './surf.mp4',
},
params: {
steps: {
iphone_high_segments: {
use: ':original',
robot: '/video/encode',
ffmpeg_stack: 'v4.3.1',
height: 600,
preset: 'iphone-high',
segment: true,
segment_duration: 10,
turbo: true,
width: 800,
},
stored_iphone_high_segments: {
use: 'iphone_high_segments',
robot: '/s3/store',
credentials: 'YOUR_AWS_CREDENTIALS',
url_prefix: 'https://demos.transloadit.com/',
},
iphone_high_playlist: {
use: {'steps':'stored_iphone_high_segments','bundle_steps':true},
robot: '/media/playlist',
bandwidth: 'auto',
resolution: '800x600',
},
iphone_low_segments: {
use: ':original',
robot: '/video/encode',
ffmpeg_stack: 'v4.3.1',
preset: 'iphone-low',
segment: true,
segment_duration: 10,
turbo: true,
},
stored_iphone_low_segments: {
use: 'iphone_low_segments',
robot: '/s3/store',
credentials: 'YOUR_AWS_CREDENTIALS',
url_prefix: 'https://demos.transloadit.com/',
},
iphone_low_playlist: {
use: {'steps':'stored_iphone_low_segments','bundle_steps':true},
robot: '/media/playlist',
bandwidth: 'auto',
resolution: '800x600',
},
master_playlist: {
use: {'steps':['iphone_low_playlist','iphone_high_playlist'],'bundle_steps':true},
robot: '/media/playlist',
},
stored_playlist: {
use: 'master_playlist',
robot: '/s3/store',
credentials: 'YOUR_AWS_CREDENTIALS',
url_prefix: 'https://demos.transloadit.com/',
},
}
}
}
// Start the Assembly
const result = await transloadit.createAssembly(options)
console.log({ result })
[sudo] npm install transloadify -g
export TRANSLOADIT_KEY="YOUR_TRANSLOADIT_KEY"
export TRANSLOADIT_SECRET="YOUR_TRANSLOADIT_SECRET"
# Save Encoding Instructions
echo '{
"iphone_high_segments": {
"use": ":original",
"robot": "/video/encode",
"preset": "iphone-high",
"segment": true,
"segment_duration": 10,
"ffmpeg_stack": "v4.3.1",
"width": 800,
"height": 600,
"turbo": true
},
"stored_iphone_high_segments": {
"robot": "/s3/store",
"use": "iphone_high_segments",
"credentials": "YOUR_AWS_CREDENTIALS",
"url_prefix": "https://demos.transloadit.com/"
},
"iphone_high_playlist": {
"robot": "/media/playlist",
"use": {
"steps": "stored_iphone_high_segments",
"bundle_steps": true
},
"resolution": "800x600",
"bandwidth": "auto"
},
"iphone_low_segments": {
"use": ":original",
"robot": "/video/encode",
"preset": "iphone-low",
"ffmpeg_stack": "v4.3.1",
"segment": true,
"segment_duration": 10,
"turbo": true
},
"stored_iphone_low_segments": {
"robot": "/s3/store",
"use": "iphone_low_segments",
"credentials": "YOUR_AWS_CREDENTIALS",
"url_prefix": "https://demos.transloadit.com/"
},
"iphone_low_playlist": {
"robot": "/media/playlist",
"use": {
"steps": "stored_iphone_low_segments",
"bundle_steps": true
},
"resolution": "800x600",
"bandwidth": "auto"
},
"master_playlist": {
"robot": "/media/playlist",
"use": {
"steps": [
"iphone_low_playlist",
"iphone_high_playlist"
],
"bundle_steps": true
}
},
"stored_playlist": {
"robot": "/s3/store",
"use": "master_playlist",
"credentials": "YOUR_AWS_CREDENTIALS",
"url_prefix": "https://demos.transloadit.com/"
}
}' > ./steps.json
transloadify \
--input "./surf.mp4" \
--output "./output.example" \
--steps "./steps.json"
// composer require transloadit/php-sdk
use transloadit\Transloadit;
$transloadit = new Transloadit([
"key" => "YOUR_TRANSLOADIT_KEY",
"secret" => "YOUR_TRANSLOADIT_SECRET",
]);
// Add files to upload
$files = [];
array_push($files, "./surf.mp4")
// Start the Assembly
$response = $transloadit->createAssembly([
"files" => $files,
"params" => [
"steps" => [
"iphone_high_segments" => [
"use" => ":original",
"robot" => "/video/encode",
"ffmpeg_stack" => "v4.3.1",
"height" => 600,
"preset" => "iphone-high",
"segment" => true,
"segment_duration" => 10,
"turbo" => true,
"width" => 800,
],
"stored_iphone_high_segments" => [
"use" => "iphone_high_segments",
"robot" => "/s3/store",
"credentials" => "YOUR_AWS_CREDENTIALS",
"url_prefix" => "https://demos.transloadit.com/",
],
"iphone_high_playlist" => [
"use" => [
"steps" => "stored_iphone_high_segments",
"bundle_steps" => true,
],
"robot" => "/media/playlist",
"bandwidth" => "auto",
"resolution" => "800x600",
],
"iphone_low_segments" => [
"use" => ":original",
"robot" => "/video/encode",
"ffmpeg_stack" => "v4.3.1",
"preset" => "iphone-low",
"segment" => true,
"segment_duration" => 10,
"turbo" => true,
],
"stored_iphone_low_segments" => [
"use" => "iphone_low_segments",
"robot" => "/s3/store",
"credentials" => "YOUR_AWS_CREDENTIALS",
"url_prefix" => "https://demos.transloadit.com/",
],
"iphone_low_playlist" => [
"use" => [
"steps" => "stored_iphone_low_segments",
"bundle_steps" => true,
],
"robot" => "/media/playlist",
"bandwidth" => "auto",
"resolution" => "800x600",
],
"master_playlist" => [
"use" => [
"steps" => ["iphone_low_playlist", "iphone_high_playlist"],
"bundle_steps" => true,
],
"robot" => "/media/playlist",
],
"stored_playlist" => [
"use" => "master_playlist",
"robot" => "/s3/store",
"credentials" => "YOUR_AWS_CREDENTIALS",
"url_prefix" => "https://demos.transloadit.com/",
],
],
],
]);
# gem install transloadit
transloadit = Transloadit.new(
:key => "YOUR_TRANSLOADIT_KEY",
:secret => "YOUR_TRANSLOADIT_SECRET"
)
# Set Encoding Instructions
iphone_high_segments = transloadit.step "iphone_high_segments", "/video/encode",
:use => ":original",
:ffmpeg_stack => "v4.3.1",
:height => 600,
:preset => "iphone-high",
:segment => true,
:segment_duration => 10,
:turbo => true,
:width => 800
)
stored_iphone_high_segments = transloadit.step "stored_iphone_high_segments", "/s3/store",
:use => "iphone_high_segments",
:credentials => "YOUR_AWS_CREDENTIALS",
:url_prefix => "https://demos.transloadit.com/"
)
iphone_high_playlist = transloadit.step "iphone_high_playlist", "/media/playlist",
:use => {"steps":"stored_iphone_high_segments","bundle_steps":true},
:bandwidth => "auto",
:resolution => "800x600"
)
iphone_low_segments = transloadit.step "iphone_low_segments", "/video/encode",
:use => ":original",
:ffmpeg_stack => "v4.3.1",
:preset => "iphone-low",
:segment => true,
:segment_duration => 10,
:turbo => true
)
stored_iphone_low_segments = transloadit.step "stored_iphone_low_segments", "/s3/store",
:use => "iphone_low_segments",
:credentials => "YOUR_AWS_CREDENTIALS",
:url_prefix => "https://demos.transloadit.com/"
)
iphone_low_playlist = transloadit.step "iphone_low_playlist", "/media/playlist",
:use => {"steps":"stored_iphone_low_segments","bundle_steps":true},
:bandwidth => "auto",
:resolution => "800x600"
)
master_playlist = transloadit.step "master_playlist", "/media/playlist",
:use => {"steps":["iphone_low_playlist","iphone_high_playlist"],"bundle_steps":true},
)
stored_playlist = transloadit.step "stored_playlist", "/s3/store",
:use => "master_playlist",
:credentials => "YOUR_AWS_CREDENTIALS",
:url_prefix => "https://demos.transloadit.com/"
)
assembly = transloadit.assembly(
:steps => [ iphone_high_segments, stored_iphone_high_segments, iphone_high_playlist, iphone_low_segments, stored_iphone_low_segments, iphone_low_playlist, master_playlist, stored_playlist ]
)
# Add files to upload
files = []
files.push("./surf.mp4")
# Start the Assembly
response = assembly.create! *files
until response.finished?
sleep 1; response.reload!
end
if !response.error?
# handle success
end
# pip install pytransloadit
from transloadit import client
tl = client.Transloadit('YOUR_TRANSLOADIT_KEY', 'YOUR_TRANSLOADIT_SECRET')
assembly = tl.new_assembly()
# Set Encoding Instructions
assembly.add_step('iphone_high_segments', '/video/encode', {
'use': ':original',
'ffmpeg_stack': 'v4.3.1',
'height': 600,
'preset': 'iphone-high',
'segment': True,
'segment_duration': 10,
'turbo': True,
'width': 800
})
assembly.add_step('stored_iphone_high_segments', '/s3/store', {
'use': 'iphone_high_segments',
'credentials': 'YOUR_AWS_CREDENTIALS',
'url_prefix': 'https://demos.transloadit.com/'
})
assembly.add_step('iphone_high_playlist', '/media/playlist', {
'use': {'steps':'stored_iphone_high_segments','bundle_steps':True},
'bandwidth': 'auto',
'resolution': '800x600'
})
assembly.add_step('iphone_low_segments', '/video/encode', {
'use': ':original',
'ffmpeg_stack': 'v4.3.1',
'preset': 'iphone-low',
'segment': True,
'segment_duration': 10,
'turbo': True
})
assembly.add_step('stored_iphone_low_segments', '/s3/store', {
'use': 'iphone_low_segments',
'credentials': 'YOUR_AWS_CREDENTIALS',
'url_prefix': 'https://demos.transloadit.com/'
})
assembly.add_step('iphone_low_playlist', '/media/playlist', {
'use': {'steps':'stored_iphone_low_segments','bundle_steps':True},
'bandwidth': 'auto',
'resolution': '800x600'
})
assembly.add_step('master_playlist', '/media/playlist', {
'use': {'steps':['iphone_low_playlist','iphone_high_playlist'],'bundle_steps':True},
})
assembly.add_step('stored_playlist', '/s3/store', {
'use': 'master_playlist',
'credentials': 'YOUR_AWS_CREDENTIALS',
'url_prefix': 'https://demos.transloadit.com/'
})
# Add files to upload
assembly.add_file(open('./surf.mp4', 'rb'))
# Start the Assembly
assembly_response = assembly.create(retries=5, wait=True)
print(assembly_response.data.get('assembly_ssl_url'))
# or:
print(assembly_response.data['assembly_ssl_url'])
// go get gopkg.in/transloadit/go-sdk.v1
package main
import (
"fmt"
"gopkg.in/transloadit/go-sdk.v1"
)
options := transloadit.DefaultConfig
options.AuthKey = "YOUR_TRANSLOADIT_KEY"
options.AuthSecret = "YOUR_TRANSLOADIT_SECRET"
client := transloadit.NewClient(options)
// Initialize new Assembly
assembly := transloadit.NewAssembly()
// Set Encoding Instructions
assembly.AddStep("iphone_high_segments", map[string]interface{}{
"use": ":original",
"robot": "/video/encode",
"ffmpeg_stack": "v4.3.1",
"height": 600,
"preset": "iphone-high",
"segment": true,
"segment_duration": 10,
"turbo": true,
"width": 800
})
assembly.AddStep("stored_iphone_high_segments", map[string]interface{}{
"use": "iphone_high_segments",
"robot": "/s3/store",
"credentials": "YOUR_AWS_CREDENTIALS",
"url_prefix": "https://demos.transloadit.com/"
})
assembly.AddStep("iphone_high_playlist", map[string]interface{}{
"use": {"steps":"stored_iphone_high_segments", "bundle_steps":true},
"robot": "/media/playlist",
"bandwidth": "auto",
"resolution": "800x600"
})
assembly.AddStep("iphone_low_segments", map[string]interface{}{
"use": ":original",
"robot": "/video/encode",
"ffmpeg_stack": "v4.3.1",
"preset": "iphone-low",
"segment": true,
"segment_duration": 10,
"turbo": true
})
assembly.AddStep("stored_iphone_low_segments", map[string]interface{}{
"use": "iphone_low_segments",
"robot": "/s3/store",
"credentials": "YOUR_AWS_CREDENTIALS",
"url_prefix": "https://demos.transloadit.com/"
})
assembly.AddStep("iphone_low_playlist", map[string]interface{}{
"use": {"steps":"stored_iphone_low_segments", "bundle_steps":true},
"robot": "/media/playlist",
"bandwidth": "auto",
"resolution": "800x600"
})
assembly.AddStep("master_playlist", map[string]interface{}{
"use": {"steps":["iphone_low_playlist", "iphone_high_playlist"],"bundle_steps":true},
"robot": "/media/playlist"
})
assembly.AddStep("stored_playlist", map[string]interface{}{
"use": "master_playlist",
"robot": "/s3/store",
"credentials": "YOUR_AWS_CREDENTIALS",
"url_prefix": "https://demos.transloadit.com/"
})
// Add files to upload
assembly.AddFile("myfile_1", "./surf.mp4")
// Start the Assembly
info, err := client.StartAssembly(context.Background(), assembly)
if err != nil {
panic(err)
}
// All files have now been uploaded and the Assembly has started but no
// results are available yet since the conversion has not finished.
// WaitForAssembly provides functionality for polling until the Assembly
// has ended.
info, err = client.WaitForAssembly(context.Background(), info)
if err != nil {
panic(err)
}
fmt.Printf("You can check some results at: \n")
fmt.Printf(" - %s\n", info.Results["iphone_high_segments"][0].SSLURL)
fmt.Printf(" - %s\n", info.Results["stored_iphone_high_segments"][0].SSLURL)
fmt.Printf(" - %s\n", info.Results["iphone_high_playlist"][0].SSLURL)
fmt.Printf(" - %s\n", info.Results["iphone_low_segments"][0].SSLURL)
fmt.Printf(" - %s\n", info.Results["stored_iphone_low_segments"][0].SSLURL)
fmt.Printf(" - %s\n", info.Results["iphone_low_playlist"][0].SSLURL)
fmt.Printf(" - %s\n", info.Results["master_playlist"][0].SSLURL)
fmt.Printf(" - %s\n", info.Results["stored_playlist"][0].SSLURL)
// compile 'com.transloadit.sdk:transloadit:0.1.5'
import com.transloadit.sdk.Assembly;
import com.transloadit.sdk.Transloadit;
import com.transloadit.sdk.exceptions.LocalOperationException;
import com.transloadit.sdk.exceptions.RequestException;
import com.transloadit.sdk.response.AssemblyResponse;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
public class Main {
public static void main(String[] args) {
Transloadit transloadit = new Transloadit("YOUR_TRANSLOADIT_KEY", "YOUR_TRANSLOADIT_SECRET");
Assembly assembly = transloadit.newAssembly();
// Set Encoding Instructions
Map<String Object> iphoneHighSegmentsStepOptions = new HashMap();
iphoneHighSegmentsStepOptions.put("use", ":original");
iphoneHighSegmentsStepOptions.put("ffmpeg_stack", "v4.3.1");
iphoneHighSegmentsStepOptions.put("height", 600);
iphoneHighSegmentsStepOptions.put("preset", "iphone-high");
iphoneHighSegmentsStepOptions.put("segment", true);
iphoneHighSegmentsStepOptions.put("segment_duration", 10);
iphoneHighSegmentsStepOptions.put("turbo", true);
iphoneHighSegmentsStepOptions.put("width", 800);
assembly.addStep("iphone_high_segments", "/video/encode", iphoneHighSegmentsStepOptions);
Map<String Object> storedIphoneHighSegmentsStepOptions = new HashMap();
storedIphoneHighSegmentsStepOptions.put("use", "iphone_high_segments");
storedIphoneHighSegmentsStepOptions.put("credentials", "YOUR_AWS_CREDENTIALS");
storedIphoneHighSegmentsStepOptions.put("url_prefix", "https://demos.transloadit.com/");
assembly.addStep("stored_iphone_high_segments", "/s3/store", storedIphoneHighSegmentsStepOptions);
Map<String Object> iphoneHighPlaylistStepOptions = new HashMap();
iphoneHighPlaylistStepOptions.put("use", new HashMap(){{
put("steps", "stored_iphone_high_segments");
put("bundle_steps", true);
}});
iphoneHighPlaylistStepOptions.put("bandwidth", "auto");
iphoneHighPlaylistStepOptions.put("resolution", "800x600");
assembly.addStep("iphone_high_playlist", "/media/playlist", iphoneHighPlaylistStepOptions);
Map<String Object> iphoneLowSegmentsStepOptions = new HashMap();
iphoneLowSegmentsStepOptions.put("use", ":original");
iphoneLowSegmentsStepOptions.put("ffmpeg_stack", "v4.3.1");
iphoneLowSegmentsStepOptions.put("preset", "iphone-low");
iphoneLowSegmentsStepOptions.put("segment", true);
iphoneLowSegmentsStepOptions.put("segment_duration", 10);
iphoneLowSegmentsStepOptions.put("turbo", true);
assembly.addStep("iphone_low_segments", "/video/encode", iphoneLowSegmentsStepOptions);
Map<String Object> storedIphoneLowSegmentsStepOptions = new HashMap();
storedIphoneLowSegmentsStepOptions.put("use", "iphone_low_segments");
storedIphoneLowSegmentsStepOptions.put("credentials", "YOUR_AWS_CREDENTIALS");
storedIphoneLowSegmentsStepOptions.put("url_prefix", "https://demos.transloadit.com/");
assembly.addStep("stored_iphone_low_segments", "/s3/store", storedIphoneLowSegmentsStepOptions);
Map<String Object> iphoneLowPlaylistStepOptions = new HashMap();
iphoneLowPlaylistStepOptions.put("use", new HashMap(){{
put("steps", "stored_iphone_low_segments");
put("bundle_steps", true);
}});
iphoneLowPlaylistStepOptions.put("bandwidth", "auto");
iphoneLowPlaylistStepOptions.put("resolution", "800x600");
assembly.addStep("iphone_low_playlist", "/media/playlist", iphoneLowPlaylistStepOptions);
Map<String Object> masterPlaylistStepOptions = new HashMap();
masterPlaylistStepOptions.put("use", new HashMap(){{
put("steps", new String[]{"iphone_low_playlist", "iphone_high_playlist"});
put("bundle_steps", true);
}});
assembly.addStep("master_playlist", "/media/playlist", masterPlaylistStepOptions);
Map<String Object> storedPlaylistStepOptions = new HashMap();
storedPlaylistStepOptions.put("use", "master_playlist");
storedPlaylistStepOptions.put("credentials", "YOUR_AWS_CREDENTIALS");
storedPlaylistStepOptions.put("url_prefix", "https://demos.transloadit.com/");
assembly.addStep("stored_playlist", "/s3/store", storedPlaylistStepOptions);
// Add files to upload
assembly.addFile(new File("./surf.mp4"));
// Start the Assembly
try {
AssemblyResponse response = assembly.save();
// Wait for Assembly to finish executing
while (!response.isFinished()) {
response = transloadit.getAssemblyByUrl(response.getSslUrl());
}
System.out.println(response.getId());
System.out.println(response.getUrl());
System.out.println(response.json());
} catch (RequestException | LocalOperationException e) {
// Handle exception here
}
}
}
So many ways to integrate
-
Bulk imports
Add one of our import Robots to acquire and transcode massive media libraries. -
Handling uploads
We are the experts at reliably handling uploads. We wrote the protocol for it. -
Front-end integration
We integrate with web browsers via our next-gen file uploader Uppy and SDKs for Android and iOS. -
Back-end integration
-
Pingbacks
Configure anotify_url
to let your server receive transcoding results JSON in thetransloadit
POST field.
Need help? Talk to a human