Kit_Sunde
(Kit Sunde)
February 8, 2012, 9:54am
1
Archived from the Transloadit support forum. Originally posted on February 8, 2012; details may be outdated, see our docs for current behavior. Original thread
My assembly: https://transloadit.com/templates/view/REDACTED
Looks like this:
{ “steps”: {
"webm_encoding": {
"use": ":original",
"robot": "/video/encode",
"preset": "webm"
},
"mp4_encoding": {
"use": ":original",
"robot": "/video/encode",
"preset": "ipad-high"
},
"small":{
"robot": "/video/thumbs",
"count": 1,
"width": 246,
"height": 143
},
"preview":{
"robot": "/video/thumbs",
"count": 1,
"width": 500,
"height": 280
},
"export": {
"use": [
"webm_encoding",
"mp4_encoding",
"small",
"preview"],
"robot": "/s3/store",
"key": "REDACTED",
"secret": "REDACTED",
"bucket": "mp-video"
}
} }
For some reason when I test it out, it doesn’t do the ‘preview’ robot. Any suggestions as to why? Is it that I can only have 1 image robot?
tim-kos
(Tim Koschützki)
February 8, 2012, 10:37am
2
Hey Kit,
no. By default a step takes the output of its previous step as the input.
The video/thumbs robot expects a video. Since you pass “small” (which is an image) into “preview”, the “preview” step does not do anything.
You need to add
“use”: “mp4_encoding” to your “preview” step and everything will work fine.
You can of course have as many robots of all kinds as you want.
Kind regards
Tim
Kit_Sunde
(Kit Sunde)
February 8, 2012, 10:39am
3
OHH! The ‘use’ parameter makes a lot more sense to me now. Thanks for clarifying!
tim-kos
(Tim Koschützki)
February 8, 2012, 10:40am
4
Np. Were the docs not helpful in this regard? Is there anything in the docs that needs changing for you to have understood this better?
Kit_Sunde
(Kit Sunde)
February 8, 2012, 10:45am
5
I’ve been over the docs a few times, it makes perfect sense for me now though. I think I just had trouble internalizing it. Maybe a visual queue under an example showing the flow of the robots, something like:
:original -> /video/encode
-> /video/encode -> /video/thumbs/
-> /video/encode -> /s3/store
would’ve helped.
tim-kos
(Tim Koschützki)
February 8, 2012, 10:46am
6
Alright, thanks for the feedback. I think we’ll introduce something like that.
Closing this ticket for now.