Can not eagerly transform video with overlay and format
Hi all,
I'm facing the following situation:
Using this code, I get the correct transformation URL I'm looking for:
cloudinary.url().transformation(new EagerTransformation()
.height(720).videoCodec("h264:main").width(1280).crop("fill").chain()
.overlay("my-overlay")).signed(true).resourceType("video").generate("video/2130.mp4");
But, what I want is an eagerly transformation, so I tried to use "explicit". Since I can't specify the extension/format on explicit, I added this to the EagerTransformation object:
cloudinary.uploader().explicit("video/2130", ObjectUtils.asMap(
"type", "upload",
"resource_type", "video",
"eager", Collections.singletonList(new EagerTransformation()
.format("mp4").height(720).videoCodec("h264:main").width(1280)
.crop("fill").chain().overlay("my-overlay"))
));
But then, this results in the following exception:
java.lang.RuntimeException: Invalid transformation component - mp4
How can I solve this? Thanks you in advance!
-
Hi Eduardo,
Copying the reply from the ticket for future readers.
Please use fetchFormat instead of format and that will generate the correct URL.
With format, it is generating the wrong URL and we are aware of this issue.We already have a fix for the issue with requesting eager transformations with the Java SDK has been deployed to the master branch of the SDK - if you want to start testing it now you can download the SDK from GitHub directly - the fix was applied in cloudinary-core: https://github.com/cloudinary/cloudinary_java
If you’re using a package manager to include the SDK, you’ll see the fix in the next packaged release of the SDK.
Thanks,
Aditi1
Post is closed for comments.
Comments
1 comment