using CloudinaryDotNet.Actions;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
namespace CloudinaryUpload
public static void Main()
string cloud_name = "XXXX";
string ApiSecret = "XXXX";
Account account = new Account(cloud_name,ApiKey,ApiSecret);
Cloudinary cloudinary = new Cloudinary(account);
cloudinary.Api.Timeout = int.MaxValue;
var publicId = "test-mp4-transform";
var videouploadParams = new VideoUploadParams()
File = new FileDescription(@"https://res.cloudinary.com/demo/video/upload/dog.mp4"),
EagerTransforms = new List<Transformation>(){
new Transformation().FetchFormat("mp4")},
EagerNotificationUrl = "https://mysite.example.com/notify_endpoint"
var VideouploadResult = cloudinary.Upload(videouploadParams);
dynamic data = VideouploadResult.JsonObj;
Console.WriteLine(data.eager[0]["secure_url"]);
string url = cloudinary.Api.UrlVideoUp.Transform(
new Transformation().FetchFormat("mp4")).PrivateCdn(true).Secure().BuildUrl(publicId);
Console.WriteLine(url + ".mp4");