How to set background color when using the /video/encode robot and resize_strategy pad?

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

Hello

I see that the resize strategies talks about background color and /image/resize have a background parameter. How can I do the same with the /video/encode robot?

Hey Christian,

unfortunately we do not support this yet, but we’d like to. We’ll see how much effort it would be to implement this and then get back to you.

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

I was afraid of that. Could I get an estimate on when you will come back to me with more info?

Any updates?

Hey Christian,

sorry for the long delay. I have implemented this today. There is a new parameter called “background” in the /video/encode robot (and /video/merge robot) that allows you to specify the background color that is used when you use the “pad” resize strategy.

You can specify the colors in two formats: simple strings like “black”, “red”, “white” and “yellow”. And Hexformat is also allowed (also strings): 0xrrggbbaa, so for example “0xFFaa00AA”.

Please let me know what you think.

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Great :slight_smile:

This seems to work nice. I’m sending a few hundred assemblies in your way right now.

Thanks,
Christian

Okay cool, closing this ticket then.

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Hey Christian,

Just to add, please mind the rate limit of 250 assemblies per minute though!

Best,
Kevin

Kevin: Looks like it did not give me any problems :slight_smile:

Yep, all good. :slight_smile:

Closing again.