Thumb Extraction

Archived from the Transloadit support forum. Originally posted on October 31, 2011; details may be outdated, see our docs for current behavior. Original thread

Hi Guys,

Could you let me know what I am doing wrong with this template.

I have just tried to add thumbnail extraction.

It is saying “One of the internal parameters is causing an error.”

I want the process to
1. Upload Video.
2. Extract Thumbs.
3. Store thumbs in same location

Any Guidance appreciated.

Stuart

`{“steps”: { “store”: {

"robot": "/s3/store",
"key": "xx",
"secret": "xxx",
"path":"${file.url_name}",
"bucket": "xxx"

},

"extracted_thumbs": {
"use": ":original",
"robot": "/video/thumbs",
"count": 30,
"format": "jpeg",
"width": 623,
"height": 350,
"resize_strategy": "fit"

}

} }`

Hey Stuart,

please list the thumbnail extraction step before the export step, otherwise the export step is not receiving any input.

Kind regards,
Tim

Hi Tim,

I have switched the template around, but when testing using the test feature am getting,

: One of our commands reported an error. FfmpegCommand failed with exit code: 1

Any feedback apreciated. The file I am using to test is a small MOV

{"steps": { "extracted_thumbs": { "use": ":original", "robot":
"/video/thumbs", "count": 2, "format": "jpeg", "width": 623,
"height": 350, "resize_strategy": "fit" }, "store": {
    "robot": "/s3/store",
    "key": "xxx",
    "secret": "xxx",
    "path":"${file.url_name}",
    "bucket": "xxx"
} }

}

Hi Stuart,

please double check your uploaded video file. It’s only 109 bytes and contains alias streams with relative paths. Maybe something went wrong with the encoding?

Kind regards,
Karl Skomski

Hi Karl,

Yes you were correct. The file I was testing with seemed to be corrupt.

Ive been able to test and extract some thumbnails be not quite get the result I want.

I edited the template to as below, but this setupis only extracting …or storing a singly thumb instead of the specified 8.

Any guidance appreciated.

Stuart

{"steps": { "thumbs": { "use": ":original", "robot":
"/video/thumbs", "format": "jpeg", "width": 623, "height": 350,
"resize_strategy": "crop", "count": 8 }, "export": {
    "use": [":original", "thumbs"],
    "robot": "/s3/store",
    "key": "xxx",
    "secret": "xxx",
    "path":"${file.url_name}",
    "bucket": "xxx"
} }

}

Hi Stuart,

you need to add the path variable ${file.meta.thumb_index}.

Fixed path:

"path":"${file.url_name}${file.meta.thumb_index}"

Kind regards,
Karl Skomski

Closing this for now.