Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This Gist contains code snippets related to Aspose.Video Cloud API

This Gist contains code snippets related to Aspose.Video Cloud API. The code snippets are related to WMV to MP4 conversion using C# REST API. Further details regarding the code snippet can be found over following blog post

This Gist contains code snippets related to Aspose.Video Cloud API. The code snippets are related to MOV to MP4 conversion using C# REST API.
// Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration required).
// for complete examples, please visit https://github.com/aspose-video-cloud/aspose-video-cloud-dotnet
try
{
String ClientSecret = "c1d7a7ca7740c397bc546635b7799365";
String ClientID = "E31DF297-9655-4F61-B1C8-EC52E10B1888";
// create an instance of VideoApi by passing ClientSecret and clientID as arguments
var videoApi = new Aspose.Video.Cloud.Sdk.Api.VideoApi(ClientSecret, ClientID, "https://api.aspose.cloud/v1.1");
// create an instance of ConvertOptions
Aspose.Video.Cloud.Sdk.Model.ConvertOptions options = new Aspose.Video.Cloud.Sdk.Model.ConvertOptions();
// specify the path for intput and resultant files
var request = new Aspose.Video.Cloud.Sdk.Model.Requests.PostConvertVideoRequest("Test_sample.avi", "mp4", "destination.mp4", options);
// perform the conversiion operatiion and save output in Cloud storage
var actual = videoApi.PostConvertVideo(request);
}
catch (Exception ex)
{
Console.WriteLine(ex.InnerException);
}
// Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration required).
// for complete examples, please visit https://github.com/aspose-video-cloud/aspose-video-cloud-dotnet
try
{
String ClientSecret = "c1d7a7ca7740c397bc546635b7799365";
String ClientID = "E31DF297-9655-4F61-B1C8-EC52E10B1888";
// create an instance of VideoApi by passing ClientSecret and clientID as arguments
var videoApi = new Aspose.Video.Cloud.Sdk.Api.VideoApi(ClientSecret, ClientID, "https://api.aspose.cloud/v1.1");
// create an instance of ConvertOptions
Aspose.Video.Cloud.Sdk.Model.ConvertOptions options = new Aspose.Video.Cloud.Sdk.Model.ConvertOptions();
// keep the aspect ratio of resultant file as default
options.AspectRatio = Aspose.Video.Cloud.Sdk.Model.ConvertOptions.AspectRatioEnum.Default;
// specify the path for intput and resultant files
var request = new Aspose.Video.Cloud.Sdk.Model.Requests.PostConvertVideoRequest("sample.mov", "mp4", "destination.mp4", options);
// perform the conversiion operatiion and save output in Cloud storage
var actual = videoApi.PostConvertVideo(request);
}
catch (Exception ex)
{
Console.WriteLine(ex.InnerException);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment