Created
February 25, 2020 05:17
-
-
Save Microncode/8b48bf2f8a4dbd340c9974b0c5e72067 to your computer and use it in GitHub Desktop.
Here is a snap example of using the CSFFmpeg using C#:
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
//Create a new instance of the library with the direction of the ffmpeg libraries | |
_CSFFmpeg = new CSFFmpeg.CSFFmpeg(@"../../../libs/ffmpeg/x86/bin", "UserName", "RegKey"); | |
//Set the arguments | |
_CSFFmpeg.ArgsDirect = txtArguments.Text; | |
//Events | |
//On ffmpeg output event | |
_CSFFmpeg.OperationOutput += (o, s) => | |
{ | |
//Display in the results in the text box | |
}; | |
//On start event | |
_CSFFmpeg.OperationStart += (o) => | |
{ | |
lblStatus.Text = "Start"; | |
}; | |
//On progress event | |
_CSFFmpeg.OperationProgress += (o, s) => | |
{ | |
progressBar1.Value = s; | |
}; | |
//Done | |
_CSFFmpeg.OperationDone += (o) => | |
{ | |
this.Invoke(new Action(() => | |
{ | |
lblStatus.Text = "Done"; | |
})); | |
}; | |
//Run the ffmpeg from the program | |
_CSFFmpeg.Run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment