Decrease saturation with /video/encode ?

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

I can’t seem to find the answer anywhere, does anyone know how to decrease the saturation of a video to say, 50%? I tried a few ffmpeg options but none of them seemed to work, or they threw errors. Any help would be greatly appreciated!

Hey Heath,

which ffmpeg options did you try?

I tried using:

mp=hue=100:-10 (from the docs)

The syntax i used was basically

'ffmpeg' = { 'mp' : 'hue=100:-10' }

I guess I’m not totally sure how I should format this particular option. Should it be a nested array?

Hm no, it looks okay.

Can you point me to an assembly id please where you tried this?

Here’s one:

https://transloadit.com/assemblies/view/REDACTED

It looks like Transloadit isn’t recognizing the mplayer filter…is that not supported? I need to have some way to decrease saturation and increase contrast. Is there no way to do this in Transloadit?

I would very much appreciate a speedy response to this…I have a client delivery EOW and I need to know if this is possible by tomorrow or I will have to use a different transcoding system for this project. Thanks!

I have also tried this format, which doesn’t throw errors but doesn’t seem to be doing anything to the video:

"ffmpeg": {
    "vf" : "mp=hue=100:-10"
}

This seems to be a step in the right direction, but I can’t figure why the filter doesn’t seem to be doing anything…

Another assembly to reference for the above: REDACTED (https://transloadit.com/assemblies/view/REDACTED)

Can I please get some help here? I cannot figure out why this video filter isn’t working especially when the syntax seems to be correct…

Hi Heath,

vf would be the correct parameter for applying filters against our build of ffmpeg. Unfortunately at this moment our api reserves vf for itself because we set complex filters in there to do padding, resizing and watermarking. We could probably allow customer action in there but that would require an api change that I’d have to discuss with our api developers.

So I can’t promise you yet this will work overnight, sorry about that.
We’ll follow up as soon after we had a talk with the team.

Hey Heath,

we have talked this over. I will implement a fix for you tomorrow and then ping you here.

Sorry for the delay.

Kind regards,
Tim

Thanks guys! Just let me know!

Hey Heath,

I just deployed. Please let me know if it’s working now.

Kind regards,
Tim

Thanks! Getting a different error message now, here’s the assembly: REDACTED (https://transloadit.com/assemblies/view/REDACTED)

Error message:
No such filter: ‘mp’
Error opening filters!

Any luck? I think all you guys need to do is make sure the mp (mplayer) filter is active. Thanks again, I really appreciate this

Hm we checked this and it seems that our current custom built ffmpeg version does not support this however. : /

What is your exact use case? Maybe we can find a different solution here …

Hi Tim,

So what I need to do is encode a video, and do the following:

• Decrease the saturation to around 60%
• Increase the contrast by about 30%

Is this possible? Thanks!

Hm it seems to be not possible without upgrading our custom ffmpeg version. : /

Sorry for that. Maybe watermarking the video with a semi-transparent image would also work .. it might look weird though, but it’s worth a try I guess?

Sorry for the inconvenience. :confused:

Closing this. Please feel free to reply/reopen the ticket again if there is a need.