Not able to download transform video and not able to upload transform video into cloudinary
Basically, I am trying to blur portrait video from in node.js v17 but am not able to do it
cloudinary.config({
cloud_name:"Name already Written",
api_key:"Already Written",
api_secret:"Already Written",
});
let data = cloudinary.video("test.mp4", {
background:"blurred:400:15",
height:320,
width:480,
crop:"pad",
});
// let data = cloudinary.video("test");
let express = require("express");
let app = express();
app.get("/", (req, res) => {
res.send(`${data}`);
console.log("Data send");
});
app.listen(3000, () => {
console.log("http://localhost:3000");
});
console.log(data);
is their any solution regarding this?
0
-
Hi Roman,
When applying transformations and delivering the assets, they have to be uploaded first to your Media Library account (see Programmable Media). For example:
cloudinary.v2.uploader.upload("/home/samplevideo.mp4",
function(error, result) {console.log(result, error); });And to generate the transformation URL using the Node SDK, you can use cloudinary.video() method. For example, using the following code:
cloudinary.video("dog", {transformation: [ {height: 300, width: 250, crop: "fill"}, {effect: "blur:300"} ]})
The code above will generate the following delivery URL that you can reference on your webpage (see https://cloudinary.com/documentation/image_upload_api_reference#upload):
https://res.cloudinary.com/demo/video/upload/c_fill,h_300,w_250/e_blur:300/dog.mp4
Hope this helps.
0
Post is closed for comments.
Comments
1 comment