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
Last active
April 22, 2021 00:16
-
-
Save aspose-cloud/eb98edf0adb050c3fb00fa07593eb35e to your computer and use it in GitHub Desktop.
This Gist contains code snippets related to Aspose.Video Cloud API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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